eclipse-ee4j / eclipse-ee4j/ee4j

Prepare for Maven 4

Open
#84 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
274
Forks
49
PR merge metrics
No merged PRs in 30d

Description

While doing some contributions to [eclipse-ee4j/krazo](https://github.com/eclipse-ee4j/krazo), I found that the project doesn't build on Maven 4. This is because its parent, maintained in [this repo](https://github.com/eclipse-ee4j/ee4j), 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.