Packing extra files along with depedency jars in hpi

22 views
Skip to first unread message

Rajeev Ranjan

unread,
Feb 12, 2019, 2:40:35 PM2/12/19
to Jenkins Developers
Hi team,
There's a issue which is bugging me a lot from a while. Don't know if it has been asked before.
I am working on one plugin where I need some powershell files to execute some commands, and is shared across some different projects. These files are placed in public respository in a remote location. Is it possible to get these files at build time and package these extra files in the hpi, along with dependency jars which is created? If yes, how?
Note: files are not in java project, so can't add as project depenenct itself.
Thanks in advance

Gavin Mogan

unread,
Feb 12, 2019, 4:12:09 PM2/12/19
to jenkin...@googlegroups.com
Can you put the files inside the resources directory and access them using getResources()?

If so, then a build step could be added to maven to get the files you want - ex https://github.com/maven-download-plugin/maven-download-plugin

--
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/ed8012c9-12f3-43c7-a442-df8b89437ac9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Baptiste Mathus

unread,
Feb 14, 2019, 5:36:54 PM2/14/19
to Jenkins Developers
Definitely sounds like a maven-remote-resources-plugin use case.
Used this in the past to share versioned pmd rulesets IIRC, worked like a charm.

--

Rajeev Ranjan

unread,
Feb 16, 2019, 9:59:52 AM2/16/19
to Jenkins Developers
Thanks Gavin for replying, worked like a charm. Didn't know about the plugin.
Reply all
Reply to author
Forward
0 new messages