Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too long Args lead to compilation failure #113

Closed
orxissi opened this issue Aug 21, 2020 · 1 comment · Fixed by #125
Closed

Too long Args lead to compilation failure #113

orxissi opened this issue Aug 21, 2020 · 1 comment · Fixed by #125

Comments

@orxissi
Copy link

orxissi commented Aug 21, 2020

[ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.2.0:proguard (default) on project xxx-xx-xxxx: Obfuscation failed (result=1) -> [Help1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.2.0:proguard (default) on project xxx-xx-xxxx: Obfuscation failed (result=1)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Obfuscation failed (result=1)
at com.github.wvengen.maven.proguard.ProGuardMojo.proguardMain(ProGuardMojo.java:909)
at com.github.wvengen.maven.proguard.ProGuardMojo.execute(ProGuardMojo.java:696)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn -rf :xxx-xx-xxxx

Configuration:

<plugin>
	<groupId>com.github.wvengen</groupId>
	<artifactId>proguard-maven-plugin</artifactId>
	<version>2.2.0</version>
	<executions>
		<execution>
			<phase>package</phase>
			<goals>
				<goal>proguard</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<obfuscate>true</obfuscate>
		<proguardInclude>src/main/assembly/proguard.conf</proguardInclude>
	        <libs>                       
			<lib>${java.home}/jmods/java.base.jmod</lib>
			<lib>${java.home}/jmods/java.datatransfer.jmod</lib>
			<lib>${java.home}/jmods/java.desktop.jmod</lib>
			<lib>${java.home}/jmods/java.instrument.jmod</lib>
			<lib>${java.home}/jmods/java.logging.jmod</lib>
			<lib>${java.home}/jmods/java.management.jmod</lib>
			<lib>${java.home}/jmods/java.management.rmi.jmod</lib>
			<lib>${java.home}/jmods/java.naming.jmod</lib>
			<lib>${java.home}/jmods/java.net.http.jmod</lib>
			<lib>${java.home}/jmods/java.prefs.jmod</lib>
			<lib>${java.home}/jmods/java.rmi.jmod</lib>
			<lib>${java.home}/jmods/java.scripting.jmod</lib>
			<lib>${java.home}/jmods/java.se.jmod</lib>
			<lib>${java.home}/jmods/java.security.jgss.jmod</lib>
			<lib>${java.home}/jmods/java.compiler.jmod</lib>
			<lib>${java.home}/jmods/java.security.sasl.jmod</lib>
			<lib>${java.home}/jmods/java.smartcardio.jmod</lib>
			<lib>${java.home}/jmods/java.sql.jmod</lib>
			<lib>${java.home}/jmods/java.sql.rowset.jmod</lib>
			<lib>${java.home}/jmods/java.transaction.xa.jmod</lib>
			<lib>${java.home}/jmods/java.xml.crypto.jmod</lib>
			<lib>${java.home}/jmods/java.xml.jmod</lib>
			<lib>${java.home}/jmods/jdk.accessibility.jmod</lib>
			<lib>${java.home}/jmods/jdk.aot.jmod</lib>
			<lib>${java.home}/jmods/jdk.attach.jmod</lib>
			<lib>${java.home}/jmods/jdk.charsets.jmod</lib>
			<lib>${java.home}/jmods/jdk.compiler.jmod</lib>
			<lib>${java.home}/jmods/jdk.dynalink.jmod</lib>
			<lib>${java.home}/jmods/jdk.httpserver.jmod</lib>
			<lib>${java.home}/jmods/jdk.internal.ed.jmod</lib>
			<lib>${java.home}/jmods/jdk.internal.jvmstat.jmod</lib>
			<lib>${java.home}/jmods/jdk.internal.le.jmod</lib>
			<lib>${java.home}/jmods/jdk.internal.opt.jmod</lib>
			<lib>${java.home}/jmods/jdk.jartool.jmod</lib>
			<lib>${java.home}/jmods/jdk.javadoc.jmod</lib>
			<lib>${java.home}/jmods/jdk.jconsole.jmod</lib>
			<lib>${java.home}/jmods/jdk.jdi.jmod</lib>
			<lib>${java.home}/jmods/jdk.jdwp.agent.jmod</lib>
			<lib>${java.home}/jmods/jdk.jfr.jmod</lib>
			<lib>${java.home}/jmods/jdk.jshell.jmod</lib>
			<lib>${java.home}/jmods/jdk.jsobject.jmod</lib>
			<lib>${java.home}/jmods/jdk.management.agent.jmod</lib>
			<lib>${java.home}/jmods/jdk.net.jmod</lib>
			<lib>${java.home}/jmods/jdk.scripting.nashorn.jmod</lib>
			<lib>${java.home}/jmods/jdk.sctp.jmod</lib>
			<lib>${java.home}/jmods/jdk.security.auth.jmod</lib>
			<lib>${java.home}/jmods/jdk.security.jgss.jmod</lib>
			<lib>${java.home}/jmods/jdk.unsupported.desktop.jmod</lib>
			<lib>${java.home}/jmods/jdk.unsupported.jmod</lib>
			<lib>${java.home}/jmods/jdk.xml.dom.jmod</lib>
		</libs>
		<addMavenDescriptor>false</addMavenDescriptor>                  
	</configuration>
	<dependencies> 
	   <dependency>
			<groupId>net.sf.proguard</groupId>
			<artifactId>proguard-base</artifactId>
			<version>6.2.0</version>
	   </dependency>
	</dependencies>
</plugin> 
@lasselindqvist
Copy link
Collaborator

Your stacktrace doesn't show the real failure reason.

I suppose <putLibraryJarsInTempDir>true</putLibraryJarsInTempDir> might not help here, since there are not JARs. But it might help bring the length under the critical length.

Another thing you need to check is that your base path isn't outrageously long. If it is, try to shorten it, even though it isn't a full solution to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants