You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Slawomir Jaranowski <s....@gmail.com> on 2023/07/25 18:56:04 UTC

plexus-utils 4.x and Xpp3DomBuilder

Hi

I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
maven-enforcer ....

In maven-enforcer (and in many other plugins ...) is used, code like:

            Xpp3Dom enforcerRules = Xpp3DomBuilder.build(descriptorStream,
"UTF-8");

Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
Maven 3.x exports

    <!-- plexus-utils (for DOM-type fields in maven-model) -->
    <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>

<exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>

<exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>

<exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>

It is very magical that we export classes but not export artifact
which contains those classes ...

so incompatibilite code for Xpp3Dom is used ...

Any hints on how to process it.

-- 
Sławomir Jaranowski

RE: plexus-utils 4.x and Xpp3DomBuilder

Posted by Jeremy Landis <je...@hotmail.com>.
Sorry for the noise on this.  After further looking, in our super pom, we were overriding plexus utils on multiple plugins, one of which was the site plugin.  Since those did not have the override on plexus xml set to 3 and the fact we override back to plexus utils 4 using same property value, it caused the conflict.  After resolving that it seems fine now.  Thanks for the adjustments done on this effort!

Thanks,

Jeremy

-----Original Message-----
From: Slawomir Jaranowski <s....@gmail.com> 
Sent: Saturday, September 16, 2023 2:55 PM
To: Maven Developers List <de...@maven.apache.org>
Subject: Re: plexus-utils 4.x and Xpp3DomBuilder

sob., 16 wrz 2023 o 16:19 Jeremy Landis <je...@hotmail.com>
napisał(a):

> Site plugin on maven release doesn't like if this was used this way.
> Using the site 3 series.
>

Can you provide more details or reproduce for the site plugin?


>
> Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for 
> Android<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F
> %2Faka.ms%2FAAb9ysg&data=05%7C01%7C%7C740d82224eff4fd9e67e08dbb6e66dde
> %7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638304873032160179%7CUnk
> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw
> iLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eNPNaJm%2FfYf2cP9avC0fCJxHU0GSHT
> ByUiUvYL9fwMs%3D&reserved=0>
> ________________________________
> From: Slawomir Jaranowski <s....@gmail.com>
> Sent: Saturday, September 16, 2023 9:50:51 AM
> To: Maven Developers List <de...@maven.apache.org>
> Subject: Re: plexus-utils 4.x and Xpp3DomBuilder
>
> śr., 13 wrz 2023 o 08:47 Hervé Boutemy <he...@free.fr> napisał(a):
>
> > can you try plexus-xml 3.0.0 and confirm this works as you expected 
> > initially, please?
> >
> >
> plexus-utils 4.x and plexsu-xml 3.0.0 can be used on both Maven 3.x 
> and 4.x
>
> So now it will be ok.
>
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu
> b.com%2Fapache%2Fmaven-enforcer%2Fpull%2F291&data=05%7C01%7C%7C740d822
> 24eff4fd9e67e08dbb6e66dde%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7
> C638304873032160179%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hbZ%2BJ
> vidhx2643PZW2AKmGBQjP%2B4uKLo43iG1L2qB%2F8%3D&reserved=0
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fapache%2Fmaven-enforcer%2Fpull%2F291&data=05%7C01%7C%7C740d82
> 224eff4fd9e67e08dbb6e66dde%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%
> 7C638304873032160179%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQI
> joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hbZ%2B
> Jvidhx2643PZW2AKmGBQjP%2B4uKLo43iG1L2qB%2F8%3D&reserved=0>
>
> Regards,
> >
> > Hervé
> >
> > Le mardi 25 juillet 2023, 20:56:04 CEST Slawomir Jaranowski a écrit :
> > > Hi
> > >
> > > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 
> > > 4.x
> in
> > > maven-enforcer ....
> > >
> > > In maven-enforcer (and in many other plugins ...) is used, code like:
> > >
> > >             Xpp3Dom enforcerRules =
> > Xpp3DomBuilder.build(descriptorStream,
> > > "UTF-8");
> > >
> > > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> > but
> > > Maven 3.x exports
> > >
> > >     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > >
> >  
> > <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPacka
> > ge>
> > >
> > >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</expo
> rtedPa
> > > ckage>
> > >
> > >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserExcept
> ion</e
> > > xportedPackage>
> > >
> > >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</expo
> rtedPa
> > > ckage>
> > >
> > > It is very magical that we export classes but not export artifact 
> > > which contains those classes ...
> > >
> > > so incompatibilite code for Xpp3Dom is used ...
> > >
> > > Any hints on how to process it.
> >
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For 
> > additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> --
> Sławomir Jaranowski
>


--
Sławomir Jaranowski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Slawomir Jaranowski <s....@gmail.com>.
sob., 16 wrz 2023 o 16:19 Jeremy Landis <je...@hotmail.com>
napisał(a):

> Site plugin on maven release doesn't like if this was used this way.
> Using the site 3 series.
>

Can you provide more details or reproduce for the site plugin?


>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android<https://aka.ms/AAb9ysg>
> ________________________________
> From: Slawomir Jaranowski <s....@gmail.com>
> Sent: Saturday, September 16, 2023 9:50:51 AM
> To: Maven Developers List <de...@maven.apache.org>
> Subject: Re: plexus-utils 4.x and Xpp3DomBuilder
>
> śr., 13 wrz 2023 o 08:47 Hervé Boutemy <he...@free.fr> napisał(a):
>
> > can you try plexus-xml 3.0.0 and confirm this works as you expected
> > initially,
> > please?
> >
> >
> plexus-utils 4.x and plexsu-xml 3.0.0 can be used on both Maven 3.x and 4.x
>
> So now it will be ok.
>
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fmaven-enforcer%2Fpull%2F291&data=05%7C01%7C%7Ce6745d0f864b45e3466208dbb6bc020d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638304690830758434%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KsmhwtW2HAnr8Abgq3NzrcC9AsKeKwvnI1UaKCseMQg%3D&reserved=0
> <https://github.com/apache/maven-enforcer/pull/291>
>
> Regards,
> >
> > Hervé
> >
> > Le mardi 25 juillet 2023, 20:56:04 CEST Slawomir Jaranowski a écrit :
> > > Hi
> > >
> > > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x
> in
> > > maven-enforcer ....
> > >
> > > In maven-enforcer (and in many other plugins ...) is used, code like:
> > >
> > >             Xpp3Dom enforcerRules =
> > Xpp3DomBuilder.build(descriptorStream,
> > > "UTF-8");
> > >
> > > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> > but
> > > Maven 3.x exports
> > >
> > >     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > >
> >  <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> > >
> > >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPa
> > > ckage>
> > >
> > >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</e
> > > xportedPackage>
> > >
> > >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPa
> > > ckage>
> > >
> > > It is very magical that we export classes but not export artifact
> > > which contains those classes ...
> > >
> > > so incompatibilite code for Xpp3Dom is used ...
> > >
> > > Any hints on how to process it.
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> --
> Sławomir Jaranowski
>


