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

Quarkus Build with Maven Artefact Resolver Configuration Options #44484

Open
chbieri opened this issue Nov 13, 2024 · 1 comment
Open

Quarkus Build with Maven Artefact Resolver Configuration Options #44484

chbieri opened this issue Nov 13, 2024 · 1 comment
Labels
area/maven kind/bug Something isn't working

Comments

@chbieri
Copy link

chbieri commented Nov 13, 2024

Describe the bug

We use Maven with the quarkus-maven-plugin to build Quarkus applications on our CI system.

To improve caching, we attempted to use the enhanced local repository management (LRM) feature by separating the local repository for snapshots and releases (see Maven Local Repository Documentation).

Following the configuration guide here, we specified the following properties in the settings.xml:

<settings ...>
...
    <profiles>
	<profile>
            <id>split-repository</id>
            <properties>
                <aether.enhancedLocalRepository.split>true</aether.enhancedLocalRepository.split>
                <aether.enhancedLocalRepository.splitLocal>true</aether.enhancedLocalRepository.splitLocal>
                <aether.enhancedLocalRepository.splitRemote>true</aether.enhancedLocalRepository.splitRemote>
            </properties>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>split-repository</activeProfile>
    </activeProfiles>
</settings>

Expected behavior

The quarkus-maven-plugin or quarkus-maven-resolver should support all Maven artifact resolver options as outlined in this documentation.

Actual behavior

For most of the build process, this configuration works as expected, with artifacts resolving to either ~/.m2/repository/cached/releases or ~/.m2/repository/cached/snapshots.

However, during the quarkus:3.8.6:generate-code-tests phase, the build starts resolving all dependencies again under ~/.m2/repository/. We also attempted unsuccessfully to set these options in a .mvn/.jvm.config file in the project root.

Could you confirm if the quarkus-maven-plugin or quarkus-maven-resolver fully supports all Maven artifact resolver options?

How to Reproduce?

To reproduce this issue:

  1. Configure Maven's settings.xml as shown above to split the local repository for snapshots and releases.
  2. Add a sample Quarkus project with the quarkus-maven-plugin in the pom.xml, using version 3.8.6 or 3.15.1.
  3. delete ~/.m2/repository/
  4. Run the build command:
    mvn clean install

Observe that during the generate-code-tests phase, dependencies are unexpectedly resolved under ~/.m2/repository/ instead of the configured split directories.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@chbieri chbieri added the kind/bug Something isn't working label Nov 13, 2024
Copy link

quarkus-bot bot commented Nov 13, 2024

/cc @quarkusio/devtools (maven), @radcortez (config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maven kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants