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

Error: The same input jar [C:\Program Files\Java\jdk1.8.0_281\lib\tools.jar] is specified twice. #145

Open
turnglight opened this issue Sep 16, 2021 · 1 comment

Comments

@turnglight
Copy link

turnglight commented Sep 16, 2021

exec: mvn clean compile package -DskipTests=true
Error: The same input jar [C:\Program Files\Java\jdk1.8.0_281\lib\tools.jar] is specified twice.

<plugin>
				<groupId>com.github.wvengen</groupId>
				<artifactId>proguard-maven-plugin</artifactId>
				<version>2.0.14</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>proguard</goal>
						</goals>
					</execution>
				</executions>

				<configuration>
					<proguardVersion>6.0.2</proguardVersion>
					<obfuscate>true</obfuscate>
					<attachArtifactClassifier>pg</attachArtifactClassifier>
					<options>
						<option>-target 1.8</option>
						<option>-dontshrink</option>
						<option>-dontoptimize</option>
						<option>-dontskipnonpubliclibraryclasses</option>
						<option>-dontskipnonpubliclibraryclassmembers</option>
						<option>-allowaccessmodification</option>
						<option>-useuniqueclassmembernames</option>
						<option>-adaptclassstrings</option>
						<option>-dontusemixedcaseclassnames</option><option>-keeppackagenames</option>
						<option>-keepparameternames</option>
						<option>-keepattributes
							Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod,LocalVariableTable,LocalVariableTypeTable,MethodParameters
						</option>
						<option>
							-keepclassmembers public class *{void set*(***);*** get*();}
						</option>
						<option>
							-keepclasseswithmembers public class * { public static void main(java.lang.String[]);}
						</option>
						<option>-keepclassmembers enum * { *; }</option>
						<option>-keep class com.sf.lbs.** { *; }</option>
						<option>-dontwarn **</option>
					</options>
					<libs>
						<lib>${java.home}/lib/rt.jar</lib>
						<lib>${java.home}/lib/jsse.jar</lib>
					</libs>

					<inFilter>com/sf/lbs/**</inFilter>
					<injar>classes</injar>
					<injar>${project.build.finalName}.jar</injar>
					<outjar>${project.build.finalName}-pg.jar</outjar>
					<outputDirectory>${project.build.directory}</outputDirectory>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>net.sf.proguard</groupId>
						<artifactId>proguard-base</artifactId>
						<version>6.0.2</version>
						<scope>runtime</scope>
					</dependency>
				</dependencies>
			</plugin>
@lasselindqvist
Copy link
Collaborator

I will not be supporting any Java 8 issues here, but if you have fix for this it can be merged.

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

No branches or pull requests

2 participants