Extending the maven plugin to take into account more SNAPSHOT dependency locations

33 views
Skip to first unread message

Robert Munteanu

unread,
Sep 29, 2016, 5:29:18 PM9/29/16
to Jenkins Developers
Hi,

I'm currently using the Maven plugin's 'Build whenever a SNAPSHOT dependency is built' feature, which works fine.

However, we also have some dependencies which are looked up using Maven but defined inside a text file [1].

Those dependencies are not picked up by Jenkins, and I'd like to teach it to do that.

I've briefly looked at the source code but did not find where the SNAPSHOT dependencies are collected. What's the best way to design such an enhancement?

Thanks,

Robert

[1]: http://sling.apache.org/documentation/development/slingstart.html

Jesse Glick

unread,
Sep 30, 2016, 10:46:08 AM9/30/16
to Jenkins Dev
On Thu, Sep 29, 2016 at 5:29 PM, Robert Munteanu
<robert....@gmail.com> wrote:
> I've briefly looked at the source code but did not find where the SNAPSHOT
> dependencies are collected. What's the best way to design such an
> enhancement?

I would advise you to steer clear of this plugin. Safer and better to
use a generic project type (freestyle, Pipeline) and implement a
`Trigger` for this use case.

Stephen Connolly

unread,
Sep 30, 2016, 11:18:41 AM9/30/16
to jenkin...@googlegroups.com
@jesse welcome to the "maven job type considered evil" club

-Stephen
(Founding member 2007)
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr129OwHLinF_eQ1wB0GKXCqjnTgeTmt5vz22P7iH0550g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Sent from my phone

Robert Munteanu

unread,
Sep 30, 2016, 4:38:42 PM9/30/16
to jenkin...@googlegroups.com
Well, let me give you a bit of context about my current situation.

I use the Job DSL plugin to maintain about 300 build jobs

https://builds.apache.org/view/S-Z/view/Sling

That's the result of breaking down a huge reactor build which was too
slow and too flaky to be of use. Now we have small jobs which each
build one Maven module. I'm quite happy with the results.

I started off with freestyle jobs, but then realised that triggering
builds based on SNAPSHOT dependencies is available for the Maven job
types only, so I switched to Maven jobs. Now I need to implement
another trigger, which is not available.

Would you recommend that I implement two custom triggers, one
replicating the functionality which exists in the Maven plug-in, and
one which adds the functionality that I want?

Thanks,

Robert



--
http://robert.muntea.nu/

Jesse Glick

unread,
Oct 3, 2016, 5:08:16 PM10/3/16
to Jenkins Dev
On Fri, Sep 30, 2016 at 4:38 PM, Robert Munteanu
<robert....@gmail.com> wrote:
> Would you recommend that I implement two custom triggers, one
> replicating the functionality which exists in the Maven plug-in, and
> one which adds the functionality that I want?

I guess. Really I would recommend going back to one build and fixing
the slowness and the flakiness, but YMMV.
Reply all
Reply to author
Forward
0 new messages