Open peavers opened 9 years ago
The jar you are packaging probably needs to be an executable jar with a main class in the manifest. You can use the shade plugin to build your executable jar. HTH
I'm seeing the same thing, but I am building an executable jar. What is bizarre is that this was working up until a few days ago.
This is my shade config... again, this was just working. I might have to start a bisect.
`
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.fake.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>`
I changed the name of the mainClass, but that is academic (just for the sake of posting).
I think this is more user error than issue, but struggling to get this to work. I've simply added the plugin with the default configuration from the readme and I'm attempting to package my app but receive the following error:
[ERROR] Failed to execute goal com.jamierf.dropwizard:dropwizard-debpkg-maven-plugin:0.9:dwpackage (default) on project org.squandered.weather: Execution default of goal com.jamierf.dropwizard:dropwizard-debpkg-maven-plugin:0.9:dwpackage failed: Failed to find main class in artifact jar -> [Help 1]
I'm very new to maven so I think I've just not set something correctly here... Should the goal be my package?
Do you have a "in the wild" working example I can poke at?