-- 
Sławomir Jaranowski

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Jeremy Landis <je...@hotmail.com>.
Site plugin on maven release doesn't like if this was used this way.  Using the site 3 series.

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Slawomir Jaranowski <s....@gmail.com>
Sent: Saturday, September 16, 2023 9:50:51 AM
To: Maven Developers List <de...@maven.apache.org>
Subject: Re: plexus-utils 4.x and Xpp3DomBuilder

śr., 13 wrz 2023 o 08:47 Hervé Boutemy <he...@free.fr> napisał(a):

> can you try plexus-xml 3.0.0 and confirm this works as you expected
> initially,
> please?
>
>
plexus-utils 4.x and plexsu-xml 3.0.0 can be used on both Maven 3.x and 4.x

So now it will be ok.

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fmaven-enforcer%2Fpull%2F291&data=05%7C01%7C%7Ce6745d0f864b45e3466208dbb6bc020d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638304690830758434%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KsmhwtW2HAnr8Abgq3NzrcC9AsKeKwvnI1UaKCseMQg%3D&reserved=0<https://github.com/apache/maven-enforcer/pull/291>

Regards,
>
> Hervé
>
> Le mardi 25 juillet 2023, 20:56:04 CEST Slawomir Jaranowski a écrit :
> > Hi
> >
> > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> > maven-enforcer ....
> >
> > In maven-enforcer (and in many other plugins ...) is used, code like:
> >
> >             Xpp3Dom enforcerRules =
> Xpp3DomBuilder.build(descriptorStream,
> > "UTF-8");
> >
> > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> but
> > Maven 3.x exports
> >
> >     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> >
>  <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPa
> > ckage>
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</e
> > xportedPackage>
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPa
> > ckage>
> >
> > It is very magical that we export classes but not export artifact
> > which contains those classes ...
> >
> > so incompatibilite code for Xpp3Dom is used ...
> >
> > Any hints on how to process it.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

--
Sławomir Jaranowski

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Slawomir Jaranowski <s....@gmail.com>.
śr., 13 wrz 2023 o 08:47 Hervé Boutemy <he...@free.fr> napisał(a):

> can you try plexus-xml 3.0.0 and confirm this works as you expected
> initially,
> please?
>
>
plexus-utils 4.x and plexsu-xml 3.0.0 can be used on both Maven 3.x and 4.x

So now it will be ok.

https://github.com/apache/maven-enforcer/pull/291

Regards,
>
> Hervé
>
> Le mardi 25 juillet 2023, 20:56:04 CEST Slawomir Jaranowski a écrit :
> > Hi
> >
> > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> > maven-enforcer ....
> >
> > In maven-enforcer (and in many other plugins ...) is used, code like:
> >
> >             Xpp3Dom enforcerRules =
> Xpp3DomBuilder.build(descriptorStream,
> > "UTF-8");
> >
> > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> but
> > Maven 3.x exports
> >
> >     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> >
>  <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPa
> > ckage>
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</e
> > xportedPackage>
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPa
> > ckage>
> >
> > It is very magical that we export classes but not export artifact
> > which contains those classes ...
> >
> > so incompatibilite code for Xpp3Dom is used ...
> >
> > Any hints on how to process it.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

-- 
Sławomir Jaranowski

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
can you try plexus-xml 3.0.0 and confirm this works as you expected initially, 
please?

Regards,

Hervé

Le mardi 25 juillet 2023, 20:56:04 CEST Slawomir Jaranowski a écrit :
> Hi
> 
> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> maven-enforcer ....
> 
> In maven-enforcer (and in many other plugins ...) is used, code like:
> 
>             Xpp3Dom enforcerRules = Xpp3DomBuilder.build(descriptorStream,
> "UTF-8");
> 
> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
> Maven 3.x exports
> 
>     <!-- plexus-utils (for DOM-type fields in maven-model) -->
>     <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPa
> ckage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</e
> xportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPa
> ckage>
> 
> It is very magical that we export classes but not export artifact
> which contains those classes ...
> 
> so incompatibilite code for Xpp3Dom is used ...
> 
> Any hints on how to process it.





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
plexus-xml 3.0.0 released, compatible with Maven 3

Maven Archetype upgraded as a proof of work:
https://issues.apache.org/jira/browse/ARCHETYPE-648

= upgrading plexus-utils 3 to plexus-utils 4 + plexus-xml 3 (when XML APIs 
required) is a breeze

what has to be avoided is upgrading plexus-xml 3 to 4, as it breaks (for now) 
running your code in Maven 3 but requires Maven 4


Thanks for the feedback, this helped us clarify the plan

Regards,

Hervé

