Using a simple freestyle job, just add a first step to check the pom.xml
(use what works best for you: shell, ant...), then call the typical mvn
build.

A failing step will fail the whole build immediately (hence not call the
mvn build in that example)

Cheers
Le 18 nov. 2015 3:06 AM, "Mark Bidewell" <[email protected]> a écrit :

> We do something similar to validate the connections section of a pom.  We
> use an ant script to do the validation.
>
> On Tuesday, November 17, 2015 at 12:22:20 PM UTC-5, Andreas G. wrote:
>>
>> Hi guys,
>>
>> completely new to Jenkins and need help with a super simple thing.
>>
>> In my setup I would like to check if the "version" tag in the main
>> pom.xml of our project has the correct value. And if it has not the correct
>> value the build is supposed to fail. I looked around but my understanding
>> of the "pre-build step" (which seems the correct place for this kind of
>> stuff) is that should the script fail the build still carries on.
>>
>> Happy about any feedback.
>>
>> --Andreas
>>
> --
> 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/cce35d18-7cd0-4f6d-884f-bb18ad2bd8a8%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/cce35d18-7cd0-4f6d-884f-bb18ad2bd8a8%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/CANWgJS4TEU4ZQUPERkgMA9HfFohjxKKjk8LWdF%2B3W%3D7zU5ReFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to