1

I'm unable to package needed libs into my Jar, the shade plugin doesn't give any output of any kind in the console, Making it a littile hard to describe what's happening here, as it's more there lack of.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4.3</version>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                    <goal>shade</goal>
                </goals>
                <configuration>
                    <artifactSet>
                        <includes>
                            <include>org.javacord:javacord</include>
                        </includes>
                    </artifactSet>
                </configuration>
            </execution>
        </executions>
    </plugin>

I take it it shouldn't be done this way?

This is the lib that I'm trying to package:

<dependency>
    <groupId>org.javacord</groupId>
    <artifactId>javacord</artifactId>
    <version>3.0.4</version>
    <type>pom</type>
    <scope>provided</scope>
</dependency>

The console output is pasted here: https://hastebin.com/soxafiqupe.cs

Tau
  • 33
  • 5
  • 1
    maven-shade-plugin ignores by default dependencies with scope `provided`. https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html furthermore I have my doubts that the above dependency is correct cause `pom` means you don't have a jar etc. which can be put on the classpath nor on the module path...I would expect to use `javacord-core`...or the `javacord-api` https://search.maven.org/search?q=org.javacord ... – khmarbaise Apr 17 '19 at 04:59

1 Answers1

0

Check first if, as in here, your plugin definition is in your pom, not your parent pom (if you have one)

Then make sure (as in this answer) the plugin section is inside a build section, not a build/pluginManagement one.

If you want more traces, a mvn -X clean install would be more verbose.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250