apm-agent-java icon indicating copy to clipboard operation
apm-agent-java copied to clipboard

Fix source jar created on Jenkins build

Open eyalkoren opened this issue 6 years ago • 1 comments

After multiple tests, current situation is: The elastic-apm-agent pom.xml has two related plugins involved with the source jar build-

  1. the maven-source-plugin is invoked at the prepare-package phase
  2. the maven-shade-plugin creates a source jar with the shaded sources

I am not entirely sure the first is required here, it is required for the attach source jar.

Invoking the exact same command as invoked by Jenkins - ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true creates the jar as expected. However, on Jenkins, the jar is created only with the shaded sources and without our sources (at least - this is what gets stored for the build artifacts).

eyalkoren avatar May 08 '19 09:05 eyalkoren

Rafael found a solution: https://github.com/raphw/byte-buddy/issues/783#issuecomment-559613610

felixbarny avatar Nov 29 '19 07:11 felixbarny

Doing some other task that required me to unarchive and look into jars reminded me this was never fixed. The issue also affects our Javadoc jar. Both it and the sources jar only contain the co.elastic.apm.agent.premain package. Maybe time to look into this.

eyalkoren avatar Jan 03 '23 12:01 eyalkoren