0

I'm trying to work through a simple example of creating an executable JAR using the shade plugin. I walked through the example here pretty much line-for-line, and on my machine it appears the shade plugin doesn't execute at all.

My POM code for shade is:

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.0.0</version> <configuration> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> 

After running 'mvn package' the created JAR doesn't include any of the project dependencies. From the debug trace it doesn't appear that the shade plugin is ever called. Is there some additional step required to get shade to do its magic?

Edit: Full code of example is at https://github.com/hutch31/maven-shade-example

Edit 2: Github repo now has corrected code

2
  • 1
    Please add the full pom file or even better show a project on github or alike... Commented Jan 27, 2021 at 15:46
  • See answer of J Fabian Meier... Commented Jan 27, 2021 at 16:02

1 Answer 1

3

Plugins in <pluginManagement> will not be executed.

For that, they need to be placed in <plugins>.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.