java - Controlling jar name from internal repository maven -
i have created internal repository(libs) , places jars in folder hierarchy showed below
here pom creating repository , specifying dependency common-jar-1.0.jar
<repositories> <repository> <id>in-project</id> <name>in project repo</name> <url>file://${basedir}/libs</url> </repository> </repositories> <dependencies> <dependency> <groupid>common</groupid> <artifactid>common-jar</artifactid> <version>1.0</version> </dependency> <dependency> <groupid>mediator</groupid> <artifactid>mediator-jar</artifactid> <version>1.0</version> </dependency> </dependencies>
i want pom accept jar name common.jar ,how can it.
currently accept common-jar-1.0.jar, can exclude version jar name how?? please help
the following install common.jar
version 1.0
into local repository ~/.m2/repository
mvn install:install-file -dfile=<path common.jar> -dgroupid=common -dartifactid=common-jar -dversion=1.0 -dpackaging=jar
after can define dependency usual
<dependency> <groupid>common</groupid> <artifactid>common-jar</artifactid> <version>1.0</version> </dependency>
Comments
Post a Comment