Hi, I've added a maven-shade-plugin for the infamous Spring issues when creating an uber jar. Anyway in my ManifestResourceTransformer I specify my executable class. When I run mvn clean/install and then try to execute the jar, I get a class not found issue. When I expand the jar file that Maven created and opened the Manifest.MF file, the class name for Main-Class was placed in two lines. This is what it looks like:
---------------------------------------------------------------------- Manifest-Version: 1.0 Build-Jdk: 1.7.0_17 Built-By: Dell Created-By: Apache Maven Main-Class: com.albeingters.buslogics.variablespeedcontroller.BusVSGat e Archiver-Version: Plexus Archiver ---------------------------------------------------------------------- Notice above that the "e" was put on the next line. For testing purposes, when I truncated the class name a couple of characters, everything seemed to work fine. So looks like Maven has some type of string length limit for the main class. Below is my pom configuration for that shader: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <minimizeJar>true</minimizeJar> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.handlers</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.schemas</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <manifestEntries> <Main-Class>${app.main.class}</Main-Class> </manifestEntries> </transformer> </transformers> </configuration> </execution> </executions> </plugin> Using JDK 1.7_17 and Maven 3.0.5 command line -- View this message in context: http://maven.40175.n5.nabble.com/Issue-with-ManifestResourceTransformer-and-string-length-limit-for-main-class-tp5752842.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org