Le dimanche 10 septembre 2023, 18:50:27 CEST Hervé Boutemy a écrit :
> working on it, I created a branch for plexus-xml 3.x:
> https://github.com/codehaus-plexus/plexus-xml/tree/3.x
> 
> we should probably release such plexus-xml 3 that is the "normal" usual XML
> code that we used for years, extracted from plexus-utils 3
> 
> plexus-xml 4 is currently only for Maven 4
> 
> 
> FYI, I tried to upgrade plexus-utils in a few Maven-maintained plugins
> My findings are:
> - many plugins use XML API, sometime just for Xpp3ParserException from Maven
> core API, sometimes because they use Modello to read/write XML...
> then we have many Maven-maintained plugins to test strategies
> 
> - a few plugins don't use XML at all: in this case, upgrading plexus-utils
> from 3 to 4 is feasible just now:
> https://github.com/apache/maven-jarsigner-plugin/pull/12
> 
> Regards,
> 
> Hervé
> 
> Le dimanche 10 septembre 2023, 10:11:14 CEST Sylwester Lachiewicz a écrit :
> > And looks like this apply not only to plugins but also to shared libs for
> > maven (ASF also plexus and mojohous)
> > 
> > Sylwester
> > 
> > niedz., 10 wrz 2023, 09:00 użytkownik Hervé Boutemy
> > <he...@free.fr>
> > 
> > napisał:
> > > Le samedi 9 septembre 2023, 19:33:51 CEST Václav Haisman a écrit :
> > > > On 25. 07. 23 20:56, Slawomir Jaranowski wrote:
> > > > > Hi
> > > > > 
> > > > > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml
> > > > > 4.x
> > > 
> > > in
> > > 
> > > > > maven-enforcer ....
> > > > > 
> > > > > In maven-enforcer (and in many other plugins ...) is used, code 
like:
> > > > >              Xpp3Dom enforcerRules =
> > > > >              Xpp3DomBuilder.build(descriptorStream,
> > > > > 
> > > > > "UTF-8");
> > > > > 
> > > > > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml
> > > > > ....
> > > 
> > > but
> > > 
> > > > > Maven 3.x exports
> > > > > 
> > > > >      <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackag
> > > 
> > > > >      e>
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</export
> > > ed
> > > 
> > > > > Package>
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserExceptio
> > > n<
> > > 
> > > > > /exportedPackage>
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</export
> > > ed
> > > 
> > > > > Package>
> > > > > 
> > > > > It is very magical that we export classes but not export artifact
> > > > > which contains those classes ...
> > > > > 
> > > > > so incompatibilite code for Xpp3Dom is used ...
> > > > > 
> > > > > Any hints on how to process it.
> > > > 
> > > > So, what is the takeaway of this tread for casual Maven plugin
> > > > developers like me? Should I avoid plexus-utils 4.x in Maven 3
> > > > plugins?
> > > 
> > > more precisely: don't upgrade plexus-utils to 4 *if you need plexus-xml*
> > > 
> > > our intent of splitting concerns between general non-XML utils vs XML is
> > > a
> > > success: upgrading plexus-utils will make clear which plugins
> > > 
> > > but when you need XML details in your plugin = where Maven core has an
> > > impact,
> > > we are not clear yet on how to make the plexus xml update Maven 3 and 4
> > > compliant at the same time
> > > 
> > > this thread needs to continue because we're not yet at the final
> > > conclusion,
> > > 
> > > but this intermediate small message can be used for now:
> > >   don't upgrade plexus-utils to 4 *if you need plexus-xml*
> > > 
> > > Regards,
> > > 
> > > Hervé
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
working on it, I created a branch for plexus-xml 3.x:
https://github.com/codehaus-plexus/plexus-xml/tree/3.x

we should probably release such plexus-xml 3 that is the "normal" usual XML 
code that we used for years, extracted from plexus-utils 3

plexus-xml 4 is currently only for Maven 4


FYI, I tried to upgrade plexus-utils in a few Maven-maintained plugins
My findings are:
- many plugins use XML API, sometime just for Xpp3ParserException from Maven 
core API, sometimes because they use Modello to read/write XML...
then we have many Maven-maintained plugins to test strategies

- a few plugins don't use XML at all: in this case, upgrading plexus-utils 
from 3 to 4 is feasible just now:
https://github.com/apache/maven-jarsigner-plugin/pull/12

Regards,

Hervé

Le dimanche 10 septembre 2023, 10:11:14 CEST Sylwester Lachiewicz a écrit :
> And looks like this apply not only to plugins but also to shared libs for
> maven (ASF also plexus and mojohous)
> 
> Sylwester
> 
> niedz., 10 wrz 2023, 09:00 użytkownik Hervé Boutemy <he...@free.fr>
> 
> napisał:
> > Le samedi 9 septembre 2023, 19:33:51 CEST Václav Haisman a écrit :
> > > On 25. 07. 23 20:56, Slawomir Jaranowski wrote:
> > > > Hi
> > > > 
> > > > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x
> > 
> > in
> > 
> > > > maven-enforcer ....
> > > > 
> > > > In maven-enforcer (and in many other plugins ...) is used, code like:
> > > >              Xpp3Dom enforcerRules =
> > > >              Xpp3DomBuilder.build(descriptorStream,
> > > > 
> > > > "UTF-8");
> > > > 
> > > > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> > 
> > but
> > 
> > > > Maven 3.x exports
> > > > 
> > > >      <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackag
> > 
> > > >      e>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exported
> > 
> > > > Package>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException<
> > 
> > > > /exportedPackage>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exported
> > 
> > > > Package>
> > > > 
> > > > It is very magical that we export classes but not export artifact
> > > > which contains those classes ...
> > > > 
> > > > so incompatibilite code for Xpp3Dom is used ...
> > > > 
> > > > Any hints on how to process it.
> > > 
> > > So, what is the takeaway of this tread for casual Maven plugin
> > > developers like me? Should I avoid plexus-utils 4.x in Maven 3 plugins?
> > 
> > more precisely: don't upgrade plexus-utils to 4 *if you need plexus-xml*
> > 
> > our intent of splitting concerns between general non-XML utils vs XML is a
> > success: upgrading plexus-utils will make clear which plugins
> > 
> > but when you need XML details in your plugin = where Maven core has an
> > impact,
> > we are not clear yet on how to make the plexus xml update Maven 3 and 4
> > compliant at the same time
> > 
> > this thread needs to continue because we're not yet at the final
> > conclusion,
> > 
> > but this intermediate small message can be used for now:
> >   don't upgrade plexus-utils to 4 *if you need plexus-xml*
> > 
> > Regards,
> > 
> > Hervé
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Sylwester Lachiewicz <sl...@gmail.com>.
And looks like this apply not only to plugins but also to shared libs for
maven (ASF also plexus and mojohous)

Sylwester

niedz., 10 wrz 2023, 09:00 użytkownik Hervé Boutemy <he...@free.fr>
napisał:

