I want to create a jenkins-aware maven build extension. Specifically I want
to keep some global state during builds, and transfer files between slaves.
Using remoting seems like the obvious and easiest way to go. I have a few
questions on how to proceed.

Remoting only happens in maven project. Most of our project are now
freestyle projects with maven calls, but they can probably be converted to
maven projects. Is there concensus on freestyle vs maven style projects? Is
there a reason for no remoting on maven call in freestyle projects?

I can use a PlexusModuleContributorFactory to load .jar files in maven.
With some maven voodoo (dependency:copy-dependencies &
dependency:build-classpath) I can probably package all needed jars in a
jenkins plugin. How do I use that to provide a list of URLs for the
PlexusModuleContributor? Do I point to
${JENKINS_CONTEXT_PATH}/plugin/SHORTNAME/dependencies.jar ? That seems
inefficient, and could potentially run in to authorization issues. Or
should I somehow copy the .jar files to the slave? In that case I would
rather have PlexusModuleContributor return a list of FilePaths, and let
MavenXProcessFactory.InstallPlexusModulesTask take care of local file/url
setup.
Is there an example of a plugin using PlexusModuleContributorFactory?

For now I've sidestepped this issue and just dropped my build extension +
dependencies in MAVEN_HOME/lib/ext. Now I get ClassNotFoundException:
Channel because the remoting.jar is loaded in realm "hudson-remoting", a
child of realm "plexus.core". MavenXMain.addPlexusComponents() has the same
behaviour. Should it perhaps use a new child realm of "hudson-remoting"? Or
should PlexusModuleContributor be able to specify its realm?

An alternative solution would be to include my own copy of remoting.jar and
have the jenkins plugin set up a separate channel to the slave computer (or
directly to master?), passing tcp port via environment properties. It's not
the cleanest solution, but it looks like it would be a lot easier to
implement.



Wannes

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to