Packing extra files along with depedency jars in hpi

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Packing extra files along with depedency jars in hpi

Rajeev Ranjan
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

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Packing extra files along with depedency jars in hpi

Gavin Mogan-2
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

On Tue, Feb 12, 2019 at 11:40 AM Rajeev Ranjan <[hidden email]> wrote:
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

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAAgr96%2BAkBseMWz3z5wHcg40Xshn%2BgZ4%2BoU8xZgqVZn0YEnA%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Packing extra files along with depedency jars in hpi

Baptiste MATHUS
In reply to this post by Rajeev Ranjan
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.

Le mar. 12 févr. 2019 à 20:40, Rajeev Ranjan <[hidden email]> a écrit :
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

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS7YU6V9NSP7nYJcxYP15999QQ_mP2H_B%2BARbx%2BRwSMhmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Packing extra files along with depedency jars in hpi

Rajeev Ranjan
In reply to this post by Gavin Mogan-2
Thanks Gavin for replying, worked like a charm. Didn't know about the plugin.

On Wednesday, February 13, 2019 at 2:42:09 AM UTC+5:30, Gavin Mogan wrote:
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 <a href="https://github.com/maven-download-plugin/maven-download-plugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmaven-download-plugin%2Fmaven-download-plugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyDkOya0rFAdZuy42Y8ZJZ3wmTGw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmaven-download-plugin%2Fmaven-download-plugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyDkOya0rFAdZuy42Y8ZJZ3wmTGw&#39;;return true;">https://github.com/maven-download-plugin/maven-download-plugin

On Tue, Feb 12, 2019 at 11:40 AM Rajeev Ranjan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xxo_jHscAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rajeevr...@...> wrote:
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

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="xxo_jHscAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/ed8012c9-12f3-43c7-a442-df8b89437ac9%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/ed8012c9-12f3-43c7-a442-df8b89437ac9%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/ed8012c9-12f3-43c7-a442-df8b89437ac9%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/ed8012c9-12f3-43c7-a442-df8b89437ac9%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/033e44f6-426b-4625-be01-819386f09668%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.