> Le samedi 9 septembre 2023, 19:33:51 CEST Václav Haisman a écrit :
> > On 25. 07. 23 20:56, Slawomir Jaranowski wrote:
> > > Hi
> > >
> > > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x
> in
> > > maven-enforcer ....
> > >
> > > In maven-enforcer (and in many other plugins ...) is used, code like:
> > >              Xpp3Dom enforcerRules =
> > >              Xpp3DomBuilder.build(descriptorStream,
> > >
> > > "UTF-8");
> > >
> > > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> but
> > > Maven 3.x exports
> > >
> > >      <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > >
> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackag
> > >      e>
> > >
> > >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exported
> > > Package>
> > >
> > >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException<
> > > /exportedPackage>
> > >
> > >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exported
> > > Package>
> > >
> > > It is very magical that we export classes but not export artifact
> > > which contains those classes ...
> > >
> > > so incompatibilite code for Xpp3Dom is used ...
> > >
> > > Any hints on how to process it.
> >
> > So, what is the takeaway of this tread for casual Maven plugin
> > developers like me? Should I avoid plexus-utils 4.x in Maven 3 plugins?
>
> more precisely: don't upgrade plexus-utils to 4 *if you need plexus-xml*
>
> our intent of splitting concerns between general non-XML utils vs XML is a
> success: upgrading plexus-utils will make clear which plugins
>
> but when you need XML details in your plugin = where Maven core has an
> impact,
> we are not clear yet on how to make the plexus xml update Maven 3 and 4
> compliant at the same time
>
> this thread needs to continue because we're not yet at the final
> conclusion,
> but this intermediate small message can be used for now:
>   don't upgrade plexus-utils to 4 *if you need plexus-xml*
>
> Regards,
>
> Hervé
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
Le samedi 9 septembre 2023, 19:33:51 CEST Václav Haisman a écrit :
> On 25. 07. 23 20:56, Slawomir Jaranowski wrote:
> > Hi
> > 
> > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> > maven-enforcer ....
> > 
> > In maven-enforcer (and in many other plugins ...) is used, code like:
> >              Xpp3Dom enforcerRules =
> >              Xpp3DomBuilder.build(descriptorStream,
> > 
> > "UTF-8");
> > 
> > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
> > Maven 3.x exports
> > 
> >      <!-- plexus-utils (for DOM-type fields in maven-model) -->
> >      <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackag
> >      e>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exported
> > Package>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException<
> > /exportedPackage>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exported
> > Package>
> > 
> > It is very magical that we export classes but not export artifact
> > which contains those classes ...
> > 
> > so incompatibilite code for Xpp3Dom is used ...
> > 
> > Any hints on how to process it.
> 
> So, what is the takeaway of this tread for casual Maven plugin
> developers like me? Should I avoid plexus-utils 4.x in Maven 3 plugins?

more precisely: don't upgrade plexus-utils to 4 *if you need plexus-xml*

our intent of splitting concerns between general non-XML utils vs XML is a 
success: upgrading plexus-utils will make clear which plugins 

but when you need XML details in your plugin = where Maven core has an impact, 
we are not clear yet on how to make the plexus xml update Maven 3 and 4 
compliant at the same time

this thread needs to continue because we're not yet at the final conclusion, 
but this intermediate small message can be used for now:
  don't upgrade plexus-utils to 4 *if you need plexus-xml*

Regards,

Hervé



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Václav Haisman <vh...@gmail.com>.
On 25. 07. 23 20:56, Slawomir Jaranowski wrote:
> Hi
> 
> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> maven-enforcer ....
> 
> In maven-enforcer (and in many other plugins ...) is used, code like:
> 
>              Xpp3Dom enforcerRules = Xpp3DomBuilder.build(descriptorStream,
> "UTF-8");
> 
> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
> Maven 3.x exports
> 
>      <!-- plexus-utils (for DOM-type fields in maven-model) -->
>      <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
> 
> It is very magical that we export classes but not export artifact
> which contains those classes ...
> 
> so incompatibilite code for Xpp3Dom is used ...
> 
> Any hints on how to process it.
> 

So, what is the takeaway of this tread for casual Maven plugin 
developers like me? Should I avoid plexus-utils 4.x in Maven 3 plugins?

-- 
VH


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
right conclusion

Le mercredi 26 juillet 2023, 06:55:10 CEST Christoph Läubrich a écrit :
> I tried the same with Tycho and the conclusion was that a maven plugin
> can currently not upgrade to plexus-xml4 if you still want to support
> maven 3.x
> 
> Am 25.07.23 um 20:56 schrieb Slawomir Jaranowski:
> > Hi
> > 
> > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> > maven-enforcer ....
> > 
> > In maven-enforcer (and in many other plugins ...) is used, code like:
> >              Xpp3Dom enforcerRules =
> >              Xpp3DomBuilder.build(descriptorStream,
> > 
> > "UTF-8");
> > 
> > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
> > Maven 3.x exports
> > 
> >      <!-- plexus-utils (for DOM-type fields in maven-model) -->
> >      <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackag
> >      e>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exported
> > Package>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException<
> > /exportedPackage>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exported
> > Package>
> > 
> > It is very magical that we export classes but not export artifact
> > which contains those classes ...
> > 
> > so incompatibilite code for Xpp3Dom is used ...
> > 
> > Any hints on how to process it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Christoph Läubrich <la...@laeubi-soft.de>.
I tried the same with Tycho and the conclusion was that a maven plugin 
can currently not upgrade to plexus-xml4 if you still want to support 
maven 3.x

Am 25.07.23 um 20:56 schrieb Slawomir Jaranowski:
> Hi
> 
> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> maven-enforcer ....
> 
> In maven-enforcer (and in many other plugins ...) is used, code like:
> 
>              Xpp3Dom enforcerRules = Xpp3DomBuilder.build(descriptorStream,
> "UTF-8");
> 
> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
> Maven 3.x exports
> 
>      <!-- plexus-utils (for DOM-type fields in maven-model) -->
>      <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
> 
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
> 
> It is very magical that we export classes but not export artifact
> which contains those classes ...
> 
> so incompatibilite code for Xpp3Dom is used ...
> 
> Any hints on how to process it.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
now that plexus-xml has more details, I see the key point causing the most 
issues: it uses not only maven-xml-api but also maven-xml-impl

maven-xml-impl is the Maven 4-specific reimplementation of XML parsing that is 
causing the incompatibility

probably that this Maven XML Implementation component should be added to the 
list of libraries that deserve extracting from Maven core release cycle to 
have a dedicated Maven Shared Component. This won't solve the compatibility 
issue that started this thread, but a least go in the right direction by 
making things more clear: today, it's too much magic and inter-dependencies 
with Maven core

Here is the list of Maven core components that should IMHO be extracted as 
separate Maven Shared Component:
- Meta Annotation:
  https://maven.apache.org/ref/4.0.0-alpha-7/api/maven-api-meta/index.html
- XML API:
  https://maven.apache.org/ref/4.0.0-alpha-7/api/maven-api-xml/index.html
- XML Impl:
  https://maven.apache.org/ref/4.0.0-alpha-7/maven-xml-impl/index.html

The discussion on plexus-xml compatibility with Maven 3 will required a next 
thinking: perhaps we should have had a plexus-xml release that was done 
*before* maven-xml-impl update = what is causing the compatibility issue

Regards,

Hervé

