You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Mark Thomas <ma...@apache.org> on 2020/11/30 08:40:19 UTC

[LOGGING] Build errors

Hi,

I've stumbled across the following error when trying to build a clean
clone of commons-logging with Maven 3.6.3 and Java 8u275

git clone git@github.com:apache/commons-logging.git asf-commons-logging
cd asf-commons-logging
mvn clean package
...
Failed to execute goal
org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (apijar) on project
commons-logging: You have to use a classifier to attach supplemental
artifacts to the project instead of replacing them. -> [Help 1]

My Maven foo is limited. Any hints on what needs changing in the POM to
fix this?

Mark

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


Re: [LOGGING] Build errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Have to admit I find the setup quite complex for a "commons" project too
(and the fact tests don't run in the IDE without configuring the failsafe
system properties is quite an issue IMHO).

Guess the maven way is to split it in modules instead of doing N real
artifacts (3 here) in one module (a bit like tomcat does with ant).

I also don't know if the intent is to really test the packaging or more the
features in failsafe run but if it is only the feature a better classloader
implementation (with filtering in loadClass and using target/classes and
target/test-classes folder instead of .jar) would make the test runnable
with surefire and way simpler to work on IMHO.

Just my 2 cts.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le lun. 30 nov. 2020 à 10:26, Mark Thomas <ma...@apache.org> a écrit :

> On 30/11/2020 09:14, Romain Manni-Bucau wrote:
> > I think you need to adjust failsafe configuration, it passes the jar
> paths
> > as system properties.
> > Setting classifier without <finalName> (instead of <jarName>) you move
> from
> > c-l-<classifier>-<version>.jar to c-l-<version>-<classifier> so tests
> will
> > likely fail.
> >
> > Another weird thing is the last "full jar" dependency which has a
> > classifier, I think the id of the execution should just be renamed
> > "default-jar" to be the "default jar" of the build and not have any
> > classifier, no?
>
> I have no idea. We are now way out of my comfort zone with Maven. I was
> just trying to get the build to complete without error.
>
> Mark
>
>
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le lun. 30 nov. 2020 à 10:09, Mark Thomas <ma...@apache.org> a écrit :
> >
> >> On 30/11/2020 08:50, Romain Manni-Bucau wrote:
> >>> Hi Mark
> >>>
> >>> my guess is that apijar execution must add <classifier>api</classifier>
> >> (or
> >>> any value)
> >>>
> >>> this way you get the default jar but also this particular one.
> >>
> >> Thanks. That did it. Fix pushed.
> >>
> >> Mark
> >>
> >>
> >>>
> >>>
> >>> Romain Manni-Bucau
> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>> <https://rmannibucau.metawerx.net/> | Old Blog
> >>> <http://rmannibucau.wordpress.com> | Github <
> >> https://github.com/rmannibucau> |
> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> >>> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >>>
> >>>
> >>>
> >>> Le lun. 30 nov. 2020 à 09:40, Mark Thomas <ma...@apache.org> a écrit :
> >>>
> >>>> Hi,
> >>>>
> >>>> I've stumbled across the following error when trying to build a clean
> >>>> clone of commons-logging with Maven 3.6.3 and Java 8u275
> >>>>
> >>>> git clone git@github.com:apache/commons-logging.git
> asf-commons-logging
> >>>> cd asf-commons-logging
> >>>> mvn clean package
> >>>> ...
> >>>> Failed to execute goal
> >>>> org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (apijar) on
> project
> >>>> commons-logging: You have to use a classifier to attach supplemental
> >>>> artifacts to the project instead of replacing them. -> [Help 1]
> >>>>
> >>>> My Maven foo is limited. Any hints on what needs changing in the POM
> to
> >>>> fix this?
> >>>>
> >>>> Mark
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>>> For additional commands, e-mail: dev-help@commons.apache.org
> >>>>
> >>>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [LOGGING] Build errors

Posted by Mark Thomas <ma...@apache.org>.
On 30/11/2020 09:14, Romain Manni-Bucau wrote:
> I think you need to adjust failsafe configuration, it passes the jar paths
> as system properties.
> Setting classifier without <finalName> (instead of <jarName>) you move from
> c-l-<classifier>-<version>.jar to c-l-<version>-<classifier> so tests will
> likely fail.
> 
> Another weird thing is the last "full jar" dependency which has a
> classifier, I think the id of the execution should just be renamed
> "default-jar" to be the "default jar" of the build and not have any
> classifier, no?

I have no idea. We are now way out of my comfort zone with Maven. I was
just trying to get the build to complete without error.

Mark


> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
> 
> 
> Le lun. 30 nov. 2020 à 10:09, Mark Thomas <ma...@apache.org> a écrit :
> 
>> On 30/11/2020 08:50, Romain Manni-Bucau wrote:
>>> Hi Mark
>>>
>>> my guess is that apijar execution must add <classifier>api</classifier>
>> (or
>>> any value)
>>>
>>> this way you get the default jar but also this particular one.
>>
>> Thanks. That did it. Fix pushed.
>>
>> Mark
>>
>>
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <https://rmannibucau.metawerx.net/> | Old Blog
>>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
>>> <
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>>>
>>>
>>>
>>> Le lun. 30 nov. 2020 à 09:40, Mark Thomas <ma...@apache.org> a écrit :
>>>
>>>> Hi,
>>>>
>>>> I've stumbled across the following error when trying to build a clean
>>>> clone of commons-logging with Maven 3.6.3 and Java 8u275
>>>>
>>>> git clone git@github.com:apache/commons-logging.git asf-commons-logging
>>>> cd asf-commons-logging
>>>> mvn clean package
>>>> ...
>>>> Failed to execute goal
>>>> org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (apijar) on project
>>>> commons-logging: You have to use a classifier to attach supplemental
>>>> artifacts to the project instead of replacing them. -> [Help 1]
>>>>
>>>> My Maven foo is limited. Any hints on what needs changing in the POM to
>>>> fix this?
>>>>
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 


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


Re: [LOGGING] Build errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I think you need to adjust failsafe configuration, it passes the jar paths
as system properties.
Setting classifier without <finalName> (instead of <jarName>) you move from
c-l-<classifier>-<version>.jar to c-l-<version>-<classifier> so tests will
likely fail.

Another weird thing is the last "full jar" dependency which has a
classifier, I think the id of the execution should just be renamed
"default-jar" to be the "default jar" of the build and not have any
classifier, no?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le lun. 30 nov. 2020 à 10:09, Mark Thomas <ma...@apache.org> a écrit :

> On 30/11/2020 08:50, Romain Manni-Bucau wrote:
> > Hi Mark
> >
> > my guess is that apijar execution must add <classifier>api</classifier>
> (or
> > any value)
> >
> > this way you get the default jar but also this particular one.
>
> Thanks. That did it. Fix pushed.
>
> Mark
>
>
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le lun. 30 nov. 2020 à 09:40, Mark Thomas <ma...@apache.org> a écrit :
> >
> >> Hi,
> >>
> >> I've stumbled across the following error when trying to build a clean
> >> clone of commons-logging with Maven 3.6.3 and Java 8u275
> >>
> >> git clone git@github.com:apache/commons-logging.git asf-commons-logging
> >> cd asf-commons-logging
> >> mvn clean package
> >> ...
> >> Failed to execute goal
> >> org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (apijar) on project
> >> commons-logging: You have to use a classifier to attach supplemental
> >> artifacts to the project instead of replacing them. -> [Help 1]
> >>
> >> My Maven foo is limited. Any hints on what needs changing in the POM to
> >> fix this?
> >>
> >> Mark
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [LOGGING] Build errors

Posted by Mark Thomas <ma...@apache.org>.
On 30/11/2020 08:50, Romain Manni-Bucau wrote:
> Hi Mark
> 
> my guess is that apijar execution must add <classifier>api</classifier> (or
> any value)
> 
> this way you get the default jar but also this particular one.

Thanks. That did it. Fix pushed.

Mark


> 
> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
> 
> 
> Le lun. 30 nov. 2020 à 09:40, Mark Thomas <ma...@apache.org> a écrit :
> 
>> Hi,
>>
>> I've stumbled across the following error when trying to build a clean
>> clone of commons-logging with Maven 3.6.3 and Java 8u275
>>
>> git clone git@github.com:apache/commons-logging.git asf-commons-logging
>> cd asf-commons-logging
>> mvn clean package
>> ...
>> Failed to execute goal
>> org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (apijar) on project
>> commons-logging: You have to use a classifier to attach supplemental
>> artifacts to the project instead of replacing them. -> [Help 1]
>>
>> My Maven foo is limited. Any hints on what needs changing in the POM to
>> fix this?
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 


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


Re: [LOGGING] Build errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Mark

my guess is that apijar execution must add <classifier>api</classifier> (or
any value)

this way you get the default jar but also this particular one.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le lun. 30 nov. 2020 à 09:40, Mark Thomas <ma...@apache.org> a écrit :

> Hi,
>
> I've stumbled across the following error when trying to build a clean
> clone of commons-logging with Maven 3.6.3 and Java 8u275
>
> git clone git@github.com:apache/commons-logging.git asf-commons-logging
> cd asf-commons-logging
> mvn clean package
> ...
> Failed to execute goal
> org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (apijar) on project
> commons-logging: You have to use a classifier to attach supplemental
> artifacts to the project instead of replacing them. -> [Help 1]
>
> My Maven foo is limited. Any hints on what needs changing in the POM to
> fix this?
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>