Embed jar files during packaging

Thats possible using the maven-dependency-plugin

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-dependency-plugin</artifactId>
   <version>2.8</version>
   <executions>
     <execution>
   <id>copy</id>
  <phase>prepare-package</phase>
 <goals>
 <goal>copy</goal>
 </goals>
 <configuration>
 
 <artifactItems>
 <artifactItem>
 <groupId>com.mycompany</groupId>
 <artifactId>mylib</artifactId>
 <version>1.0.0</version>
 <type>jar</type>
 <outputDirectory>${basedir}/target/myapp/WEB-INF/lib</outputDirectory>
 </artifactItem> 
 </artifactItems>
 
 <skip>true</skip>
 
 
 </configuration>
 </execution>
 </executions>
 </plugin>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: