Hello ok999,

> Assuming maven was already installed in the node & have the files 
configured (settings.xml, local repo etc) from the TOOLS setting of 
jenkins.. 
> Will this plugin override those settings? 

Yes, "withMaven(){}" will override all the settings that you define with 
the wrapper. We do it creating a shell wrapper of the "mvn" / "mvn.bat" 
command.

If you specify a "jdk" with "withMaven(jdk: 'my-jdk'){}" then we will 
override "JAVA_HOME" and add this new "$JAVA_HOME/bin" to the "PATH"
If you specify a "mavenInstallation" then we will override "MAVEN_HOME", 
"M2_HOME", we will ensure that the "mvn" wrapper that we create with 
"withMaven()" points to this desired MAven installation.
If you specify a "mavenSettingsConfig", we will pass it as a "--settings" 
when invoking the "mvn" executable
If you specify a "mavenLocalRepo", we will pass the system property 
"-Dmaven.repo.local="

You can see all these details enabling a FINE logger on 
"org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution"

I have created a gist that details these 
https://gist.github.com/cyrille-leclerc/a9db59d346c937c8bdde2113df7653d5

> And is there any plan for the maven release plugin in pipeline? At the 
moment i am using the 'bat' to call the goals for release:prepare and 
release:perform   

We focus for the moment on covering as many Maven use cases as possible 
with the "withMaven(...){}" wrapper. We hope that a Maven execution step 
will appear soon.

I feel that a Maven release is already pretty straight forward with the 
"withMaven(...){}" wrapper. The following code actually works:

node {
>     withMaven(mavenSettingsConfig: 'maven-settings-for-game-of-life', 
> mavenInstallation: 'M3', jdk: 'Oracle JDK 8') {
>         git 'https://github.com/cyrille-leclerc/my-spring-boot-app.git'
>         sh "mvn release:prepare release:perform"
>     }
> }




On Thursday, August 11, 2016 at 10:06:31 PM UTC+2, ok999 wrote:
>
> Assuming maven was already installed in the node & have the files 
> configured (settings.xml, local repo etc) from the TOOLS setting of 
> jenkins.. 
> Will this plugin override those settings? 
>
>  withMaven(mavenInstallation: 'M3', mavenLocalRepo: '.repository', 
> mavenSettingsConfig: 'maven-settings-for-gameoflife') {
>         // Run the maven build        sh "mvn clean install"
>     }
>
>
>
> And is there any plan for the maven release plugin in pipeline? At the moment 
> i am using the 'bat' to call the goals for release:prepare and 
> release:perform   
>
>
>
> Thanks
>
>
>
>
>
>
> On Thu, Aug 11, 2016 at 11:33 AM, Álvaro Lobato <[email protected] 
> <javascript:>> wrote:
>
>>
>> Hello everyone,
>>
>> I'd like to introduce you to the new Pipeline Maven 
>> <https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Maven+Plugin> plugin . 
>> The intention of this plugin is to help using maven from pipeline, setting 
>> up a maven environment by using a withMaven step. This environment can 
>> later be called with sh or bat step.
>>
>> The supported configuration parameters are:
>>
>>    - Maven Installation
>>    - JDK
>>    - Maven Settings Config (Config File Provider Plugin)
>>    - Maven Settings File Path 
>>    - Maven JVM Opts 
>>    - Maven Local Repository 
>>
>> The step can be used used directly on a node or in a docker.inside.
>>
>> Currently it is in an early stage of development and I've just released 
>> the first beta version, already available in the update center.
>>
>> This is the start point for a more feature rich integration between 
>> pipeline and maven.
>>
>> You can find more information on the wiki page: Pipeline Maven plugin 
>> <https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Maven+Plugin> 
>>
>> Thanks
>> Alvaro.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/81089a41-3bdf-47a4-bdad-b4424d27341b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/81089a41-3bdf-47a4-bdad-b4424d27341b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Regards
> nirish okram
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e5d55996-1800-4696-8e7b-f4f14f43d4f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to