Sounds like you have all the skills to make a PR for this. :-)
out the door, so that means we can test this theory out soon.
Iâve read up on the issue a bit and I do wonder if the âflattenâ plugin
may be exactly what is needed here.
My understanding of the issue as it stands (and please correct me if Iâm
wrong) is that the `bom` artifact
is stuck in an unpleasant place where it wants to inherit important
configuration (release, repos, license, etc)
related to its own release, but doing so also drags dependencyManagement
inappropriately into the bom.
To avoid this, we are currently copy+pasting the relevant POM bits between
parent and bom, and have some
franken-release process where the release manager can forget to release
the bom. This sucks.
The flatten-maven-plugin allows you to selectively transform a POM before publishing it.
So, we could have the bom pom inherit parent, and get the important
configuration for the Jetty build to succeed.
It can participate as a full module in the Jetty project with Jetty parent
as is desired, which means it also works with the release plugin.
During BOM build, we can invoke the `flatten` plugin as Felipe suggests,
and configure it to `keep` the dependencyManagement section as is.
We can also configure it to leave license, developers, whatever is really
necessary - and then strip out essentially every other section, especially
the parent.
Then, via the 'updatePomFile' configuration, it will replace the bom pom
with the flattened and cleaned up version.
This allows us to have our cake (the bom inherits build configuration from
parent) and eat it too (without passing it downstream to bom importers).
If this is a fair assessment of the problem as it stands, and you agree
the solution sounds workable,
we could open a PR for discussion with Felipe's changes as below.
What do you think?
Post by Olivier LamyHi
You should read the discussion here
https://github.com/eclipse/jetty.project/issues/1527
Post by Olivier LamyCheers
Olivier
Hi,
Not sure I understand the problem with the BOM. Adding a parent to the
jetty-bom like you do with the other modules and use flatten-maven-plugin
to clean up the BOM should work.
Post by Olivier Lamydiff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml
index abb972743e..0c4beadb73 100644
--- a/jetty-bom/pom.xml
+++ b/jetty-bom/pom.xml
@@ -1,8 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
">
Post by Olivier Lamy- <groupId>org.eclipse.jetty</groupId>
+ <parent>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-project</artifactId>
+ <version>9.4.14-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-bom</artifactId>
- <version>9.4.14-SNAPSHOT</version>
<name>Jetty :: Bom</name>
<description>Jetty BOM artifact</description>
<url>http://www.eclipse.org/jetty</url>
@@ -87,6 +90,40 @@
</plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>flatten-maven-plugin</artifactId>
+ <version>1.0.1</version>
+ <configuration>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
+ <flattenMode>oss</flattenMode>
+ <updatePomFile>true</updatePomFile>
+
<embedBuildProfileDependencies>true</embedBuildProfileDependencies>
Post by Olivier Lamy+ <pomElements>
+ <build>remove</build>
+ <dependencyManagement>keep</dependencyManagement>
+ </pomElements>
+ </configuration>
+ <executions>
+ <execution>
+ <id>flatten</id>
+ <goals>
+ <goal>flatten</goal>
+ </goals>
+ <phase>process-resources</phase>
+ </execution>
+ <execution>
+ <id>flatten.clean</id>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ <phase>clean</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
<dependencyManagement>
Post by Joakim ErdfeltYou are absolutely right, the jetty-bom is missing. :-(
This is because the jetty-bom is a bastard module that is impossible to
play nice within the maven, all plugins refuse to updates the versions
within it, as it's not quite within the reactor, nor capable of
participating within the normal build hierarchy due to the inane rules on
boms that force this behavior on the rest of the project.
https://github.com/eclipse/jetty.project/blob/jetty-9.4.13.v20181111/jetty-bom/pom.xml#L5
Post by Olivier LamyPost by Joakim ErdfeltUnfortunately, now that the tag jetty-9.4.13.v20181111 has been created
we cannot touch that tag (as they are referenced within the jar artifacts
themselves via both the ref and the commit ids).
Post by Olivier LamyPost by Joakim ErdfeltWe cannot release jetty-bom using the normal build tools and processes
now.
Post by Olivier LamyPost by Joakim ErdfeltThis will be a manual process, be aware that it can take a while to
sort out (up to a week).
Post by Olivier LamyPost by Joakim ErdfeltOn Mon, Nov 12, 2018 at 5:19 PM Steven Schlansker <
Hi Joakim,
Excited to try Jetty 9.4.13! However, it seems that the `bom` artifact
may have been left behind.
Post by Olivier LamyPost by Joakim ErdfeltAccording to Maven Central,
org.eclipse.jetty
Artifact ID
jetty-server
Latest Version
9.4.13.v20181111
org.eclipse.jetty
Artifact ID
jetty-bom
Latest Version
9.4.12.v20180830
I apologize if this is due to impatience coupled with inconsistent
mirroring delays or some other technical glitch, but it sure looks like the
`jetty-bom` artifact may not have been released.
Post by Olivier LamyPost by Joakim ErdfeltPost by Joakim ErdfeltThe Jetty team is happy to announce the immediate availability of a
newest release for the Eclipse Jetty 9.4.x branch.
Post by Olivier LamyPost by Joakim Erdfelt_______________________________________________
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
Post by Olivier LamyPost by Joakim Erdfelthttps://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
Post by Olivier LamyPost by Joakim Erdfelthttps://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
Post by Olivier Lamyhttps://www.eclipse.org/mailman/listinfo/jetty-users
--
Olivier
_______________________________________________
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
Post by Olivier Lamyhttps://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users