-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Update dependencies, exclude JSR 305 #495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure about using jcip-annotations, but I do not have better suggestions. It seems to be a common approach in this case
Looks right; did you check if this snapshot can be included in core without causing POM problems? |
Yes, this was the approach taken in jenkinsci/jenkins#4604. I am being consistent with that change here.
I did, and it can. |
Any further action items here? I hope to merge this sometime this week if there are no additional changes to be made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is including (shading) a lot more libraries that before - is this intentional?
this pr
[INFO] --- maven-shade-plugin:3.2.4:shade (default) @ remoting ---
[INFO] Including org.glassfish.tyrus.bundles:tyrus-standalone-client-jdk:jar:1.18 in the shaded jar.
[INFO] Including args4j:args4j:jar:2.33 in the shaded jar.
[INFO] Including org.jenkins-ci:constant-pool-scanner:jar:1.2 in the shaded jar.
[INFO] Including com.github.spotbugs:spotbugs-annotations:jar:4.5.0 in the shaded jar.
[INFO] Including net.jcip:jcip-annotations:jar:1.0 in the shaded jar.
[INFO] Including org.kohsuke:access-modifier-annotation:jar:1.27 in the shaded jar.
[INFO] Including org.jenkins-ci:annotation-indexer:jar:1.15 in the shaded jar.
[WARNING] access-modifier-annotation-1.27.jar, annotation-indexer-1.15.jar, args4j-2.33.jar, constant-pool-scanner-1.2.jar, jcip-annotations-1.0.jar, remoting-4.12-SNAPSHOT.jar, spotbugs-annotations-4.5.0.jar, tyrus-standalone-client-jdk-1.18.jar define 1 overlapping resource:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/
master@a9938ac
[INFO] --- maven-shade-plugin:3.2.4:shade (default) @ remoting ---
[INFO] Including org.glassfish.tyrus.bundles:tyrus-standalone-client-jdk:jar:1.18 in the shaded jar.
[INFO] Including args4j:args4j:jar:2.33 in the shaded jar.
[INFO] Including org.jenkins-ci:constant-pool-scanner:jar:1.2 in the shaded jar.
[WARNING] args4j-2.33.jar, constant-pool-scanner-1.2.jar, remoting-4.12-SNAPSHOT.jar, tyrus-standalone-client-jdk-1.18.jar define 1 overlapping resource:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/
Of course not and thank you. Fixed in the latest revision. |
…gle with running PipeTest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the cleanup
The classpath on windows was pure fantasy and worked by fluke only if java and all the code and dependencies where on the same drive. if any code was on a different drive the classpath was mangled which leads to tests failing. e.g. the classpath would end up being something like D;\source\github\jenkins\remoting\target\test-classes;D;\source\github\jenkins\remoting\target\classes;C;\Users\jnord\.m2\repository\args4j\args4j\2.33\args4j-2.33.jar;C;\Users\jnord\.m2\repository\org\glassfish\tyrus\bundles\tyrus-standalone-client-jdk\2.1.5\tyrus-standalone-client-jdk-2.1.5.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\constant-pool-scanner\1.2\constant-pool-scanner-1.2.jar;C;\Users\jnord\.m2\repository\com\github\spotbugs\spotbugs-annotations\4.8.5\spotbugs-annotations-4.8.5.jar;C;\Users\jnord\.m2\repository\jakarta\websocket\jakarta.websocket-client-api\2.1.1\jakarta.websocket-client-api-2.1.1.jar;C;\Users\jnord\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C;\Users\jnord\.m2\repository\org\kohsuke\access-modifier-annotation\1.33\access-modifier-annotation-1.33.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\annotation-indexer\1.17\annotation-indexer-1.17.jar;C;\Users\jnord\.m2\repository\com\google\guava\guava\31.0.1-jre\guava-31.0.1-jre.jar;C;\Users\jnord\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C;\Users\jnord\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C;\Users\jnord\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C;\Users\jnord\.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;C;\Users\jnord\.m2\repository\com\google\errorprone\error_prone_annotations\2.7.1\error_prone_annotations-2.7.1.jar;C;\Users\jnord\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C;\Users\jnord\.m2\repository\commons-io\commons-io\2.16.1\commons-io-2.16.1.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter\5.10.2\junit-jupiter-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.10.2\junit-jupiter-api-5.10.2.jar;C;\Users\jnord\.m2\repository\org\opentest4j\opentest4j\1.3.0\opentest4j-1.3.0.jar;C;\Users\jnord\.m2\repository\org\junit\platform\junit-platform-commons\1.10.2\junit-platform-commons-1.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.10.2\junit-jupiter-engine-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-params\5.10.2\junit-jupiter-params-5.10.2.jar;C;\Users\jnord\.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C;\Users\jnord\.m2\repository\org\junit\vintage\junit-vintage-engine\5.10.2\junit-vintage-engine-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\platform\junit-platform-engine\1.10.2\junit-platform-engine-1.10.2.jar;C;\Users\jnord\.m2\repository\junit\junit\4.13.2\junit-4.13.2.jar;C;\Users\jnord\.m2\repository\org\hamcrest\hamcrest-core\2.2\hamcrest-core-2.2.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcpkix-jdk18on\1.78.1\bcpkix-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcutil-jdk18on\1.78.1\bcutil-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcprov-jdk18on\1.78.1\bcprov-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\test-annotations\1.4\test-annotations-1.4.jar;C;\Users\jnord\.m2\repository\org\mockito\mockito-core\5.11.0\mockito-core-5.11.0.jar;C;\Users\jnord\.m2\repository\net\bytebuddy\byte-buddy\1.14.12\byte-buddy-1.14.12.jar;C;\Users\jnord\.m2\repository\net\bytebuddy\byte-buddy-agent\1.14.12\byte-buddy-agent-1.14.12.jar;C;\Users\jnord\.m2\repository\org\objenesis\objenesis\3.3\objenesis-3.3.jar;C;\Users\jnord\.m2\repository\org\ow2\asm\asm\9.7\asm-9.7.jar; which leads to Error: Unable to initialize main class hudson.remoting.Launcher This currently works in CI and elsewhere by pure fluke that the paths without drives (\Users\jnord\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar) use the current drive - which in CI will always be C: for java and the source code and maven amends jenkinsci#495
The classpath on windows was pure fantasy and worked by fluke only if java and all the code and dependencies where on the same drive. if any code was on a different drive the classpath was mangled which leads to tests failing. e.g. the classpath would end up being something like D;\source\github\jenkins\remoting\target\test-classes;D;\source\github\jenkins\remoting\target\classes;C;\Users\jnord\.m2\repository\args4j\args4j\2.33\args4j-2.33.jar;C;\Users\jnord\.m2\repository\org\glassfish\tyrus\bundles\tyrus-standalone-client-jdk\2.1.5\tyrus-standalone-client-jdk-2.1.5.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\constant-pool-scanner\1.2\constant-pool-scanner-1.2.jar;C;\Users\jnord\.m2\repository\com\github\spotbugs\spotbugs-annotations\4.8.5\spotbugs-annotations-4.8.5.jar;C;\Users\jnord\.m2\repository\jakarta\websocket\jakarta.websocket-client-api\2.1.1\jakarta.websocket-client-api-2.1.1.jar;C;\Users\jnord\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C;\Users\jnord\.m2\repository\org\kohsuke\access-modifier-annotation\1.33\access-modifier-annotation-1.33.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\annotation-indexer\1.17\annotation-indexer-1.17.jar;C;\Users\jnord\.m2\repository\com\google\guava\guava\31.0.1-jre\guava-31.0.1-jre.jar;C;\Users\jnord\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C;\Users\jnord\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C;\Users\jnord\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C;\Users\jnord\.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;C;\Users\jnord\.m2\repository\com\google\errorprone\error_prone_annotations\2.7.1\error_prone_annotations-2.7.1.jar;C;\Users\jnord\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C;\Users\jnord\.m2\repository\commons-io\commons-io\2.16.1\commons-io-2.16.1.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter\5.10.2\junit-jupiter-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.10.2\junit-jupiter-api-5.10.2.jar;C;\Users\jnord\.m2\repository\org\opentest4j\opentest4j\1.3.0\opentest4j-1.3.0.jar;C;\Users\jnord\.m2\repository\org\junit\platform\junit-platform-commons\1.10.2\junit-platform-commons-1.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.10.2\junit-jupiter-engine-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-params\5.10.2\junit-jupiter-params-5.10.2.jar;C;\Users\jnord\.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C;\Users\jnord\.m2\repository\org\junit\vintage\junit-vintage-engine\5.10.2\junit-vintage-engine-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\platform\junit-platform-engine\1.10.2\junit-platform-engine-1.10.2.jar;C;\Users\jnord\.m2\repository\junit\junit\4.13.2\junit-4.13.2.jar;C;\Users\jnord\.m2\repository\org\hamcrest\hamcrest-core\2.2\hamcrest-core-2.2.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcpkix-jdk18on\1.78.1\bcpkix-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcutil-jdk18on\1.78.1\bcutil-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcprov-jdk18on\1.78.1\bcprov-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\test-annotations\1.4\test-annotations-1.4.jar;C;\Users\jnord\.m2\repository\org\mockito\mockito-core\5.11.0\mockito-core-5.11.0.jar;C;\Users\jnord\.m2\repository\net\bytebuddy\byte-buddy\1.14.12\byte-buddy-1.14.12.jar;C;\Users\jnord\.m2\repository\net\bytebuddy\byte-buddy-agent\1.14.12\byte-buddy-agent-1.14.12.jar;C;\Users\jnord\.m2\repository\org\objenesis\objenesis\3.3\objenesis-3.3.jar;C;\Users\jnord\.m2\repository\org\ow2\asm\asm\9.7\asm-9.7.jar; which leads to Error: Unable to initialize main class hudson.remoting.Launcher This currently works in CI and elsewhere by pure fluke that the paths without drives (\Users\jnord\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar) use the current drive - which in CI will always be C: for java and the source code and maven amends jenkinsci#495 (cherry picked from commit 1aa3806)
The classpath on windows was pure fantasy and worked by fluke only if java and all the code and dependencies where on the same drive. if any code was on a different drive the classpath was mangled which leads to tests failing. e.g. the classpath would end up being something like D;\source\github\jenkins\remoting\target\test-classes;D;\source\github\jenkins\remoting\target\classes;C;\Users\jnord\.m2\repository\args4j\args4j\2.33\args4j-2.33.jar;C;\Users\jnord\.m2\repository\org\glassfish\tyrus\bundles\tyrus-standalone-client-jdk\2.1.5\tyrus-standalone-client-jdk-2.1.5.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\constant-pool-scanner\1.2\constant-pool-scanner-1.2.jar;C;\Users\jnord\.m2\repository\com\github\spotbugs\spotbugs-annotations\4.8.5\spotbugs-annotations-4.8.5.jar;C;\Users\jnord\.m2\repository\jakarta\websocket\jakarta.websocket-client-api\2.1.1\jakarta.websocket-client-api-2.1.1.jar;C;\Users\jnord\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C;\Users\jnord\.m2\repository\org\kohsuke\access-modifier-annotation\1.33\access-modifier-annotation-1.33.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\annotation-indexer\1.17\annotation-indexer-1.17.jar;C;\Users\jnord\.m2\repository\com\google\guava\guava\31.0.1-jre\guava-31.0.1-jre.jar;C;\Users\jnord\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C;\Users\jnord\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C;\Users\jnord\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C;\Users\jnord\.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;C;\Users\jnord\.m2\repository\com\google\errorprone\error_prone_annotations\2.7.1\error_prone_annotations-2.7.1.jar;C;\Users\jnord\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C;\Users\jnord\.m2\repository\commons-io\commons-io\2.16.1\commons-io-2.16.1.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter\5.10.2\junit-jupiter-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.10.2\junit-jupiter-api-5.10.2.jar;C;\Users\jnord\.m2\repository\org\opentest4j\opentest4j\1.3.0\opentest4j-1.3.0.jar;C;\Users\jnord\.m2\repository\org\junit\platform\junit-platform-commons\1.10.2\junit-platform-commons-1.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.10.2\junit-jupiter-engine-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\jupiter\junit-jupiter-params\5.10.2\junit-jupiter-params-5.10.2.jar;C;\Users\jnord\.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C;\Users\jnord\.m2\repository\org\junit\vintage\junit-vintage-engine\5.10.2\junit-vintage-engine-5.10.2.jar;C;\Users\jnord\.m2\repository\org\junit\platform\junit-platform-engine\1.10.2\junit-platform-engine-1.10.2.jar;C;\Users\jnord\.m2\repository\junit\junit\4.13.2\junit-4.13.2.jar;C;\Users\jnord\.m2\repository\org\hamcrest\hamcrest-core\2.2\hamcrest-core-2.2.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcpkix-jdk18on\1.78.1\bcpkix-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcutil-jdk18on\1.78.1\bcutil-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\bouncycastle\bcprov-jdk18on\1.78.1\bcprov-jdk18on-1.78.1.jar;C;\Users\jnord\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;C;\Users\jnord\.m2\repository\org\jenkins-ci\test-annotations\1.4\test-annotations-1.4.jar;C;\Users\jnord\.m2\repository\org\mockito\mockito-core\5.11.0\mockito-core-5.11.0.jar;C;\Users\jnord\.m2\repository\net\bytebuddy\byte-buddy\1.14.12\byte-buddy-1.14.12.jar;C;\Users\jnord\.m2\repository\net\bytebuddy\byte-buddy-agent\1.14.12\byte-buddy-agent-1.14.12.jar;C;\Users\jnord\.m2\repository\org\objenesis\objenesis\3.3\objenesis-3.3.jar;C;\Users\jnord\.m2\repository\org\ow2\asm\asm\9.7\asm-9.7.jar; which leads to Error: Unable to initialize main class hudson.remoting.Launcher This currently works in CI and elsewhere by pure fluke that the paths without drives (\Users\jnord\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar) use the current drive - which in CI will always be C: for java and the source code and maven amends #495
access-modifier
from 1.25 to 1.27