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

Prepare for Maven 4 #84

Open
mthmulders opened this issue Jan 1, 2023 · 1 comment
Open

Prepare for Maven 4 #84

mthmulders opened this issue Jan 1, 2023 · 1 comment

Comments

@mthmulders
Copy link

While doing some contributions to eclipse-ee4j/krazo, I found that the project doesn't build on Maven 4. This is because its parent, maintained in this repo, declares a few repositories with an URL that is an expression. This is no longer supported in Maven 4:

Apache Maven 4.0.0-alpha-4-SNAPSHOT (fbdf109b34947c5cc64b8d584d0c3010351e613b)
Maven home: /opt/homebrew/Cellar/maven-snapshot/4.0.0-alpha-4-20221231.163631-23/libexec
Java version: 11.0.17, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_NL, platform encoding: UTF-8
OS name: "mac os x", version: "13.1", arch: "aarch64", family: "mac"
[INFO] Scanning for projects...
[ERROR] Some problems were encountered while processing the POMs
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.eclipse.krazo:krazo-parent:3.1.0-SNAPSHOT (/Users/maarten/Code/open-source/krazo/pom.xml) has 4 errors
[ERROR]     'profiles.profile[snapshots].repositories.repository.[sonatype-nexus-snapshots].url' contains an expression but should be a constant. @ org.eclipse.ee4j:project:1.0.6, /Users/maarten/.m2/repository/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom, line 252, column 26
[ERROR]     'profiles.profile[snapshots].pluginRepositories.pluginRepository.[sonatype-nexus-snapshots].url' contains an expression but should be a constant. @ org.eclipse.ee4j:project:1.0.6, /Users/maarten/.m2/repository/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom, line 265, column 26
[ERROR]     'profiles.profile[staging].repositories.repository.[sonatype-nexus-staging].url' contains an expression but should be a constant. @ org.eclipse.ee4j:project:1.0.6, /Users/maarten/.m2/repository/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom, line 289, column 26
[ERROR]     'profiles.profile[staging].pluginRepositories.pluginRepository.[sonatype-nexus-staging].url' contains an expression but should be a constant. @ org.eclipse.ee4j:project:1.0.6, /Users/maarten/.m2/repository/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom, line 302, column 26
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Also, the project doesn't declare which version of the Maven Install Plugin it uses - thus making it dependent on the Maven version that the user has. In Maven 4, this will trigger a warning:

[WARNING] Version not locked for default bindings plugins [maven-install-plugin], you should define versions in pluginManagement section of your pom.xml or parent

If desired, I can contribute a PR that resolves these issues.

@arjantijms
Copy link
Contributor

Such PR would be most welcome I think, and thanks for starting to test EE4J projects with Maven 4 :)

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