Drop expressions in repository URLs and manage version of Maven Install Plugin#85
Conversation
|
Thanks, @mthmulders! |
chkal
left a comment
There was a problem hiding this comment.
LGTM. Although, I wonder if any project customizes sonatypeOssDistMgmtNexusUrl by changing the value via the command line for some reason.
Interesting point. If they do, I think their path forward would be to add the corresponding |
IMO - the actual definitions of repositories that are EF infrastructure dependent are the only reason to inherit from this parent... Why would one change
Bump the version to 2? |
I'm not sure if anybody is actually changing the repository URL this way. I was just always wondering why the URL was a maven property and not simply inlined into the corresponding |
|
|
Now - with maven 4 helpfully rejecting expressions in url - if sonatype changes host name or EF migrates to different service - update in 6 places will be needed. Good. |
|
If no-one objects, I'll bump the version number to 2.0.0 and prepare a release after merging this. |
|
We haven't yet addressed the issue of signing artifacts. I guess we should consider solving that before bumping to 2.0.0 and releasing. |
There is also NEXUS-36533/MNG-7627. It might take few more days before final maven 4 is published. Until then child projects can still use maven 3, and do some staging and releasing to confirm that removed property does not hurt them. Signing and deploying issues can be solved separately and can result with new release(s). However - the subject of this PR could be changed a bit as this is not complete maven 4 preparation we see. |
How about "Drop expressions in repository URLs to prepare for Maven 4"? |
|
How about "Drop expressions in repository URL and manage m-install-p"? This Maven 4 part is not important IMO. |
It's unlikely being about projects themselves but rather about organizations rebuilding projects from scratch and republishing them on their own infra to their own internal repository for whatever reason behind that (I can imagine security, various regulations etc). Being able to override the default repo through the simple command line property makes this easy to do. I doubt security policies of such organizations allows exposing names/ips of internal servers on the internet/public places. |
Nothing like that was mentioned when property was introduced. Such organizations will need to adapt for this. Switch to using different profile with custom repositories defined. And - to allow to use property in repository definition again - to raise MNG for maven to do so. It's not up to this project. |
Probably nobody explicitly asked or it was obvious that the pattern used in various oss-parents used by Sonatype is being followed. JBBUILD-567 (behind this commit) may have some info too, but who knows, the issue is not public.
Assuming the author of this PR is a maven committer, he can do it should he see the need for it. |
I suppose it's no longer the case, as with currently managed plugin and with maven 4.0.0-beta-3 they seem to cooperate: |
Correct. That statement is roughly two years old. At the time of writing, there was no plan to make the Maven GPG Plugin work with Maven 4, but a lot has changed since. |
|
Recent snapshots of Maven 4 (post RC3) can no longer build Jakarta 10 based projects, due to these expressions in the ee4j pom. I am using Apache Maven 4.0.0-rc-4-SNAPSHOT (4ac3b14be2668ea70740dd94e486dc877b83d38a). My project includes this: <dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-bom</artifactId>
<version>10.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>Invoking Adding Maven 4 will prevent any uninterpolated value from entering its Resolver, as the Resolver will take it for granted. The Resolver has no idea about interpolation nor placeholders. To the Resolver, all these strings (gav, urls, etc) are opaque. Thinking out loud: I think this means that if Maven 4 comes out, existing projects using Jakarta EE 10 (and probably older) will not be able to migrate to Maven 4. Would it be possible to create a patch release of the EE4J pom, and subsequently create patch releases of the Jakarta EE Platform BOM, so the jakarta.platform:jakarta.jakartaee-bom would refer to a version of the org.eclipse.ee4j:project:pom with these expressions in repository URLs removed? |
|
Hi, I just noticed this PR. Can this be reverted? Furthermore, this PR doesn't fix the maven 4 issue. The issue is in EclipseLink, not here. |
|
The pluginManagement bit is obviously fine and can be left there |
Oh, you did?
Can't https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#altDeploymentRepository be used in such case? |
It's supposed to work but doesn't |
Do you know the way to share that with the deploy plugin project you are using? Or is it already known issue? |
|
@mthmulders @ivargrimstad |
This one is hard to debug, issues are integrated with the release plugin, deploy plugin, interactions, etc., |
EL is not the only child. It just happened that something is observed with EL. And - to make sure - with Maven 4, right? Maven 3 works fine, doesn't it? |
|
EclipseLink issue created: eclipse-ee4j/eclipselink#2416 |
EclipseLink is the only one that I know of that uses |
|
|
Exactly. The only issue is with EclipseLink. It only "looks like" it's with EE4j POM, which is why @mthmulders mis-diagnosed the issue in the first place, just like I did initially until @cstamas correctly diagnosed the problem with EclipseLink while we were troubleshooting it together - thank you! |
|
This PR also breaks work done in #57 |
|
Up to this moment I believed expressions won't be supported for repositories in Maven 4 at all. I'm glad to unlearn that. |
|
You are right. In built projects they are limited. |
| </mailingLists> | ||
|
|
||
| <properties> | ||
| <sonatypeOssDistMgmtNexusUrl>https://jakarta.oss.sonatype.org/</sonatypeOssDistMgmtNexusUrl> |
There was a problem hiding this comment.
There was a problem hiding this comment.
Indeed. This PR really needs to be reverted ASAP @ivargrimstad
Thank you
Following the conversation in #84, here's a pull request that does the trivial changes:
There's one more thing that must be done. If you would attempt to make a release, it would fail with
The Sign Maven Plugin looks like a candidate replacement. Its website says it works on Maven 3.6 and is ready for Maven 4 with Consumer POM.
Since the Sign Maven Plugin does not look like a drop-in replacement to me, and since it is not part of the ASF Maven project, I chose not to include it (yet) in this PR. If the Eclipse EE4J project decides to adopt that plugin, it could be part of this PR.