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

4.x: helidon-common sources JAR contains absolute paths #8761 #8762

Merged
merged 2 commits into from
May 16, 2024

Conversation

jbescos
Copy link
Member

@jbescos jbescos commented May 15, 2024

Description

Fixes #8761

Documentation

N/A

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 15, 2024
@jbescos jbescos requested a review from Tomas-Kraus May 15, 2024 11:33
@jbescos
Copy link
Member Author

jbescos commented May 15, 2024

helidon-common.zip

Generated jars

@jbescos
Copy link
Member Author

jbescos commented May 15, 2024

Related to this:
Address maven 3.9.2 plugin issues (#7214)

@romain-grecourt
Copy link
Contributor

helidon-common.zip

Generated jars

Version.java contains Maven properties in the string literals that need to be processed at build time.

unzip -p helidon-common/helidon-common-4.0.0-SNAPSHOT-sources.jar io/helidon/common/Version.java | grep '\$'
    public static final String VERSION = "${project.version}";
    public static final String REVISION = "${buildNumber}";
javap -v -cp helidon-common/helidon-common-4.0.0-SNAPSHOT.jar io.helidon.common.Version | grep '\$'
  #15 = String             #16            // ${project.version} ${buildNumber}
  #16 = Utf8               ${project.version} ${buildNumber}
  #26 = String             #27            // ${project.version}
  #27 = Utf8               ${project.version}
  #29 = String             #30            // ${buildNumber}
  #30 = Utf8               ${buildNumber}
    ConstantValue: String ${project.version}
    ConstantValue: String ${buildNumber}
         3: ldc           #15                 // String ${project.version} ${buildNumber}

@jbescos
Copy link
Member Author

jbescos commented May 16, 2024

This is the output when it generates the sources jar:

[DEBUG] Configuring mojo execution 'org.apache.maven.plugins:maven-source-plugin:3.0.1:jar:default-cli' with basic configurator -->
[DEBUG]   (f) attach = true
[DEBUG]   (f) classifier = sources
[DEBUG]   (f) defaultManifestFile = /home/jbescos/workspace/helidon/common/common/target/classes/META-INF/MANIFEST.MF
[DEBUG]   (f) excludeResources = false
[DEBUG]   (f) finalName = helidon-common-4.0.0-SNAPSHOT
[DEBUG]   (f) forceCreation = false
[DEBUG]   (f) includePom = false
[DEBUG]   (f) outputDirectory = /home/jbescos/workspace/helidon/common/common/target
[DEBUG]   (f) project = MavenProject: io.helidon.common:helidon-common:4.0.0-SNAPSHOT @ /home/jbescos/workspace/helidon/common/common/pom.xml
[DEBUG]   (f) reactorProjects = [MavenProject: io.helidon.common:helidon-common:4.0.0-SNAPSHOT @ /home/jbescos/workspace/helidon/common/common/pom.xml]
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@4207609e
[DEBUG]   (f) skipSource = false
[DEBUG]   (f) useDefaultExcludes = true
[DEBUG]   (f) useDefaultManifestFile = false
[DEBUG] -- end configuration --
[DEBUG] isUp2date: false (Destination /home/jbescos/workspace/helidon/common/common/target/helidon-common-4.0.0-SNAPSHOT-sources.jar not found.)
[INFO] Building jar: /home/jbescos/workspace/helidon/common/common/target/helidon-common-4.0.0-SNAPSHOT-sources.jar
[DEBUG] adding directory META-INF/
[DEBUG] adding entry META-INF/MANIFEST.MF
[DEBUG] adding directory io/
[DEBUG] adding directory io/helidon/
[DEBUG] adding directory io/helidon/common/
[DEBUG] adding entry module-info.java
[DEBUG] adding entry io/helidon/common/package-info.java
[DEBUG] adding entry io/helidon/common/Weights.java
[DEBUG] adding entry io/helidon/common/LazyList.java
[DEBUG] adding entry io/helidon/common/Severity.java
[DEBUG] adding entry io/helidon/common/Weight.java
[DEBUG] adding entry io/helidon/common/Reflected.java
[DEBUG] adding entry io/helidon/common/Weighted.java
[DEBUG] adding entry io/helidon/common/Errors.java
[DEBUG] adding entry io/helidon/common/ParserHelper.java
[DEBUG] adding entry io/helidon/common/LazyValueImpl.java
[DEBUG] adding entry io/helidon/common/Generated.java
[DEBUG] adding entry io/helidon/common/Base64Value.java
[DEBUG] adding entry io/helidon/common/GenericType.java
[DEBUG] adding entry io/helidon/common/GenericTypeUtil.java
[DEBUG] adding entry io/helidon/common/LazyValue.java
[DEBUG] adding entry io/helidon/common/Builder.java
[DEBUG] adding entry io/helidon/common/SerializationConfig.java
[DEBUG] adding entry io/helidon/common/HelidonServiceLoader.java
[DEBUG] adding entry io/helidon/common/LazyListImpl.java
[DEBUG] adding entry io/helidon/common/NativeImageHelper.java
[DEBUG] adding directory META-INF/native-image/
[DEBUG] adding directory META-INF/native-image/io.helidon.common/
[DEBUG] adding directory META-INF/native-image/io.helidon.common/helidon-common/
[DEBUG] adding entry META-INF/native-image/io.helidon.common/helidon-common/resource-config.json
[DEBUG] adding directory /
[DEBUG] adding directory /home/
[DEBUG] adding directory /home/jbescos/
[DEBUG] adding directory /home/jbescos/workspace/
[DEBUG] adding directory /home/jbescos/workspace/helidon/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/target/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/target/generated-sources/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/target/generated-sources/templates/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/target/generated-sources/templates/io/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/target/generated-sources/templates/io/helidon/
[DEBUG] adding directory /home/jbescos/workspace/helidon/common/common/target/generated-sources/templates/io/helidon/common/
[DEBUG] adding entry /home/jbescos/workspace/helidon/common/common/target/generated-sources/templates/io/helidon/common/Version.java
[DEBUG] adding directory META-INF/maven/
[DEBUG] adding directory META-INF/maven/io.helidon.common/
[DEBUG] adding directory META-INF/maven/io.helidon.common/helidon-common/
[DEBUG] adding entry META-INF/maven/io.helidon.common/helidon-common/pom.xml
[DEBUG] adding entry META-INF/maven/io.helidon.common/helidon-common/pom.properties

I don't really see how to deal with this using the build-helper-maven-plugin.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos
Copy link
Member Author

jbescos commented May 16, 2024

helidon-common.zip

This looks good now.

@romain-grecourt romain-grecourt merged commit e3d8a35 into helidon-io:main May 16, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helidon-common sources JAR contains absolute paths
2 participants