-
Notifications
You must be signed in to change notification settings - Fork 7
Add local dependency
mkutmon edited this page Apr 23, 2013
·
6 revisions
Before adding a dependency make sure that it is not available in a Maven repository that could be accessed directly.
-
Copy local jar into local repository directory
cp dependency.jar cytoscape-wikipathways-app/localRepo/
-
Add line in localsetup.sh file to install dependency locally
mvn install:install-file -Dfile={path-to-app-directory}/cytoscape-wikipathways-app/localRepo/dependency.jar
Then run the local setup script.
./localsetup.sh
-
Open the pom.xml file to define the new dependency (cytoscape-wikipathways-app/wikipathways.app/pom.xml)
-
Add new dependency in pom.xml file (within the dependencies tag) - groupId = org.pathvisio, artifactId = pathvisio-core, optional has to be true!
<dependency>
<groupId>prefix</groupId>
<artifactId>jar-name</artifactId>
<version>version</version>
<optional>true</optional>
</dependency>
- Add dependency to Maven shading plugin to make sure it is included in the resulting jar (search for maven-shade-plugin) - add include line to existing configuration artifact set.
<configuration>
<artifactSet>
<includes>
**<include>prefix:jar-name</include>**
</includes>
</artifactSet>
</configuration>
- Run Maven install and check output
mvn install
->[INFO] Including prefix:jar-name:version in the shaded jar.