Monday, June 23, 2014

Installing custom jar in custom repo in maven

In maven setting.xml add following


<mirrors>
 
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://localhost:8090/repo</url>
    </mirror>
  </mirrors>


in pom .xml add this
<repositories>
  <repository>
   <id>mirrorId</id>
   <name>Human Readable Name for this Mirror.</name>
   <url>http://localhost:8090/repo</url>
  </repository>
   </repositories>


  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
     <dependency>
      <groupId>per</groupId>
      <artifactId>persi</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
   </dependencies>

In webapps in tomcat create repo folder and place  urs jar that is genereated as the result of mvn install command

No comments:

Post a Comment