java - Controlling jar name from internal repository maven -


i have created internal repository(libs) , places jars in folder hierarchy showed below

enter image description here

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.0into 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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -