Trying to package a specific lib into my jar, ain't working

77 Views Asked by At

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

1

There are 1 best solutions below

0
VonC On BEST ANSWER

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.