We have project with lot of precanned test files, so obviously the test-jar file is very big. Since no one uses test jar(at least in out project), we don't gain any benefit by uploading it.
When we run the maven deploy command, I want it to only upload the project jar file and not the test jar file. Is there a way to achieve that?
Actually the test jar files do not get built by default. It is likely that you are building them explicitly using attached tests. If so, you can remove that config from your project and you should be good to go.
Look for a section like the following and you can remove the same.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
Tests will continue to run on your project without the above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With