Le samedi 9 septembre 2023, 11:33:59 CEST Hervé Boutemy a écrit :
> > o.c.p:p-u 4.x that depends on
> > -> o.c.p:p-xml 4 that depends on
> 
> notice this dependency is *optional*
> it's useful only for ReaderFactory/WriterFactory, for XmlReader/Writer
> fully removing the dependency would have broken full compatibility by
> removing a few methods: it was preferred to mark the dependency as optional
> and keep full compatibility
> 
> then I would not say that p-u 4 pulls new Maven 4 API
> 
> > -> o.c.p:p-xml 4 that depends on
> > -> o.a.m:m-api-xml that depends on
> > -> o.a.m:m-api-meta
> 
> to me, here is where an improvement would be useful
> m-api-meta and m-api-xml are small very stable APIs, very non-Maven core
> specific
> I understand that we want to put them at Apache instead of Plexus, and I
> agree.
> But I think we should make their release cycle independent from Maven core:
> they do not deserve the current 7 alphas, then new releases in the future
> years.
> 
> see https://maven.apache.org/ref/4.0.0-alpha-7/api/index.html for an
> overview of all Maven 4 API artifacts:
> - Model, Settings, Toolchains and Core are clearly here at their right place
> - XML (1 interface: XmlNode) and meta annotation (6 annotations) are not so
> much Maven core related, and stable enough
> 
> IMHO, XML and meta annotation should fo to Maven Shared Components
> https://maven.apache.org/shared/index.html
> Better place, and better release cycle
> 
> then depending on these from outside would not be problematic
> 
> Regards,
> 
> Hervé
> 
> Le vendredi 8 septembre 2023, 19:42:40 CEST Tamás Cservenák a écrit :
> > Howdy,
> > 
> > Basil's issue is made me realize:
> > o.c.p:p-u 4.x that depends on
> > -> o.c.p:p-xml 4 that depends on
> > -> o.a.m:m-api-xml that depends on
> > -> o.a.m:m-api-meta
> > 
> > This means that p-u pulls in new Maven4 API bits.
> > Hence, Maven 3 plugin, that is built against maven-plugin-api 3.x, if
> > switched to p-u 4, would start receiving bits of Maven4 new API...
> > 
> > This is a big no for me, not to mention how this can prove problematic
> > down
> > the road too:
> > this means that today (as all this is "just on CP") mvn3 plugin could use
> > bits of Maven4 API that later -- if run in Maven4 -- becomes
> > forbidden/unavailable...
> > 
> > So, IMHO this just proves, that Maven 3.x level plugins should stick with
> > p-u 3.x
> > 
> > On Fri, Sep 8, 2023 at 6:24 PM Basil Crow <me...@basilcrow.com> wrote:
> > > I raised this issue in
> > > 
> > > https://github.com/jenkinsci/maven-hpi-plugin/pull/490#issuecomment-1557
> > > 97
> > > 0717 but did not receive a response.
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
> o.c.p:p-u 4.x that depends on
> -> o.c.p:p-xml 4 that depends on
notice this dependency is *optional*
it's useful only for ReaderFactory/WriterFactory, for XmlReader/Writer
fully removing the dependency would have broken full compatibility by removing 
a few methods: it was preferred to mark the dependency as optional and keep 
full compatibility

then I would not say that p-u 4 pulls new Maven 4 API

> -> o.c.p:p-xml 4 that depends on
> -> o.a.m:m-api-xml that depends on
> -> o.a.m:m-api-meta
to me, here is where an improvement would be useful
m-api-meta and m-api-xml are small very stable APIs, very non-Maven core 
specific
I understand that we want to put them at Apache instead of Plexus, and I 
agree.
But I think we should make their release cycle independent from Maven core: 
they do not deserve the current 7 alphas, then new releases in the future 
years.

see https://maven.apache.org/ref/4.0.0-alpha-7/api/index.html for an overview 
of all Maven 4 API artifacts:
- Model, Settings, Toolchains and Core are clearly here at their right place
- XML (1 interface: XmlNode) and meta annotation (6 annotations) are not so 
much Maven core related, and stable enough

IMHO, XML and meta annotation should fo to Maven Shared Components
https://maven.apache.org/shared/index.html
Better place, and better release cycle

then depending on these from outside would not be problematic

Regards,

Hervé

Le vendredi 8 septembre 2023, 19:42:40 CEST Tamás Cservenák a écrit :
> Howdy,
> 
> Basil's issue is made me realize:
> o.c.p:p-u 4.x that depends on
> -> o.c.p:p-xml 4 that depends on
> -> o.a.m:m-api-xml that depends on
> -> o.a.m:m-api-meta
> 
> This means that p-u pulls in new Maven4 API bits.
> Hence, Maven 3 plugin, that is built against maven-plugin-api 3.x, if
> switched to p-u 4, would start receiving bits of Maven4 new API...
> 
> This is a big no for me, not to mention how this can prove problematic down
> the road too:
> this means that today (as all this is "just on CP") mvn3 plugin could use
> bits of Maven4 API that later -- if run in Maven4 -- becomes
> forbidden/unavailable...
> 
> So, IMHO this just proves, that Maven 3.x level plugins should stick with
> p-u 3.x
> 
> On Fri, Sep 8, 2023 at 6:24 PM Basil Crow <me...@basilcrow.com> wrote:
> > I raised this issue in
> > 
> > https://github.com/jenkinsci/maven-hpi-plugin/pull/490#issuecomment-155797
> > 0717 but did not receive a response.
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Tamás Cservenák <ta...@cservenak.net>.
Howdy,

Basil's issue is made me realize:
o.c.p:p-u 4.x that depends on
-> o.c.p:p-xml 4 that depends on
-> o.a.m:m-api-xml that depends on
-> o.a.m:m-api-meta

This means that p-u pulls in new Maven4 API bits.
Hence, Maven 3 plugin, that is built against maven-plugin-api 3.x, if
switched to p-u 4, would start receiving bits of Maven4 new API...

This is a big no for me, not to mention how this can prove problematic down
the road too:
this means that today (as all this is "just on CP") mvn3 plugin could use
bits of Maven4 API that later -- if run in Maven4 -- becomes
forbidden/unavailable...

So, IMHO this just proves, that Maven 3.x level plugins should stick with
p-u 3.x

On Fri, Sep 8, 2023 at 6:24 PM Basil Crow <me...@basilcrow.com> wrote:

