Re: maven-3.2.4 location

2017-06-06 Thread Karl Heinz Marbaise

Hi Martin,

unfortunately there does not exist a distro for Maven 3.2.4 cause this 
has never been made it to the public...


Only 3.2.5...

Apart from that it looks this test in Apache Rat Plugin does not work 
correctly...


Are you trying to fix it ?

Kind regards
Karl Heinz Marbaise
On 06/06/17 23:14, Martin Gainty wrote:

All-



mvn -version


Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:3
7-04:00)
Maven home: /maven/maven333
Java version: 1.8.0_40, vendor: Oracle Corporation
Java home: /Java/jdk1.8/jre


produces this failure:

Running org.apache.rat.mp.RatCheckMojoTest
Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.2 sec <<< 
FAILURE! - in org.apache.rat.mp.RatCheckMojoTest
testIt1(org.apache.rat.mp.RatCheckMojoTest)  Time elapsed: 0.03 sec  <<< 
FAILURE!
junit.framework.AssertionFailedError: Maven 3.2.4 or better is required


the test says current-maven-version 3.3.3 is not > Maven 3.2.4


any idea where i can locate a distro for maven 3.2.4  to make this test succeed?


Thanks,
Martin


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



maven-3.2.4 location

2017-06-06 Thread Martin Gainty
All-


>mvn -version

Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:3
7-04:00)
Maven home: /maven/maven333
Java version: 1.8.0_40, vendor: Oracle Corporation
Java home: /Java/jdk1.8/jre


produces this failure:

Running org.apache.rat.mp.RatCheckMojoTest
Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.2 sec <<< 
FAILURE! - in org.apache.rat.mp.RatCheckMojoTest
testIt1(org.apache.rat.mp.RatCheckMojoTest)  Time elapsed: 0.03 sec  <<< 
FAILURE!
junit.framework.AssertionFailedError: Maven 3.2.4 or better is required


the test says current-maven-version 3.3.3 is not > Maven 3.2.4


any idea where i can locate a distro for maven 3.2.4  to make this test succeed?


Thanks,
Martin


Re: Jenkins Maven build not seeing my .mvn folder?

2017-06-06 Thread Arnaud Héritier
It is https://issues.apache.org/jira/plugins/servlet/mobile#issue/MNG-5889


Le mar. 6 juin 2017 à 20:27, Arnaud Héritier  a écrit :

> The problem with extensions is different. And I don't think we'll fix it.
> The problem .mvn and usage of -f is a maven bug fixed in 3.5.0 or 3.5.1
>
> Le mar. 6 juin 2017 à 19:36, Pascal  a écrit :
>
>> The existing bug to support core extensions:
>> https://issues.jenkins-ci.org/browse/JENKINS-30058
>>
>> As I said, the only solution so far is to use a Freestyle project. You can
>> find more details in the bug comments.
>>
>> Pascal
>>
>>
>> 2017-06-06 19:27 GMT+02:00 Pascal :
>>
>> > Hello,
>> >
>> > I fear you have done everything correctly and the issue is with the
>> > Jenkins Maven plugin. There is already a bug report in the Jenkins Maven
>> > Plugin, but it's hard to find. If I recall how to find it, I will post
>> it
>> > here.
>> >
>> > Unfortunately, it does not look like an easy bug, so you cannot use the
>> > "Maven" Job type in Jenkins together with the .mvn folder feature.
>> However,
>> > what you can do is create a Freestyle Job and add a build step "Call
>> Maven
>> > goals".
>> >
>> > Cheers,
>> >
>> > Pascal
>> >
>> >
>> > 2017-06-06 18:13 GMT+02:00 Eric B :
>> >
>> >> Hi,
>> >>
>> >> I'm cross posting this to StackOverflow (
>> >> https://stackoverflow.com/q/44394234/827480) b/c I'm not truly
>> convinced
>> >> this is a maven question per say.  Rather I think it is more something
>> due
>> >> to my Jenkins job config that is causing some issues, but I am hoping
>> that
>> >> maven users here may have encountered this in Jenkins as well.  Either
>> >> that, or maybe someone can point out that I'm using the .mvn folder
>> >> incorrectly.
>> >>
>> >> Essentially, I have a multi-module maven project that is set up as:
>> >>
>> >> |.mvn
>> >>  \-maven.config
>> >>  \-jvm.config
>> >> |superpom
>> >>  \-pom.xml (main project parent pom, includes module defns)
>> >> |module1
>> >>  \-pom.xml (parent points to ../superpom/pom.xml)
>> >>  \src
>> >>   \...
>> >> |module2
>> >>  \-pom.xml (parent points to ../superpom/pom.xml)
>> >>  \src
>> >>   \...
>> >>
>> >> My maven.config file is defined as:
>> >>
>> >> -Dsign.alias=cert
>> >> -Dsign.storepass=changeit
>> >> -Dsign.keypass=changeit
>> >> -Dcheckstyle.skip=true
>> >> -Dcobertura.skip=true
>> >> -Dpmd.skip=true
>> >> -DskipTests=true
>> >> -DdatabaseUrl=jdbc:sqlserver://localhost:1433;databaseName=TEMP
>> >> -DuserName=test
>> >> -Dpassword=test
>> >> -f superpom/pom.xml
>> >>
>> >> If I run my maven build from the command line, everything builds as
>> >> expected. ie:
>> >>
>> >> [project]$ mvn clean install
>> >>
>> >> However, when I configure my jenkins job, it is failing as though it is
>> >> not
>> >> seeing/reading the .mvn/ folder/files. In fact, to be honest, I'm not
>> >> entirely sure how to configure my maven project in Jenkins. If I leave
>> my
>> >> ROOT pom definition as blank, then Jenkins complains it doesn't have a
>> >> pom.xml file.
>> >>
>> >> If I specify my root pom as superpom/pom.xml then it isn't loading any
>> of
>> >> my config files.
>> >>
>> >> To be safe, I've even tried adding my .mvn folder in my superpom
>> folder,
>> >> but that too is ignored.
>> >>
>> >> jenkins.log:
>> >>
>> >> [superpom] $ /var/jenkins_home/tools/hudson.model.JDK/JDK_7/bin/java
>> >> -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-
>> >> agent-1.8.1.jar:/var/jenkins_home/tools/hudson.tasks.Maven_
>> >> MavenInstallation/Maven_3.3.9/boot/plexus-classworlds-2.5.2.
>> >> jar:/var/jenkins_home/tools/hudson.tasks.Maven_
>> >> MavenInstallation/Maven_3.3.9/conf/logging
>> >> jenkins.maven3.agent.Maven33Main
>> >>
>> /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9
>> >> /var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar
>> >> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-
>> >> interceptor-1.8.1.jar
>> >> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-
>> >> interceptor-commons-1.8.1.jar
>> >> 38679
>> >> <===[JENKINS REMOTING CAPACITY]===>channel started
>> >> using settings config with name Settings.xml
>> >> Replacing all maven server entries not found in credentials list is
>> true
>> >> Executing Maven:  -B -f
>> >> /var/jenkins_home/workspace/JB4(Maven)/superpom/pom.xml
>> >> -Dmaven.repo.local=/var/jenkins_home/workspace/JB4(Maven)/.repository
>> >> -s /tmp/settings4167440206098086967.xml clean install
>> >> [INFO] Scanning for projects...
>> >>
>> >>
>> >> I'm not sure if I am using the .mvn folder incorrectly, if there is
>> >> something wrong with my Jenkins job configuration.
>> >>
>> >> Am I doing this right?  Am I missing a step somewhere?
>> >>
>> >> Thanks,
>> >>
>> >> Eric
>> >>
>> >
>> >
>>
> --
> -
> Arnaud Héritier
> http://aheritier.net
> Mail/GTalk: aheritier AT gmail DOT com
> Twitter/Skype : aheritier
>
-- 
-
Arnaud Héritier
http://aheritier.net
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier


Re: Jenkins Maven build not seeing my .mvn folder?

2017-06-06 Thread Arnaud Héritier
The problem with extensions is different. And I don't think we'll fix it.
The problem .mvn and usage of -f is a maven bug fixed in 3.5.0 or 3.5.1

Le mar. 6 juin 2017 à 19:36, Pascal  a écrit :

> The existing bug to support core extensions:
> https://issues.jenkins-ci.org/browse/JENKINS-30058
>
> As I said, the only solution so far is to use a Freestyle project. You can
> find more details in the bug comments.
>
> Pascal
>
>
> 2017-06-06 19:27 GMT+02:00 Pascal :
>
> > Hello,
> >
> > I fear you have done everything correctly and the issue is with the
> > Jenkins Maven plugin. There is already a bug report in the Jenkins Maven
> > Plugin, but it's hard to find. If I recall how to find it, I will post it
> > here.
> >
> > Unfortunately, it does not look like an easy bug, so you cannot use the
> > "Maven" Job type in Jenkins together with the .mvn folder feature.
> However,
> > what you can do is create a Freestyle Job and add a build step "Call
> Maven
> > goals".
> >
> > Cheers,
> >
> > Pascal
> >
> >
> > 2017-06-06 18:13 GMT+02:00 Eric B :
> >
> >> Hi,
> >>
> >> I'm cross posting this to StackOverflow (
> >> https://stackoverflow.com/q/44394234/827480) b/c I'm not truly
> convinced
> >> this is a maven question per say.  Rather I think it is more something
> due
> >> to my Jenkins job config that is causing some issues, but I am hoping
> that
> >> maven users here may have encountered this in Jenkins as well.  Either
> >> that, or maybe someone can point out that I'm using the .mvn folder
> >> incorrectly.
> >>
> >> Essentially, I have a multi-module maven project that is set up as:
> >>
> >> |.mvn
> >>  \-maven.config
> >>  \-jvm.config
> >> |superpom
> >>  \-pom.xml (main project parent pom, includes module defns)
> >> |module1
> >>  \-pom.xml (parent points to ../superpom/pom.xml)
> >>  \src
> >>   \...
> >> |module2
> >>  \-pom.xml (parent points to ../superpom/pom.xml)
> >>  \src
> >>   \...
> >>
> >> My maven.config file is defined as:
> >>
> >> -Dsign.alias=cert
> >> -Dsign.storepass=changeit
> >> -Dsign.keypass=changeit
> >> -Dcheckstyle.skip=true
> >> -Dcobertura.skip=true
> >> -Dpmd.skip=true
> >> -DskipTests=true
> >> -DdatabaseUrl=jdbc:sqlserver://localhost:1433;databaseName=TEMP
> >> -DuserName=test
> >> -Dpassword=test
> >> -f superpom/pom.xml
> >>
> >> If I run my maven build from the command line, everything builds as
> >> expected. ie:
> >>
> >> [project]$ mvn clean install
> >>
> >> However, when I configure my jenkins job, it is failing as though it is
> >> not
> >> seeing/reading the .mvn/ folder/files. In fact, to be honest, I'm not
> >> entirely sure how to configure my maven project in Jenkins. If I leave
> my
> >> ROOT pom definition as blank, then Jenkins complains it doesn't have a
> >> pom.xml file.
> >>
> >> If I specify my root pom as superpom/pom.xml then it isn't loading any
> of
> >> my config files.
> >>
> >> To be safe, I've even tried adding my .mvn folder in my superpom folder,
> >> but that too is ignored.
> >>
> >> jenkins.log:
> >>
> >> [superpom] $ /var/jenkins_home/tools/hudson.model.JDK/JDK_7/bin/java
> >> -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-
> >> agent-1.8.1.jar:/var/jenkins_home/tools/hudson.tasks.Maven_
> >> MavenInstallation/Maven_3.3.9/boot/plexus-classworlds-2.5.2.
> >> jar:/var/jenkins_home/tools/hudson.tasks.Maven_
> >> MavenInstallation/Maven_3.3.9/conf/logging
> >> jenkins.maven3.agent.Maven33Main
> >> /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9
> >> /var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar
> >> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-
> >> interceptor-1.8.1.jar
> >> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-
> >> interceptor-commons-1.8.1.jar
> >> 38679
> >> <===[JENKINS REMOTING CAPACITY]===>channel started
> >> using settings config with name Settings.xml
> >> Replacing all maven server entries not found in credentials list is true
> >> Executing Maven:  -B -f
> >> /var/jenkins_home/workspace/JB4(Maven)/superpom/pom.xml
> >> -Dmaven.repo.local=/var/jenkins_home/workspace/JB4(Maven)/.repository
> >> -s /tmp/settings4167440206098086967.xml clean install
> >> [INFO] Scanning for projects...
> >>
> >>
> >> I'm not sure if I am using the .mvn folder incorrectly, if there is
> >> something wrong with my Jenkins job configuration.
> >>
> >> Am I doing this right?  Am I missing a step somewhere?
> >>
> >> Thanks,
> >>
> >> Eric
> >>
> >
> >
>
-- 
-
Arnaud Héritier
http://aheritier.net
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier


Re: dependency:tree without downloading binaries

2017-06-06 Thread Stefan Ferstl
On Tue, May 30, 2017 at 5:25 PM, Viktor Sadovnikov  wrote:
> Hello everyone,
>
> I need to collect information about dependencies (their GAV only) of a very
> large number of projects. Therefore I wrote a simple Maven plugin. It's is
> based on maven-dependency-plugin, but reports dependencies in a format,
> whihc I can use later.
>
> However applying this plugin to projects results in filling local maven
> repository with binaries of all the dependencies with their different
> versions. It's vey time consuming and hungry for the disk space. Is there a
> way to make DependencyGraphBuilder (class from Maven Shared) to resolve
> dependencies using poms only? wihtout downloading actuall binaries?
>

There is already an issue for that:
https://issues.apache.org/jira/browse/MSHARED-519


Cheers
Stefan

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



Re: Jenkins Maven build not seeing my .mvn folder?

2017-06-06 Thread Pascal
The existing bug to support core extensions:
https://issues.jenkins-ci.org/browse/JENKINS-30058

As I said, the only solution so far is to use a Freestyle project. You can
find more details in the bug comments.

Pascal


2017-06-06 19:27 GMT+02:00 Pascal :

> Hello,
>
> I fear you have done everything correctly and the issue is with the
> Jenkins Maven plugin. There is already a bug report in the Jenkins Maven
> Plugin, but it's hard to find. If I recall how to find it, I will post it
> here.
>
> Unfortunately, it does not look like an easy bug, so you cannot use the
> "Maven" Job type in Jenkins together with the .mvn folder feature. However,
> what you can do is create a Freestyle Job and add a build step "Call Maven
> goals".
>
> Cheers,
>
> Pascal
>
>
> 2017-06-06 18:13 GMT+02:00 Eric B :
>
>> Hi,
>>
>> I'm cross posting this to StackOverflow (
>> https://stackoverflow.com/q/44394234/827480) b/c I'm not truly convinced
>> this is a maven question per say.  Rather I think it is more something due
>> to my Jenkins job config that is causing some issues, but I am hoping that
>> maven users here may have encountered this in Jenkins as well.  Either
>> that, or maybe someone can point out that I'm using the .mvn folder
>> incorrectly.
>>
>> Essentially, I have a multi-module maven project that is set up as:
>>
>> |.mvn
>>  \-maven.config
>>  \-jvm.config
>> |superpom
>>  \-pom.xml (main project parent pom, includes module defns)
>> |module1
>>  \-pom.xml (parent points to ../superpom/pom.xml)
>>  \src
>>   \...
>> |module2
>>  \-pom.xml (parent points to ../superpom/pom.xml)
>>  \src
>>   \...
>>
>> My maven.config file is defined as:
>>
>> -Dsign.alias=cert
>> -Dsign.storepass=changeit
>> -Dsign.keypass=changeit
>> -Dcheckstyle.skip=true
>> -Dcobertura.skip=true
>> -Dpmd.skip=true
>> -DskipTests=true
>> -DdatabaseUrl=jdbc:sqlserver://localhost:1433;databaseName=TEMP
>> -DuserName=test
>> -Dpassword=test
>> -f superpom/pom.xml
>>
>> If I run my maven build from the command line, everything builds as
>> expected. ie:
>>
>> [project]$ mvn clean install
>>
>> However, when I configure my jenkins job, it is failing as though it is
>> not
>> seeing/reading the .mvn/ folder/files. In fact, to be honest, I'm not
>> entirely sure how to configure my maven project in Jenkins. If I leave my
>> ROOT pom definition as blank, then Jenkins complains it doesn't have a
>> pom.xml file.
>>
>> If I specify my root pom as superpom/pom.xml then it isn't loading any of
>> my config files.
>>
>> To be safe, I've even tried adding my .mvn folder in my superpom folder,
>> but that too is ignored.
>>
>> jenkins.log:
>>
>> [superpom] $ /var/jenkins_home/tools/hudson.model.JDK/JDK_7/bin/java
>> -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-
>> agent-1.8.1.jar:/var/jenkins_home/tools/hudson.tasks.Maven_
>> MavenInstallation/Maven_3.3.9/boot/plexus-classworlds-2.5.2.
>> jar:/var/jenkins_home/tools/hudson.tasks.Maven_
>> MavenInstallation/Maven_3.3.9/conf/logging
>> jenkins.maven3.agent.Maven33Main
>> /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9
>> /var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar
>> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-
>> interceptor-1.8.1.jar
>> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-
>> interceptor-commons-1.8.1.jar
>> 38679
>> <===[JENKINS REMOTING CAPACITY]===>channel started
>> using settings config with name Settings.xml
>> Replacing all maven server entries not found in credentials list is true
>> Executing Maven:  -B -f
>> /var/jenkins_home/workspace/JB4(Maven)/superpom/pom.xml
>> -Dmaven.repo.local=/var/jenkins_home/workspace/JB4(Maven)/.repository
>> -s /tmp/settings4167440206098086967.xml clean install
>> [INFO] Scanning for projects...
>>
>>
>> I'm not sure if I am using the .mvn folder incorrectly, if there is
>> something wrong with my Jenkins job configuration.
>>
>> Am I doing this right?  Am I missing a step somewhere?
>>
>> Thanks,
>>
>> Eric
>>
>
>


Re: Jenkins Maven build not seeing my .mvn folder?

2017-06-06 Thread Pascal
Hello,

I fear you have done everything correctly and the issue is with the Jenkins
Maven plugin. There is already a bug report in the Jenkins Maven Plugin,
but it's hard to find. If I recall how to find it, I will post it here.

Unfortunately, it does not look like an easy bug, so you cannot use the
"Maven" Job type in Jenkins together with the .mvn folder feature. However,
what you can do is create a Freestyle Job and add a build step "Call Maven
goals".

Cheers,

Pascal


2017-06-06 18:13 GMT+02:00 Eric B :

> Hi,
>
> I'm cross posting this to StackOverflow (
> https://stackoverflow.com/q/44394234/827480) b/c I'm not truly convinced
> this is a maven question per say.  Rather I think it is more something due
> to my Jenkins job config that is causing some issues, but I am hoping that
> maven users here may have encountered this in Jenkins as well.  Either
> that, or maybe someone can point out that I'm using the .mvn folder
> incorrectly.
>
> Essentially, I have a multi-module maven project that is set up as:
>
> |.mvn
>  \-maven.config
>  \-jvm.config
> |superpom
>  \-pom.xml (main project parent pom, includes module defns)
> |module1
>  \-pom.xml (parent points to ../superpom/pom.xml)
>  \src
>   \...
> |module2
>  \-pom.xml (parent points to ../superpom/pom.xml)
>  \src
>   \...
>
> My maven.config file is defined as:
>
> -Dsign.alias=cert
> -Dsign.storepass=changeit
> -Dsign.keypass=changeit
> -Dcheckstyle.skip=true
> -Dcobertura.skip=true
> -Dpmd.skip=true
> -DskipTests=true
> -DdatabaseUrl=jdbc:sqlserver://localhost:1433;databaseName=TEMP
> -DuserName=test
> -Dpassword=test
> -f superpom/pom.xml
>
> If I run my maven build from the command line, everything builds as
> expected. ie:
>
> [project]$ mvn clean install
>
> However, when I configure my jenkins job, it is failing as though it is not
> seeing/reading the .mvn/ folder/files. In fact, to be honest, I'm not
> entirely sure how to configure my maven project in Jenkins. If I leave my
> ROOT pom definition as blank, then Jenkins complains it doesn't have a
> pom.xml file.
>
> If I specify my root pom as superpom/pom.xml then it isn't loading any of
> my config files.
>
> To be safe, I've even tried adding my .mvn folder in my superpom folder,
> but that too is ignored.
>
> jenkins.log:
>
> [superpom] $ /var/jenkins_home/tools/hudson.model.JDK/JDK_7/bin/java
> -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/
> maven33-agent-1.8.1.jar:/var/jenkins_home/tools/hudson.
> tasks.Maven_MavenInstallation/Maven_3.3.9/boot/plexus-
> classworlds-2.5.2.jar:/var/jenkins_home/tools/hudson.
> tasks.Maven_MavenInstallation/Maven_3.3.9/conf/logging
> jenkins.maven3.agent.Maven33Main
> /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9
> /var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar
> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/
> maven33-interceptor-1.8.1.jar
> /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/
> maven3-interceptor-commons-1.8.1.jar
> 38679
> <===[JENKINS REMOTING CAPACITY]===>channel started
> using settings config with name Settings.xml
> Replacing all maven server entries not found in credentials list is true
> Executing Maven:  -B -f
> /var/jenkins_home/workspace/JB4(Maven)/superpom/pom.xml
> -Dmaven.repo.local=/var/jenkins_home/workspace/JB4(Maven)/.repository
> -s /tmp/settings4167440206098086967.xml clean install
> [INFO] Scanning for projects...
>
>
> I'm not sure if I am using the .mvn folder incorrectly, if there is
> something wrong with my Jenkins job configuration.
>
> Am I doing this right?  Am I missing a step somewhere?
>
> Thanks,
>
> Eric
>


Jenkins Maven build not seeing my .mvn folder?

2017-06-06 Thread Eric B
Hi,

I'm cross posting this to StackOverflow (
https://stackoverflow.com/q/44394234/827480) b/c I'm not truly convinced
this is a maven question per say.  Rather I think it is more something due
to my Jenkins job config that is causing some issues, but I am hoping that
maven users here may have encountered this in Jenkins as well.  Either
that, or maybe someone can point out that I'm using the .mvn folder
incorrectly.

Essentially, I have a multi-module maven project that is set up as:

|.mvn
 \-maven.config
 \-jvm.config
|superpom
 \-pom.xml (main project parent pom, includes module defns)
|module1
 \-pom.xml (parent points to ../superpom/pom.xml)
 \src
  \...
|module2
 \-pom.xml (parent points to ../superpom/pom.xml)
 \src
  \...

My maven.config file is defined as:

-Dsign.alias=cert
-Dsign.storepass=changeit
-Dsign.keypass=changeit
-Dcheckstyle.skip=true
-Dcobertura.skip=true
-Dpmd.skip=true
-DskipTests=true
-DdatabaseUrl=jdbc:sqlserver://localhost:1433;databaseName=TEMP
-DuserName=test
-Dpassword=test
-f superpom/pom.xml

If I run my maven build from the command line, everything builds as
expected. ie:

[project]$ mvn clean install

However, when I configure my jenkins job, it is failing as though it is not
seeing/reading the .mvn/ folder/files. In fact, to be honest, I'm not
entirely sure how to configure my maven project in Jenkins. If I leave my
ROOT pom definition as blank, then Jenkins complains it doesn't have a
pom.xml file.

If I specify my root pom as superpom/pom.xml then it isn't loading any of
my config files.

To be safe, I've even tried adding my .mvn folder in my superpom folder,
but that too is ignored.

jenkins.log:

[superpom] $ /var/jenkins_home/tools/hudson.model.JDK/JDK_7/bin/java
-cp 
/var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9/boot/plexus-classworlds-2.5.2.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9/conf/logging
jenkins.maven3.agent.Maven33Main
/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.9
/var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar
/var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar
/var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar
38679
<===[JENKINS REMOTING CAPACITY]===>channel started
using settings config with name Settings.xml
Replacing all maven server entries not found in credentials list is true
Executing Maven:  -B -f
/var/jenkins_home/workspace/JB4(Maven)/superpom/pom.xml
-Dmaven.repo.local=/var/jenkins_home/workspace/JB4(Maven)/.repository
-s /tmp/settings4167440206098086967.xml clean install
[INFO] Scanning for projects...


I'm not sure if I am using the .mvn folder incorrectly, if there is
something wrong with my Jenkins job configuration.

Am I doing this right?  Am I missing a step somewhere?

Thanks,

Eric


Re: Using files to activate Maven profiles

2017-06-06 Thread Jörg Schaible
Hi Darius,

DariusX wrote:

> On a micro-service leaning project, I have various modules that share
> certain common aspects among them but not everything. For instance, 5
> modules may require Swagger-UI to be downloaded and unzipped into my
> target/webapp. Some other grouping of 5 modules may require something
> else.
> 
> There no neat hierarchy "under" the parent POM, so I'm considering this
> approach:
> 
> 1. Create profiles in the parent POM to define certain aspects within the
> build
> 2. Activate each profile, by the presence of a specific "indicator" file
> 3. In any sub-project that needs a specific feature, create the relevant
> indicator file
> 4. Maybe I'll have a main/maven directory, as a place to keep indicator
> files
> 
> I'm looking for thoughts of the pros and cons of this approach. I'd also
> like to know if there's a more idiomatic approach.

Activating profiles based on file existance is a neat solution for build 
variations and in the meanwhile often used in the way you're describing it 
above. However, you should never use profiles to manage dependencies. That's 
a recipe for desaster for consumers of your artifacts. Note, the file that 
triggers the profile exists only at build time...

Cheers,
Jörg


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