Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 9.4.13 Released - Supporting JDK 11 bytecode and JPMS

Olivier, Felipe, Joakim:

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?


> On Nov 13, 2018, at 3:29 AM, Olivier Lamy <olamy@xxxxxxxxxxx> wrote:
> 
> Hi 
> You should read the discussion here https://github.com/eclipse/jetty.project/issues/1527 
> Cheers
> Olivier
> 
> 
> On Tue, Nov 13, 2018 at 9:23 PM Filipe Sousa <natros@xxxxxxxxx> wrote:
> 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.
> 
> diff --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";>
> -  <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>
> +          <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>
> 
> 
>> On 13 Nov 2018, at 00:45, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
>> 
>> You 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
>> 
>> Unfortunately, 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).
>> We cannot release jetty-bom using the normal build tools and processes now.
>> This will be a manual process, be aware that it can take a while to sort out (up to a week).
>> 
>> Joakim Erdfelt / joakim@xxxxxxxxxxx
>> 
>> On Mon, Nov 12, 2018 at 5:19 PM Steven Schlansker <stevenschlansker@xxxxxxxxx> wrote:
>> Hi Joakim,
>> 
>> Excited to try Jetty 9.4.13!  However, it seems that the `bom` artifact may have been left behind.
>> 
>> According 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.
>> 
>> > On Nov 12, 2018, at 11:23 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
>> > 
>> > The Jetty team is happy to announce the immediate availability of a newest release for the Eclipse Jetty 9.4.x branch.
>> > ...
>> 
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/jetty-users
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/jetty-users
> 
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
> 
> 
> -- 
> Olivier
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users



Back to the top