> I raised this issue in
>
> https://github.com/jenkinsci/maven-hpi-plugin/pull/490#issuecomment-1557970717
> but did not receive a response.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Basil Crow <me...@basilcrow.com>.
I raised this issue in
https://github.com/jenkinsci/maven-hpi-plugin/pull/490#issuecomment-1557970717
but did not receive a response.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Tamás Cservenák <ta...@cservenak.net>.
Adding my last 5 cents and will stop here:

- as you know, my goal is to push through the door latest Maven 3.x (3.9.5)
and Resolver 1.x (1.9.16)
- in a moment that happens, declare Maven 3.x and Resolver 1.x "bugfix
only" -- and we should focus on Maven 4
- hence, for this, simplest would be to declare "maven 3 plugins (and our
all plugins are current maven 3 plugins!) are stuck with p-u 3.x
- yes, this may need some extra effort down the line to produce p-u 3.5.2
for some security/bugfix maybe, but that is the least problematic
- keep p-u 4.x for Maven 4 plugins

T

On Fri, Sep 8, 2023 at 11:38 AM Tamás Cservenák <ta...@cservenak.net> wrote:

> I disagree here (or would like to have us be very cautious here):
>
> - the reason why p-u XML bits are exported are Modello generated models
> only (as they may have fiels like Xpp3Dom and generated IO classes uses XML
> bits as well)
> - plugins should remain capable to interact with Modello generated models
> - Maven 3.x uses "classic" modello, that must have runtime present/depends
> on p-u 3.x
>
> By mixing here p-u 4 with p-u 3 IMHO we just look for trouble
>
> Also, by this change, we will introduce "plugin X will work ONLY with
> Maven 3.9.5+", no?
>
> T
>
> On Mon, Sep 4, 2023 at 10:51 PM Guillaume Nodet <gn...@apache.org> wrote:
>
>> I think the decision to not export plexus-utils was taken some time ago.
>>
>> Unfortunately, the xml bits still have to be provided by the maven core
>> class loader.
>> I think in this case, Maven 3.9.x should also expose the builder class
>>
>>
>> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPackage>
>> I think this should work, but this would only solve the problem for the
>> latest 3.9.x maven, not older versions.
>>
>>
>> Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <
>> s.jaranowski@gmail.com>
>> a écrit :
>>
>> > Hi
>> >
>> > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x
>> in
>> > maven-enforcer ....
>> >
>> > In maven-enforcer (and in many other plugins ...) is used, code like:
>> >
>> >             Xpp3Dom enforcerRules =
>> Xpp3DomBuilder.build(descriptorStream,
>> > "UTF-8");
>> >
>> > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
>> but
>> > Maven 3.x exports
>> >
>> >     <!-- plexus-utils (for DOM-type fields in maven-model) -->
>> >
>>  <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
>> >
>> >
>> >
>> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
>> >
>> >
>> >
>> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
>> >
>> >
>> >
>> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
>> >
>> > It is very magical that we export classes but not export artifact
>> > which contains those classes ...
>> >
>> > so incompatibilite code for Xpp3Dom is used ...
>> >
>> > Any hints on how to process it.
>> >
>> > --
>> > Sławomir Jaranowski
>> >
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>>
>

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Tamás Cservenák <ta...@cservenak.net>.
I disagree here (or would like to have us be very cautious here):

- the reason why p-u XML bits are exported are Modello generated models
only (as they may have fiels like Xpp3Dom and generated IO classes uses XML
bits as well)
- plugins should remain capable to interact with Modello generated models
- Maven 3.x uses "classic" modello, that must have runtime present/depends
on p-u 3.x

By mixing here p-u 4 with p-u 3 IMHO we just look for trouble

Also, by this change, we will introduce "plugin X will work ONLY with Maven
3.9.5+", no?

T

On Mon, Sep 4, 2023 at 10:51 PM Guillaume Nodet <gn...@apache.org> wrote:

> I think the decision to not export plexus-utils was taken some time ago.
>
> Unfortunately, the xml bits still have to be provided by the maven core
> class loader.
> I think in this case, Maven 3.9.x should also expose the builder class
>
>
> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPackage>
> I think this should work, but this would only solve the problem for the
> latest 3.9.x maven, not older versions.
>
>
> Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <s.jaranowski@gmail.com
> >
> a écrit :
>
> > Hi
> >
> > I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> > maven-enforcer ....
> >
> > In maven-enforcer (and in many other plugins ...) is used, code like:
> >
> >             Xpp3Dom enforcerRules =
> Xpp3DomBuilder.build(descriptorStream,
> > "UTF-8");
> >
> > Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> but
> > Maven 3.x exports
> >
> >     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> >
>  <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> >
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
> >
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
> >
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
> >
> > It is very magical that we export classes but not export artifact
> > which contains those classes ...
> >
> > so incompatibilite code for Xpp3Dom is used ...
> >
> > Any hints on how to process it.
> >
> > --
> > Sławomir Jaranowski
> >
>
>
> --
> ------------------------
> Guillaume Nodet
>

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
ok, I updated plexus-utils and plexus-xml sites
and added a few key aspects about how these relate to old Plexus Utils 3

https://codehaus-plexus.github.io/plexus-utils/
https://codehaus-plexus.github.io/plexus-xml/

I hope this will help

