Skip to content

Instantly share code, notes, and snippets.

@paulovittor23
Last active August 29, 2015 14:21
Show Gist options
  • Save paulovittor23/bd41fa82d440c34d5a44 to your computer and use it in GitHub Desktop.
Save paulovittor23/bd41fa82d440c34d5a44 to your computer and use it in GitHub Desktop.
generate test jar for reuse in other projects
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<configuration>
<includes>
<include>**/factories/*</include>
</includes>
</configuration>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
an then use in the other project
<dependency>
<groupId>com.citybin.bach2</groupId>
<artifactId>generalservices</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment