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

Maven properties are not being replaced by their values when prepare-feature reads a bill of materials #1758

Closed
benjamin-confino opened this issue Nov 27, 2023 · 0 comments · Fixed by #1759
Labels

Comments

@benjamin-confino
Copy link

In the following pom.xml we have a bill of materials including the line <artifactId>${esa.artifact.id}</artifactId> and that property is defined: <esa.artifact.id>liberty-feature</esa.artifact.id>

However when prepare-feature is run it looks for ${esa.artifact.id} in the repository, not for liberty-feature.

I believe this can be fixed if https://github.com/OpenLiberty/ci.maven/blob/main/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/PrepareFeatureSupport.java is patched to look for the maven property pattern when it pulls a coordinate part.

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.ibm.example.user.feature</groupId>
  <artifactId>bill-of-materials</artifactId>
  <version>1.0-SNAPSHOT</version>
  <properties>
    <maven.compiler.target>11</maven.compiler.target>
    <integration.bundle.symbolic.name>com.ibm.example.cdi.cdi.integration.bundle</integration.bundle.symbolic.name>
    <maven.compiler.source>11</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <new.integration.code.package>com.ibm.example.cdi</new.integration.code.package>
    <bom.artifact.id>bill-of-materials</bom.artifact.id>
    <integration.artifact.id>integration-code</integration.artifact.id>
    <esa.artifact.id>liberty-feature</esa.artifact.id>
    <pre.existing.library.package>org.apache.commons.lang3.concurrent</pre.existing.library.package>
    <feature.name>example-feature</feature.name>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.ibm.example.user.feature</groupId>
        <artifactId>${esa.artifact.id}</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>esa</type>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant