Any third-party libraries used in your plugin need to be included in the finished plugin, even if they are also used by core ReadyAPI functionality.
The reason for this is to keep dependencies separated, and to avoid plugin breaking due to changes in ReadyAPI dependencies.
When you install a plugin in ReadyAPI, the Plugin Manager unpacks all the libraries included in that plugin and performs reverse lookup to load the bundled third-party libraries before the libraries in the <ReadyAPI>\lib directory.
Packaging Libraries
Libraries used by your plugin must be added to the project in a directory named libs
.
To automate the packaging of libraries, use the Maven assembly plugin.
Configure the assembly through your project pom.xml
as follows:
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptors>
<descriptor>src/assembly/dist-assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
The assembly configuration file specifies which libraries and classes to include in the final jar file as, for example, the following assembly used by the RAML Plugin.
<id>dist</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<outputDirectory>/ext</outputDirectory>
<includes>
<include>org.raml:raml-parser</include>
<include>org.yaml:snakeyaml</include>
</includes>
</dependencySet>
<dependencySet>
<unpack>false</unpack>
<outputDirectory>/plugins</outputDirectory>
<includes>
<include>com.smartbear:soapui-raml-plugin</include>
</includes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>LICENSE*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/assembly</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>readme.txt</include>
</includes>
</fileSet>
</fileSets>
</assembly>
Build with
mvn assembly:single ```
For more information, see the Assembly usage documentation.