In general I dislike having plugins that run the actual tool within the JVM
of Jenkins or the Slaves. There are all sorts of issues that you encounter
such as class conflicts, dependency hell, etc.

The best way to run a build tool - in my opinion - is to fork a process
specifically for that build tool. I would note that this is how Maven has
been moving towards, IOW that the individual Maven plugins actually fork
for their Java based tools rather than trying to shoehorn into the Maven
JVM.

So my recommendation to you is that you fork a JVM for the build part, and
do any post-processing of results in that forked JVM. That way you can
completely control the classpath of the forked JVM and not worry about
other things. It also allows you to have builds that work with different
versions of the tool on the same Jenkins instance.

HTH

On 22 June 2015 at 16:28, 'Laurence Bordowitz' via Jenkins Developers <
[email protected]> wrote:

> I think the answer to this question is probably no:
>
> *Q:* Are all Jenkins jobs each run in separate JVM instances?
>
> I'm asking this because I'm working on creating a plugin for the static
> code analysis tool sputnik <https://github.com/TouK/sputnik>, but it has
> some deficiencies... There's a class in it called "ConfigurationHolder"
> which holds a static mutable singleton instance of the sputnik
> configuration. If all plugins were run in the same JVM, starting a new job
> would immediately affect another job's configuration.
>
> Also, what is the lifecycle of a plugin? I've done work on plugins before,
> but I still don't really know when the plugin instance gets created, run,
> etc.
>
> -- Larry Bordowitz
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/501668687.3194673.1434986923236.JavaMail.yahoo%40mail.yahoo.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/501668687.3194673.1434986923236.JavaMail.yahoo%40mail.yahoo.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 Developers" 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-dev/CA%2BnPnMx%3DKDx4Z5NuhM59hqL_Ru77G2WV%3Do_Q63MNBAQ5s67SZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to