Le samedi 9 septembre 2023, 11:14:52 CEST Hervé Boutemy a écrit :
> yes
> notice p-u site is broken https://codehaus-plexus.github.io/plexus-utils/
> and we should probably also find a way to publish also latest  p-u 3 javadoc
> in parallel
> 
> I'll see what I can do also to help on this
> 
> Le vendredi 8 septembre 2023, 10:53:11 CEST Slawomir Jaranowski a écrit :
> > Thanks, I will create an IT for it.
> > 
> > Good idea to describe the migration from plexus 3.x to 4.x.
> > 
> > pt., 8 wrz 2023 o 10:26 Guillaume Nodet <gn...@apache.org> napisał(a):
> > > I've raised MNG-7873.
> > > Slawomir, do you think you could create an IT for that ?
> > > I'll try to provide a fix asap, but a clean IT would make sure the
> > > problem
> > > is actually fixed.
> > > 
> > > I think we should also update the plexus-utils release notes with some
> > > more
> > > information about the migration to 4.x when using the xml bits.
> > > 
> > > [1] https://issues.apache.org/jira/browse/MNG-7873
> > > 
> > > Le lun. 4 sept. 2023 à 22:50, Guillaume Nodet <gn...@apache.org> a
> > > écrit
> > > 
> > > > I think the decision to not export plexus-utils was taken some time
> > > > ago.
> > > > 
> > > > Unfortunately, the xml bits still have to be provided by the maven
> > > > core
> > > > class loader.
> > > > I think in this case, Maven 3.9.x should also expose the builder class
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPa
> > > ck
> > > age>>
> > > 
> > > > I think this should work, but this would only solve the problem for
> > > > the
> > > > latest 3.9.x maven, not older versions.
> > > > 
> > > > 
> > > > Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <
> > > 
> > > s.jaranowski@gmail.com>
> > > 
> > > > a écrit :
> > > >> Hi
> > > >> 
> > > >> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml
> > > >> 4.x
> > > 
> > > in
> > > 
> > > >> maven-enforcer ....
> > > >> 
> > > >> In maven-enforcer (and in many other plugins ...) is used, code like:
> > > >>             Xpp3Dom enforcerRules =
> > > 
> > > Xpp3DomBuilder.build(descriptorStream,
> > > 
> > > >> "UTF-8");
> > > >> 
> > > >> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml
> > > >> ....
> > > 
> > > but
> > > 
> > > >> Maven 3.x exports
> > > >> 
> > > >>     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > > >> 
> > > >> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackag
> > > >> e>
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</export
> > > ed
> > > Package>
> > > 
> > > 
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserExceptio
> > > n<
> > > /exportedPackage>
> > > 
> > > 
> > > 
> > > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</export
> > > ed
> > > Package>>
> > > 
> > > >> It is very magical that we export classes but not export artifact
> > > >> which contains those classes ...
> > > >> 
> > > >> so incompatibilite code for Xpp3Dom is used ...
> > > >> 
> > > >> Any hints on how to process it.
> > > >> 
> > > >> --
> > > >> Sławomir Jaranowski
> > > > 
> > > > --
> > > > ------------------------
> > > > Guillaume Nodet
> > > 
> > > --
> > > ------------------------
> > > Guillaume Nodet
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Hervé Boutemy <he...@free.fr>.
yes
notice p-u site is broken https://codehaus-plexus.github.io/plexus-utils/
and we should probably also find a way to publish also latest  p-u 3 javadoc in 
parallel

I'll see what I can do also to help on this

Le vendredi 8 septembre 2023, 10:53:11 CEST Slawomir Jaranowski a écrit :
> Thanks, I will create an IT for it.
> 
> Good idea to describe the migration from plexus 3.x to 4.x.
> 
> pt., 8 wrz 2023 o 10:26 Guillaume Nodet <gn...@apache.org> napisał(a):
> > I've raised MNG-7873.
> > Slawomir, do you think you could create an IT for that ?
> > I'll try to provide a fix asap, but a clean IT would make sure the problem
> > is actually fixed.
> > 
> > I think we should also update the plexus-utils release notes with some
> > more
> > information about the migration to 4.x when using the xml bits.
> > 
> > [1] https://issues.apache.org/jira/browse/MNG-7873
> > 
> > Le lun. 4 sept. 2023 à 22:50, Guillaume Nodet <gn...@apache.org> a écrit
> > 
> > > I think the decision to not export plexus-utils was taken some time ago.
> > > 
> > > Unfortunately, the xml bits still have to be provided by the maven core
> > > class loader.
> > > I think in this case, Maven 3.9.x should also expose the builder class
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPack
> > age>> 
> > > I think this should work, but this would only solve the problem for the
> > > latest 3.9.x maven, not older versions.
> > > 
> > > 
> > > Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <
> > 
> > s.jaranowski@gmail.com>
> > 
> > > a écrit :
> > >> Hi
> > >> 
> > >> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x
> > 
> > in
> > 
> > >> maven-enforcer ....
> > >> 
> > >> In maven-enforcer (and in many other plugins ...) is used, code like:
> > >>             Xpp3Dom enforcerRules =
> > 
> > Xpp3DomBuilder.build(descriptorStream,
> > 
> > >> "UTF-8");
> > >> 
> > >> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> > 
> > but
> > 
> > >> Maven 3.x exports
> > >> 
> > >>     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> > >> 
> > >> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exported
> > Package>
> > 
> > 
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException<
> > /exportedPackage>
> > 
> > 
> > 
> > <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exported
> > Package>> 
> > >> It is very magical that we export classes but not export artifact
> > >> which contains those classes ...
> > >> 
> > >> so incompatibilite code for Xpp3Dom is used ...
> > >> 
> > >> Any hints on how to process it.
> > >> 
> > >> --
> > >> Sławomir Jaranowski
> > > 
> > > --
> > > ------------------------
> > > Guillaume Nodet
> > 
> > --
> > ------------------------
> > Guillaume Nodet





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Slawomir Jaranowski <s....@gmail.com>.
Thanks, I will create an IT for it.

Good idea to describe the migration from plexus 3.x to 4.x.

pt., 8 wrz 2023 o 10:26 Guillaume Nodet <gn...@apache.org> napisał(a):

> I've raised MNG-7873.
> Slawomir, do you think you could create an IT for that ?
> I'll try to provide a fix asap, but a clean IT would make sure the problem
> is actually fixed.
>
> I think we should also update the plexus-utils release notes with some more
> information about the migration to 4.x when using the xml bits.
>
> [1] https://issues.apache.org/jira/browse/MNG-7873
>
> Le lun. 4 sept. 2023 à 22:50, Guillaume Nodet <gn...@apache.org> a écrit
> :
>
> > I think the decision to not export plexus-utils was taken some time ago.
> >
> > Unfortunately, the xml bits still have to be provided by the maven core
> > class loader.
> > I think in this case, Maven 3.9.x should also expose the builder class
> >
> >
> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPackage>
> > I think this should work, but this would only solve the problem for the
> > latest 3.9.x maven, not older versions.
> >
> >
> > Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <
> s.jaranowski@gmail.com>
> > a écrit :
> >
> >> Hi
> >>
> >> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x
> in
> >> maven-enforcer ....
> >>
> >> In maven-enforcer (and in many other plugins ...) is used, code like:
> >>
> >>             Xpp3Dom enforcerRules =
> Xpp3DomBuilder.build(descriptorStream,
> >> "UTF-8");
> >>
> >> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml ....
> but
> >> Maven 3.x exports
> >>
> >>     <!-- plexus-utils (for DOM-type fields in maven-model) -->
> >>
> >> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
> >>
> >>
> >>
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
> >>
> >>
> >>
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
> >>
> >>
> >>
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
> >>
> >> It is very magical that we export classes but not export artifact
> >> which contains those classes ...
> >>
> >> so incompatibilite code for Xpp3Dom is used ...
> >>
> >> Any hints on how to process it.
> >>
> >> --
> >> Sławomir Jaranowski
> >>
> >
> >
> > --
> > ------------------------
> > Guillaume Nodet
> >
> >
>
> --
> ------------------------
> Guillaume Nodet
>


