Skip to content

Instantly share code, notes, and snippets.

@veysiertekin
Last active July 12, 2017 06:36
Show Gist options
  • Save veysiertekin/aad85c4aa6ae53dc4b55 to your computer and use it in GitHub Desktop.
Save veysiertekin/aad85c4aa6ae53dc4b55 to your computer and use it in GitHub Desktop.
Create -local project specific- maven repository
mvn deploy:deploy-file -DgroupId=com.blogspot.pragmastic -DartifactId=old-stuff -Dversion=0.9
-Dpackaging=jar -Dfile=lib/old-stuff.jar -Durl=file://${project.basedir}/lib
-DrepositoryId=local-project-libraries
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
# example
mvn install:install-file -Dfile=/Users/vertekin/Downloads/jaxb-api-2.1.jar -DgroupId=javax.xml -DartifactId=jaxb-api -Dversion=2.1 -Dpackaging=jar
<dependencies>
<dependency>
<groupId>com.blogspot.pragmastic</groupId>
<artifactId>old-stuff</artifactId>
<version>0.9</version>
</dependency>
</dependencies>
mvn archetype:generate -DgroupId=<groupId> -DartifactId=<artifactId> -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
<repositories>
<repository>
<id>local-project-libraries</id>
<name>Local project libraries</name>
<url>file://${project.basedir}/lib</url>
<layout>default</layout>
</repository>
</repositories>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment