spaceemotion
spaceemotion

Reputation: 1546

Disable shading on deploy

I am currently trying to figure out how not to deploy a shaded artifact to my maven repository.

My current project requires some modules to generate shaded artifacts that can be shared with users, but when deploying I only want to upload the original jar file - which only contains the stuff our developers need.

Is there a way to disable the shading goal when deploying a maven project? Disabling deploy completely disables it, not just uploading the shaded JAR file.

Thanks in advance!

Upvotes: 0

Views: 311

Answers (1)

K Erlandsson
K Erlandsson

Reputation: 13696

I assume you are using the maven shade plugin?

If so you can add the following in your plugin configuration:

<configuration>
          <shadedArtifactAttached>true</shadedArtifactAttached>
          <shadedClassifierName>myclassifier</shadedClassifierName>
</configuration>

That will make maven shade plugin deploy both your original artifact and the shaded artifact (with classifier myclassifier) to your repository.

Is that good enough? I'm not sure how you can disable deploying the shaded artifact entirely.

Upvotes: 3

Related Questions