Created
July 29, 2013 17:32
-
-
Save Alcar32/6106019 to your computer and use it in GitHub Desktop.
[HowTo] | [Maven]
How to create a local maven repository stored in a maven project and import a jar file in this local repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example if a jar file called 'maryclient.jar' is stored in 'lib' folder in project root. | |
| # The parameter of '-Durl' need a full path name to local repository | |
| $> mvn deploy:deploy-file -Dfile=".\lib\maryclient.jar" -DgroupId=de.mary.dfki -DartifactId=maryclient -Dversion=1.0 -Dpackaging=jar -Durl="file://C:\Users\domann\workspace\juno\SmartNutritionAssistant\CookingAssistant\repo" | |
| # After the import is finished. The project structure should be like this: | |
| project | |
| | | |
| +--src | |
| | | | |
| | +--main | |
| | | | |
| | +--java | |
| | | | |
| | +... | |
| | | |
| +--lib | |
| | | | |
| | +--maryclient.jar | |
| | | |
| +--repo | |
| | | |
| +--de | |
| | | |
| +--mary | |
| | | |
| +--dfki | |
| | | |
| +--maryclient | |
| | | |
| +--1.0 | |
| | | |
| +--maryclient-1.0.jar | |
| | | |
| +--maryclient-1.0.pom | |
| for more information see: | |
| http://maven.apache.org/plugins/maven-deploy-plugin/usage.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| </build> | |
| ... | |
| </build> | |
| <repositories> | |
| <repository> | |
| <id>jars</id> | |
| <!-- has to be a url linked to file system. A folder 'repo' must exist in the project root (${project.basedir})--> | |
| <url>file://${project.basedir}/repo</url> | |
| </repository> | |
| </repositories> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment