Jesse Glick has answered
in https://issues.jenkins-ci.org/browse/JENKINS-43596
I am working on something that will look like withMaven(options:
[artifacts(), findbugs(unstableOnThreshold: 5), tests(excludes:
'**/PerformanceTest')]) {…}
Cyrille
On Tuesday, May 16, 2017 at 1:52:55 AM UTC-7, Baptiste Mathus wrote:
>
> I tend to prefer the hierarchical approach. IMO it should /scale/ better,
> being more readable/organized. Without this, you'll indeed end up with very
> long options using camelCase.
>
> 2017-05-12 20:16 GMT+02:00 Cyrille Le Clerc <[email protected]
> <javascript:>>:
>
>> Note: Mark Lagendijk proposed a hierarchical approach for options in
>> JENKINS-43596 <https://issues.jenkins-ci.org/browse/JENKINS-43596>. It
>> is a bit more sophisticated, more standardized ... but a bit more verbose
>> than what we tried in my previous post
>>
>>
>> *Hierarchical & standardized model*
>>
>> withMaven(
>>
>> maven: 'maven-3.3.9',
>> mavenSettingsConfig: 'maven-settings-for-gameoflife',
>> options: [
>> artifactReporter: [
>> disabled: true // default = false ],
>> someOtherReporter: [
>> options: [] // whatever options this reporter accepts ]
>> ]
>> ) {
>>
>>
>> sh "mvn package"
>>
>> }
>>
>>
>> *Flat & not-standardized model*
>>
>> withMaven(
>>
>> maven: 'maven-3.3.9',
>> mavenSettingsConfig: 'maven-settings-for-gameoflife',
>> options: [
>> skipArchiveGeneratedArtifacts: true,
>> fingerprintDependenciesExclude: "org.springframework.*"
>> ]
>> ) {
>>
>>
>> sh "mvn package"
>>
>> }
>>
>>
>>
>>
>>
>>
>> On Friday, May 12, 2017 at 11:25:41 AM UTC+2, Cyrille Le Clerc wrote:
>>>
>>> Idea discussed with Alvaro Lobato: introduce an "options" Map<String,
>>> Object> as a parameter of withMaven(). We will also make these options
>>> configurable at the Jenkins global level then at the folder level.
>>>
>>> See sample below
>>>
>>> node {
>>> stage ("build") {
>>> git "https://github.com/spring-projects/spring-petclinic.git"
>>> withMaven(
>>> maven: 'maven-3.3.9',
>>> mavenSettingsConfig: 'maven-settings-for-gameoflife',
>>> options: [
>>> skipArchiveGeneratedArtifacts: true,
>>> fingerprintDependenciesExclude: "org.springframework.*"]
>>> ) {
>>> sh "mvn clean package"
>>> }
>>> }
>>> }
>>>
>>>
>>>
>>> On Friday, April 14, 2017 at 12:37:40 PM UTC+2, Cyrille Le Clerc wrote:
>>>>
>>>> Hello Valentina,
>>>>
>>>> We are going to look at this soon.
>>>>
>>>> We have requests to have a more elegant solution to disable reporters
>>>> (see JENKINS-43596 Add withMaven options for skipping
>>>> <https://issues.jenkins-ci.org/browse/JENKINS-43596>).
>>>> We don't know yet what would be the right syntax to add configuration
>>>> flags that could be consumed by the withMaven step itself or by reporters
>>>> (JUnit, archiver, FindBugs, Task Scanner...).
>>>>
>>>> Cyrille
>>>>
>>>>
>>>> On Wednesday, March 22, 2017 at 11:13:23 AM UTC+1, Valentina Armenise
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'd like to customize the withMaven step from the Pipeline Maven
>>>>> Plugin to take as input the parameters which you would normally pass to a
>>>>> publisher. Specifically I'd like to be able to do something like
>>>>>
>>>>> step([$class: 'FindBugsPublisher', canRunOnFailed: true, defaultEncoding:
>>>>> 'UTF-8', excludePattern: '', healthy: '', includePattern: '', pattern:
>>>>> '**/target/findbugsXml.xml', shouldDetectModules: true, unHealthy: '',
>>>>> unstableTotalAll: '0', useStableBuildAsReference : true])
>>>>>
>>>>>
>>>>> In order to define the thresholds or other things..
>>>>>
>>>>>
>>>>> Looking at the code, does not seem to be possible today. Is it correct?
>>>>>
>>>>> --
>> 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/e7b7a2c1-067c-487a-945b-53df9babc97b%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jenkinsci-users/e7b7a2c1-067c-487a-945b-53df9babc97b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/09d6356f-a202-4ec8-a6ea-9e49c88418cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.