-- 
Sławomir Jaranowski

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Guillaume Nodet <gn...@apache.org>.
I've raised MNG-7873.
Slawomir, do you think you could create an IT for that ?
I'll try to provide a fix asap, but a clean IT would make sure the problem
is actually fixed.

I think we should also update the plexus-utils release notes with some more
information about the migration to 4.x when using the xml bits.

[1] https://issues.apache.org/jira/browse/MNG-7873

Le lun. 4 sept. 2023 à 22:50, Guillaume Nodet <gn...@apache.org> a écrit :

> I think the decision to not export plexus-utils was taken some time ago.
>
> Unfortunately, the xml bits still have to be provided by the maven core
> class loader.
> I think in this case, Maven 3.9.x should also expose the builder class
>
> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPackage>
> I think this should work, but this would only solve the problem for the
> latest 3.9.x maven, not older versions.
>
>
> Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <s....@gmail.com>
> a écrit :
>
>> Hi
>>
>> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
>> maven-enforcer ....
>>
>> In maven-enforcer (and in many other plugins ...) is used, code like:
>>
>>             Xpp3Dom enforcerRules = Xpp3DomBuilder.build(descriptorStream,
>> "UTF-8");
>>
>> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
>> Maven 3.x exports
>>
>>     <!-- plexus-utils (for DOM-type fields in maven-model) -->
>>
>> <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
>>
>>
>> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
>>
>>
>> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
>>
>>
>> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
>>
>> It is very magical that we export classes but not export artifact
>> which contains those classes ...
>>
>> so incompatibilite code for Xpp3Dom is used ...
>>
>> Any hints on how to process it.
>>
>> --
>> Sławomir Jaranowski
>>
>
>
> --
> ------------------------
> Guillaume Nodet
>
>

-- 
------------------------
Guillaume Nodet

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Guillaume Nodet <gn...@apache.org>.
I think the decision to not export plexus-utils was taken some time ago.

Unfortunately, the xml bits still have to be provided by the maven core
class loader.
I think in this case, Maven 3.9.x should also expose the builder class

<exportedPackage>org.codehaus.plexus.util.xml.Xpp3DomBuilder</exportedPackage>
I think this should work, but this would only solve the problem for the
latest 3.9.x maven, not older versions.


Le mar. 25 juil. 2023 à 20:56, Slawomir Jaranowski <s....@gmail.com>
a écrit :

> Hi
>
> I'm trying to update plexus-utils 3.5.x to plexus-utils/plexus-xml 4.x in
> maven-enforcer ....
>
> In maven-enforcer (and in many other plugins ...) is used, code like:
>
>             Xpp3Dom enforcerRules = Xpp3DomBuilder.build(descriptorStream,
> "UTF-8");
>
> Xpp3Dom and Xpp3DomBuilder - has new implementation in plexus-xml .... but
> Maven 3.x exports
>
>     <!-- plexus-utils (for DOM-type fields in maven-model) -->
>     <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>
>
>
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>
>
>
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>
>
>
> <exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>
>
> It is very magical that we export classes but not export artifact
> which contains those classes ...
>
> so incompatibilite code for Xpp3Dom is used ...
>
> Any hints on how to process it.
>
> --
> Sławomir Jaranowski
>


-- 
------------------------
Guillaume Nodet

Re: plexus-utils 4.x and Xpp3DomBuilder

Posted by Tamás Cservenák <ta...@cservenak.net>.
On Tue, Jul 25, 2023 at 8:57 PM Slawomir Jaranowski <s....@gmail.com>
wrote:

> It is very magical that we export classes but not export artifact
> which contains those classes ...
>
>
So, just to clear up:

For ref http://takari.io/book/91-maven-classloading.html

In relation to
https://github.com/apache/maven/blob/maven-3.9.x/maven-core/src/main/resources/META-INF/maven/extension.xml

"export package" => the package is imported by child classloader (or in
other words, is exported by core)
"export artifact" => (and this may be surprising) HAS NO DIRECT CLASSLOADER
EFFECT, this is more like whole artifact is IGNORED/not added to child
classloader CP, despite artifact has dependency on it (keyed by GA, V
ignored), as assumption is that core "export package" provides replacement

And one more remark: classrealms created are "self first" (so they consult
themselves first, then parent), EXCEPT for imported entries that always
come from import (someone correct me if I am wrong here). And plugin realms
have Maven API imported (!) if no extension, or have Maven API as parent
and imported extension, if any,

Conclusion: "exported package" ALWAYS OVERRIDE classes, whatever plugin
does (sans shading, of course).

Digression:

You may remember, that this was the whole point of "provided" changes
sweeping across plugins:
- in Maven 3.8.x times, such artifacts were collected/resolved (jar
downloaded to local repo) only to be omitted from CP --> waste of time,
bandwidth and confusing to users: after build their local repo contained
million different Vs of things like maven-core (all the versions that each
plugins were coded against)
- with "provided" scope this does not happen anymore (is not collected nor
resolved/downloaded)
- but, we had experiments in this area (for example
https://issues.apache.org/jira/browse/MNG-7097) that led to the first
"provided" solution (but it needed a bugfix in MPP)
- moreover, extension.xml changes are to be expected, as there are other
upcoming experiments (and we'd need V, so "exported artifacts" should be
expanded to GAV at least (probably at build time)
- and based on that, next "major improvement" (in guided resolution)
improving speed and all is something along this line:
https://github.com/apache/maven/pull/1188 (where Maven Core, "knowing
itself constituents" already auto-injects itself as depMgt for plugins)

And sorry for the thread hijack...

===

As for current thread:

Given our goal is to totally decouple plexus-utils, maybe we want instead
this:

    <!-- plexus-utils (for DOM-type fields in maven-model) -->
    <exportedPackage>org.codehaus.plexus.util.xml.Xpp3Dom</exportedPackage>

<exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParser</exportedPackage>

<exportedPackage>org.codehaus.plexus.util.xml.pull.XmlPullParserException</exportedPackage>

<exportedPackage>org.codehaus.plexus.util.xml.pull.XmlSerializer</exportedPackage>

to have this?


    <!-- plexus-utils (for DOM-type fields in maven-model) -->
    <exportedPackage>org.codehaus.plexus.util.xml</exportedPackage>
?