Re: Maven Artifacts not consumable after Introducing ci-friendly approach - revision tag

2020-06-16 Thread Francois Marot
beware of a caveat when using flatten and shade plugins:
https://github.com/mojohaus/flatten-maven-plugin/issues/100 &
https://stackoverflow.com/questions/52552329/use-maven-flatten-plugin-and-maven-shade-plugin-at-the-same-time

Basically you have to make sure that flatten is plugged AFTER shade in the
Maven lifecycle.
I recently faced the problem ;) :
https://twitter.com/FrancoisMarot/status/1263028183047299072


*- - - - -François Marot06 50 91 96 38*



On Tue, 16 Jun 2020 at 07:41, Hanish Bansal 
wrote:

> Still facing the same issue.
>
> Child project1 has shade plugin dependency in pom.xml.
>
> *Steps to reproduce the error:*
> 1. Compile external project
> https://github.com/hanishbansal/external-common ,
> this is some external project in which we can not change anything.
> 2. Our project "test-parent" has dependency of "external-common" project.
> Now checkout code from https://github.com/hanishbansal/test-parent adn try
> to compile it. Module "child1" is not deployed properly in local maven
> repo.
> Below is pom snippet of child1 module where revision tag is not replaced.
>  
> test-parent
> com.sample
> ${revision}
>   
>   4.0.0
>   child1
>
> On Mon, Jun 15, 2020 at 10:37 AM Hanish Bansal <
> hanish.bansal.agar...@gmail.com> wrote:
>
> > Hi All,
> >
> > Thanks for your response.
> >
> > I have replicated the same issue as mentioned in below steps:
> > 1. Compile external project
> > https://github.com/hanishbansal/external-common , this is some external
> > project in which we can not change anything.
> > 2. Our project "test-parent" has dependency of "external-common" project.
> > Now checkout code from https://github.com/hanishbansal/test-parent adn
> > try to compile it. Module "child1" is not deployed properly in local
> maven
> > repo.
> > Below is pom snippet of child1 module where revision tag is not replaced.
> >  
> > test-parent
> > com.sample
> > ${revision}
> >   
> >   4.0.0
> >   child1
> >
> >
> >
> >
> >
> > On Sat, Jun 13, 2020 at 8:18 PM Tomo Suzuki 
> > wrote:
> >
> >> Hi Hanish,
> >>
> >> I see child1 in my Maven local repository cannot resolve the $version to
> >> refer to its parent, because $version is defined at the parent (the
> error
> >> message below).
> >>
> >> How about specifying the concrete version when specifying parent? While
> >> you
> >> might not like that the version value will appear multiple places, you
> can
> >> update them by "mvn version:set"
> >> https://www.mojohaus.org/versions-maven-plugin/set-mojo.html
> >>
> >>
> >> [ERROR] Failed to execute goal on project child2: Could not resolve
> >> dependencies for project com.sample:child2:jar:1.1.0-SNAPSHOT: Failed to
> >> collect dependencies at com.sample:child1:jar:1.1.0-SNAPSHOT: Failed to
> >> read artifact descriptor for com.sample:child1:jar:1.1.0-SNAPSHOT: Could
> >> not find artifact com.sample:test-parent:pom:${revision} in central (
> >> https://repo.maven.apache.org/maven2) -> [Help 1]
> >> [ERROR]
> >> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> >> -e
> >> switch.
> >> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> >> [ERROR]
> >> [ERROR] For more information about the errors and possible solutions,
> >> please read the following articles:
> >> [ERROR] [Help 1]
> >>
> >>
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> >>
> >> /tmp/test-parent/child2 $ cat
> >>
> >>
> ~/.m2/repository/com/sample/child1/1.1.0-SNAPSHOT/child1-1.1.0-SNAPSHOT.pom
> >> 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/xsd/maven-4.0.0.xsd";>
> >>   4.0.0
> >>   
> >> com.sample
> >> test-parent
> >> ${revision}
> >>   
> >>   child1
> >> %
> >>
> >> On Sat, Jun 13, 2020 at 8:41 AM Francois Marot <
> francois.ma...@gmail.com>
> >> wrote:
> >>
> >> > Hello,
> >> > I can confirm that you sample project works as intended once you add
> the
> >> > missing configuration for the flatten plugin. Without it the pom.xml
> >> > installed in your local repo are not correct because of the
> >> placeholders in
> >> > the .
> >> >
> >> > I just copy pasted the  content as explained here:
> >> > http://maven.apache.org/maven-ci-friendly.html#install-deploy
> >> >
> >> > Hope you will soon make it work
> >> >
> >> >
> >> >
> >> > *- - - - -François Marot06 50 91 96 38*
> >> >
> >> >
> >> >
> >> > On Sat, 13 Jun 2020 at 05:39, Hanish Bansal <
> >> > hanish.bansal.agar...@gmail.com>
> >> > wrote:
> >> >
> >> > > Hi Team,
> >> > >
> >> > > I have pushed a sample minimal project in git at the following link
> >> > > https://github.com/hanishbansal/test-parent
> >> > >
> >> > > Project Structure:
> >> > >   test-parent
> >> > >- child1
> >> > >- child2
> >> > >
> >> > > child2 project has dependency of child1 project.
> >> > >
> >> > > S

Re: PKIX path building error with Azul ZULU Open JDK 14

2020-06-16 Thread Bernd Eckenfels
Hello,

Are you talking about Maven Central, are private Repo or maybe some Proxy 
certificate? Normally the default cacerts trust Store contains a root 
certificate which is used by Maven central (and other public sites). For a Repo 
with company certificate you normally add the company root ca once.


--
http://bernd.eckenfels.net

Von: Raghavendra Chilakalapudi (rchilakalapu) 
Gesendet: Tuesday, June 16, 2020 11:56:18 AM
An: users@maven.apache.org 
Betreff: Re: PKIX path building error with Azul ZULU Open JDK 14

Thanks for the reply.
When I add the maven certificate to JRE certs, its working fine.
But every time there is change at maven side, I need to add the certification 
again.
Is there anything we can add to the setttings?

Thanks,
Raghavendra CH

On 2020/06/16 09:23:19, Michael Osipov  wrote:
> Am 2020-06-15 um 14:54 schrieb Raghavendra Chilakalapudi (rchilakalapu):>
> > Hi,>
> > >
> > Query :>
> > I am using Azul Zulu Open JDK (14.0)  and planning to integrate with Maven.>
> > But getting following error when running mvn command for archetype plugin :>
> > >
> > PKIX path building failed: 
> > sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> > valid certification path to requested target.>

> > >
> > Do I need to add anything specific in settings.xml for resolve this 
> > certification issue?>
> > >
> > Could you please help me out to resolve the issue as soon as possible.>
>
> This is not Maven problem. Add your CA to cacerts.>
>
> ->
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org>
> For additional commands, e-mail: users-h...@maven.apache.org>
>
>


Re: PKIX path building error with Azul ZULU Open JDK 14

2020-06-16 Thread Thorsten Heit
Hi,
> When I add the maven certificate to JRE certs, its working fine.
> But every time there is change at maven side, I need to add the certification 
> again.
> Is there anything we can add to the setttings?

This has nothing do to with Maven, but with your Java installation.
I assume you're working in a corporate environment that uses its own PKI
with its own (root) certificates.

Java normally doesn't use the certificates provided by your OS, but
instead has its own certificate store (the already mentioned cacerts
file that is contained in your Java installation).

Therefore you have to manually add your company PKI certs to the Java
installation to get rid of the PKIX path building error...


Again, this has nothing to do with Maven and changes as the Mave side
you mentioned (whatever this is).


HTH

Thorsten



signature.asc
Description: OpenPGP digital signature


Re: PKIX path building error with Azul ZULU Open JDK 14

2020-06-16 Thread Raghavendra Chilakalapudi (rchilakalapu)
Thanks for the reply.
When I add the maven certificate to JRE certs, its working fine.
But every time there is change at maven side, I need to add the certification 
again.
Is there anything we can add to the setttings?

Thanks,
Raghavendra CH

On 2020/06/16 09:23:19, Michael Osipov  wrote:
> Am 2020-06-15 um 14:54 schrieb Raghavendra Chilakalapudi (rchilakalapu):>
> > Hi,>
> > >
> > Query :>
> > I am using Azul Zulu Open JDK (14.0)  and planning to integrate with Maven.>
> > But getting following error when running mvn command for archetype plugin :>
> > >
> > PKIX path building failed: 
> > sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> > valid certification path to requested target.>

> > >
> > Do I need to add anything specific in settings.xml for resolve this 
> > certification issue?>
> > >
> > Could you please help me out to resolve the issue as soon as possible.>
>
> This is not Maven problem. Add your CA to cacerts.>
>
> ->
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org>
> For additional commands, e-mail: users-h...@maven.apache.org>
>
>


Re: PKIX path building error with Azul ZULU Open JDK 14

2020-06-16 Thread Michael Osipov

Am 2020-06-15 um 14:54 schrieb Raghavendra Chilakalapudi (rchilakalapu):

Hi,

Query :
I am using Azul Zulu Open JDK (14.0)  and planning to integrate with Maven.
But getting following error when running mvn command for archetype plugin :

PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target.

Do I need to add anything specific in settings.xml for resolve this 
certification issue?

Could you please help me out to resolve the issue as soon as possible.


This is not Maven problem. Add your CA to cacerts.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org