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

Missing DependencyFilterUtils on Maven < 3.9.0 #7

Closed
runeflobakk opened this issue Mar 18, 2024 · 3 comments
Closed

Missing DependencyFilterUtils on Maven < 3.9.0 #7

runeflobakk opened this issue Mar 18, 2024 · 3 comments

Comments

@runeflobakk
Copy link

Hello, thank you for the 2.2.0 release!
Just wanted to give a heads-up that using the 2.2.0 plugin on GitHub actions will fail with the default Maven setup offered currently by the latest setup-java@v4, as the Maven version is 3.8.8, and the plugin really requires Maven 3.9.0.

Running the plugin in this environment will give the following error:

Error: Failed to execute goal org.patrodyne.jvnet:hisrc-higherjaxb-maven-plugin:2.2.0:generate (default)
on project myproject: Execution default of goal org.patrodyne.jvnet:hisrc-higherjaxb-maven-plugin:2.2.0:generate
failed: A required class was missing while executing org.patrodyne.jvnet:hisrc-higherjaxb-maven-plugin:2.2.0:generate:
org/eclipse/aether/util/filter/DependencyFilterUtils

The DependencyFilterUtils class can be found in maven-resolver-util, and adding it as a declared dependency to the plugin will enable the execution to complete successfully:

<plugin>
    <groupId>org.patrodyne.jvnet</groupId>
    <artifactId>hisrc-higherjaxb-maven-plugin</artifactId>
    <version>2.2.0</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-util</artifactId>
            <version>1.9.18</version>
        </dependency>
    </dependencies>
</plugin>

Earlier versions will also work. I tested with 1.6.2.

They seem unwilling to upgrade and/or add any configuration support to set Maven version in the official setup-java action: actions/setup-java#457 and instead refer to community actions for providing specific Maven versions on GitHub Actions.

@patrodyne
Copy link
Owner

Thank you for the report. I have updated the maven-min.version / requireMavenVersion in the maven-enforcer-plugin to 3.9.0 for the next release.

@runeflobakk
Copy link
Author

Just curious, but are you using any Maven Plugin API version 3.9.0-specific features, or would it be possible to downgrade to v3.8.8 to make the plugin work out-of-the-box on GitHub actions?

@patrodyne
Copy link
Owner

Yes, since v2.2.0, the HiSrc HigherJAXB Maven Plugins have been refactored to eliminate the deprecated maven-compat dependency in favor of the Maven Resolver/Aether dependencies, Issue patrodyne/hisrc-basicjaxb#17 and Issue #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants