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



Re: Work-around for antrun AttachArtifact not working in external Ant build file

2017-06-06 Thread Jürgen Weber
Hi Guillaume,

with inheritRefs attachartifact works perfectly for me.

Merci beaucoup,

Juergen

Am 03.06.2017 20:26 schrieb "Guillaume Boué" :

> That means you're missing inheritRefs=true in the  task. It is
> necessary for the references to be propagated to subprojects.
>
> I've also added an integration test in https://github.com/apache/mave
> n-plugins/tree/trunk/maven-antrun-plugin/src/it/attach-
> artifact-from-ant-task that you can maybe look at.
>
> Guillaume
>
>
> Le 02/06/2017 à 10:21, Jürgen Weber a écrit :
>
>> Hi,
>>
>> no, still does not work.
>>
>> Where is your changed source? I could run it in the debugger..
>>
>> Juergen
>>
>> Maven project reference not found: maven.project.ref
>>
>> at
>> org.apache.maven.ant.tasks.AttachArtifactTask.execute(Attach
>> ArtifactTask.java:80)
>>
>> Am 01.06.2017 19:17 schrieb "Guillaume Boué" :
>>
>> It's currently in Apache snapshot repository located at
>>> https://repository.apache.org/content/repositories/snapshots. You can
>>> add
>>> this repository as a plugin repository to your settings or POM for the
>>> test.
>>>
>>>  
>>>apache-snapshots-plugin
>>>https://repository.apache.org/content/repositories/
>>> snapshots/
>>> 
>>>
>>>  true
>>>
>>>  
>>>
>>>
>>> Le 01/06/2017 à 16:25, Jürgen Weber a écrit :
>>>
>>> There is no 3.0.0-SNAPSHOT of maven-antrun-plugin, is it?
 org/apache/maven/ant/tasks/AttachArtifactTask.class is in
 maven-antrun-plugin-1.8.jar


 Am 31.05.2017 19:57 schrieb "Guillaume Boué" :

 Hi,

 I looked into this issue and committed a fix for it. The core problem
 was
 that the 'attachartifact' task launched from the external Ant build was
 working from a clone of the Maven project, instead of the project
 itself.
 Can you try the latest 3.0.0-SNAPSHOT and report back?



 Le 31/05/2017 à 19:14, Jürgen Weber a écrit :

 Hi,

> I found a solution, not pretty, but it actually works:
>
> in an pom-inline antrun task call a Javascript function with the
> project as parameter, in Javascript one can do all interesting things
> (loop over properties from an ant property file) and call the
> attachartifact task.
>
> Cheers,
> Juergen
>
> 
>   load("script.js");
> runtaskf(self.getProject());
> ]]>
> 
> 
>
> script.js:
>
> var runtaskf = function(project) {
> aa = project.createTask("attachartifact");
> f = new java.io.File("my.jar");
> aa.setFile(f);
> aa.setType("jar");
> aa.setClassifier("test");
> aa.perform();
> }
>
> 2017-05-31 18:32 GMT+02:00 Karl Heinz Marbaise :
>
> Hi,
>
>> if i correctly understand you have a property file for each
>> environment
>> and
>> maybe some other files and a base artifact (jar/war?) now it sounds
>> you
>> have
>> to build for each environment a different jar/war ?
>>
>> Maybe something like this could help here:
>>
>> https://github.com/khmarbaise/multienv-maven-plugin/
>>
>> or:
>>
>> https://github.com/khmarbaise/iterator-maven-plugin/
>>
>>
>> Kind regards
>> Karl Heinz Marbaise
>>
>>
>> On 31/05/17 11:42, Jürgen Weber wrote:
>>
>> Hi Jörg,
>>
>>> problem is, I have to build message driven beans, some 20, only
>>> difference
>>> is the queue name in the deployment descriptor. Queue names are
>>> listed
>>> in
>>> a
>>> property file.
>>>  I know that Maven wants no environment specific properties in
>>> artifacts,
>>> but Sun defined the activation spec for MDBs. And the activation spec
>>> is
>>> in
>>> code or in ejb-jar.xml, both in the mdb jar. So I have to build a
>>> different
>>> MDB for each queue. And I have to iterate over the queues (which is
>>> possible in ant + JavaScript. Yuck).
>>> So I'd need to attach n artefacts, wherea in a Maven pom I have to
>>> list
>>> each artefact individually.
>>> Greetings, Jürgen
>>>
>>> Am 30.05.2017 08:45 schrieb "Jörg Schaible"
>>> >>
>>> :
>>>
 Hi Jürgen,

>>> Jürgen Weber wrote:
>>>
>>> What is the recommended work-around for attaching artifacts created
>>> by
>>>
>>> antrun?

 * forward target directory as variable to ant ?

 That helps if the created files should be removed in a normal
 "clean"

>>> phase.
>>>
>>> * build-helper-maven-plugin attach-artifact ?
>>> Definitely the proper action.
>>>
>>> http://technotes.khitrenovich.com/attach-maven-artifact-
>>> external-build-xml-file/
>>>
>>> https://issues.apache.org/jira/browse/MANTRUN-181

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



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: 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: 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
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 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: 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

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