Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.1
-
None
-
None
Description
Save the following to /tmp/bug/Dockerfile:
FROM maven:3.6.3-jdk-8 RUN git clone -b support-core-2.65 https://github.com/jenkinsci/support-core-plugin /src WORKDIR /src RUN git checkout HEAD^ RUN mvn -B validate RUN mvn dependency:build-classpath | tee /classpath RUN ls -lR ~/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-support | tee /before RUN mvn dependency:sources RUN ls -lR ~/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-support | tee /after RUN diff /before /after | tee /diff RUN mvn dependency:sources -Dclassifier=test-sources -DincludeArtifactIds=workflow-support RUN ls -lR ~/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-support | tee /workaround RUN diff /after /workaround | tee /diff-workaround
Now docker build /tmp/bug and you will see the problem: sources for this dependency are omitted. The dependency:sources downloads sources for the main artifact:
> -rw-r--r-- 1 root root 91116 Jan 3 15:47 workflow-support-3.3-sources.jar
after printing
[INFO] The following files have been resolved: ... [INFO] org.jenkins-ci.plugins.workflow:workflow-support:jar:sources:3.3 ... [INFO] The following files have NOT been resolved: ... [INFO] org.jenkins-ci.plugins.workflow:workflow-support:jar:3.3:test ... [INFO] org.jenkins-ci.plugins.workflow:workflow-support:jar:tests:3.3:test
but only the workaround command suffices to get sources for the test JAR:
> -rw-r--r-- 1 root root 33273 Jan 3 15:51 workflow-support-3.3-test-sources.jar
after printing
[INFO] The following files have been resolved: [INFO] org.jenkins-ci.plugins.workflow:workflow-support:jar:test-sources:3.3 [INFO] [INFO] The following files have NOT been resolved: [INFO] org.jenkins-ci.plugins.workflow:workflow-support:jar:3.3:test [INFO] org.jenkins-ci.plugins.workflow:workflow-support:jar:tests:3.3:test