How to utilize maven configurations in custom plugin.

11 views
Skip to first unread message

phanikumar

unread,
Oct 4, 2017, 9:13:52 AM10/4/17
to jenkin...@googlegroups.com
Hello team,

I have developed a plugin for Google App Engine Deployment. I would like to
customize it furthermore by providing the users to select the maven version
for compilation and deployment. Is there a way by which I can provide the
users to select specific maven version.




--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-dev-f387835.html

Robert Sandell

unread,
Oct 4, 2017, 9:34:19 AM10/4/17
to jenkin...@googlegroups.com
Not exactly version, but Jenkins has a thing called ToolInstallers [1] that is used for users to select what tool (and version) to install.
There is one of those implemented for Maven, the first usage example that came to mind is in the withMaven step [2], but htere might be easier examples to refer to.

/B



--
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-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1507122823703-0.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

phanikumar

unread,
Oct 5, 2017, 6:08:25 PM10/5/17
to jenkin...@googlegroups.com
The above code helped me in getting the maven installation drop-down in my
plugin. But for getting the Installer path it is suggesting me to get the
path using ToolKitInstaller.getHome. How do I get the exact maven path from
the bunch of available maven installations? Is there a sample code to get
the maven binary path from the selected name. Any help is really
appreciated.

Thanks in Advance.
Reply all
Reply to author
Forward
0 new messages