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 Archetype generates hard-coded path #10825

Closed
richiethom opened this issue Jul 18, 2020 · 5 comments
Closed

Maven Archetype generates hard-coded path #10825

richiethom opened this issue Jul 18, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@richiethom
Copy link
Contributor

Describe the bug
The quarkus-amazon-lambda-http-archetype archetype generates a hard-coded path to maven.home in the maven-surefire-plugin plugin declaration:

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-plugin.version}</version>
                <configuration>
                    <systemPropertyVariables>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <maven.home>/opt/apache-maven</maven.home>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

Expected behavior
maven.home probably shouldn't be declared at all.

Actual behavior
The following declaration is generated:

<maven.home>/opt/apache-maven</maven.home>

To Reproduce
Steps to reproduce the behavior:

  1. Use the Amazon Lambda HTTP guide to generate a project using the artefact quarkus-amazon-lambda-http-archetype version 1.6.0.Final.
  2. Open the generated pom.xml
  3. Look at the maven-surefire-plugin declaration.

Environment (please complete the following information):

  • Output of uname -a or ver: Linux DESKTOP-GJJ95MV 4.19.104-microsoft-standard Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version: NA
  • GraalVM version (if different from Java): NA
  • Quarkus version or git rev: 1.6.0.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/rich/.sdkman/candidates/maven/current
Java version: 14.0.1, vendor: AdoptOpenJDK, runtime: /home/rich/.sdkman/candidates/java/14.0.1.hs-adpt
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.19.104-microsoft-standard", arch: "amd64", family: "unix"

Additional context
Note that Maven is not installed in the /opt/apache-maven directory, it is managed by SDKMan

@richiethom richiethom added the kind/bug Something isn't working label Jul 18, 2020
@quarkusbot
Copy link

/cc @quarkusio/devtools

@famod
Copy link
Member

famod commented Jul 18, 2020

Thanks for reporting this.

First quick feedback: maven.home is supposed to be there, but the placeholder should not be replaced (must happen at runtime instead).

@famod
Copy link
Member

famod commented Jul 18, 2020

Confirmed locally. I'll try to find out why this is happening...

Update: Does not happen with quarkus-azure-functions-http-archetype (countercheck to rule out a general archetype problem).

@famod
Copy link
Member

famod commented Jul 19, 2020

#10829 should fix this.

Workaround: Replace with <maven.home>${maven.home}</maven.home> (exactly like that, placeholder will be resolved at runtime)

@gsmet gsmet added this to the 1.6.1.Final milestone Jul 20, 2020
@gsmet
Copy link
Member

gsmet commented Jul 20, 2020

Fixed in #10845 .

@gsmet gsmet closed this as completed Jul 20, 2020
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.

4 participants