Re: hpi:run classpath hell

2012-10-26 Thread Ognjen Bubalo
Hi,

Yes for me it did work, but not with the hpi:run. Just in live usage (mvn 
clean install - .hpi manually added). The thing is that the hpi:run is 
executed in the compile phase, so with mvn install (when creating a .hpi) 
the plugin configuration works, but for some reason hpi:run does not. I did 
not investigate further. It should be just a different setting phase+goal. 
I'll try it soon and if I succeed I'll also update the wiki. If you find a 
solution for this please post a comment.

Currently this is the pom.xml configuration:
plugins
  ...

 plugin
  groupIdorg.jenkins-ci.tools/groupId
  artifactId
 maven-hpi-plugin
  /artifactId
  executions
 execution
   phasecompile/phase
   goals
 goalhpi/goal
   /goals
 /execution
   /executions

  configuration

pluginFirstClassLoadertrue/pluginFirstClassLoader
maskClassesorg.objectweb.asm./maskClasses
  /configuration
/plugin
...
/plugins


I had the problem with the org.objectweb.asm package.

Ref: https://jenkins-ci.org/maven-hpi-plugin/run-mojo.html

Cheers,
Ogi

On Tuesday, October 23, 2012 11:38:28 PM UTC+2, Stephen Connolly wrote:

 'tis a fair cop

 On 23 October 2012 20:18, Jesse Glick jgl...@cloudbees.com 
 javascript:wrote:

 On 10/23/2012 02:44 PM, Stephen Connolly wrote:

 You seriously suggesting I have time to update wikis?


 Nope! Was actually addressing Ognjen, who claims to have had success 
 combining pluginFirstClassLoader with maskClasses.




Re: hpi:run classpath hell

2012-10-23 Thread Edo Shor
This configuration option is not available in the jenkins version of the 
plugin, only in the hudson one.

My parent pom is 
parent
groupIdorg.jenkins-ci.plugins/groupId
artifactIdplugin/artifactId
version1.466/version
/parent

Any chance to incorporate this functionality in the jenkins version ?

I've tried using this version of the plugin but it looks for the hudson.war 
and we're building for jenkins...
Any workaround for that ?

10x
Edo

On Monday, October 22, 2012 2:16:43 PM UTC+2, domi wrote:

 I have updated the documentation: 

 https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Structure#PluginStructure-Classloader
  
 /Domi 

 On 21.10.2012, at 10:28, Edo Shor 
 edo@whitesourcesoftware.comjavascript: 
 wrote: 

  Hi, 
  
  My plugin uses velocity engine v 1.7 for creating reports. Can't change 
 that. 
  HPI plugin has a transitive dependency on v1.4 of this library causing 
 classpath hell erros. 
  I've tried to get rid of it somehow with maven excludes with no avail. 
  
  Is there any chance to change the way the plugin launches jenkins ? 
  Maybe some standalone jvm ? or a fresh classloader ? 
  



Re: hpi:run classpath hell

2012-10-23 Thread domi
It is in the jenkins version too, I just checked the sources and changed the 
groupId in the docu too.
/Domi 


On 23.10.2012, at 11:03, Edo Shor edo.s...@whitesourcesoftware.com wrote:

 This configuration option is not available in the jenkins version of the 
 plugin, only in the hudson one.
 
 My parent pom is 
 parent
 groupIdorg.jenkins-ci.plugins/groupId
 artifactIdplugin/artifactId
 version1.466/version
 /parent
 
 Any chance to incorporate this functionality in the jenkins version ?
 
 I've tried using this version of the plugin but it looks for the hudson.war 
 and we're building for jenkins...
 Any workaround for that ?
 
 10x
 Edo
 
 On Monday, October 22, 2012 2:16:43 PM UTC+2, domi wrote:
 I have updated the documentation: 
 https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Structure#PluginStructure-Classloader
  
 /Domi 
 
 On 21.10.2012, at 10:28, Edo Shor edo@whitesourcesoftware.com wrote: 
 
  Hi, 
  
  My plugin uses velocity engine v 1.7 for creating reports. Can't change 
  that. 
  HPI plugin has a transitive dependency on v1.4 of this library causing 
  classpath hell erros. 
  I've tried to get rid of it somehow with maven excludes with no avail. 
  
  Is there any chance to change the way the plugin launches jenkins ? 
  Maybe some standalone jvm ? or a fresh classloader ? 
  
 



Re: hpi:run classpath hell

2012-10-23 Thread Edo Shor
Sorry, my bad. I thought it was part of the run goal.

Unfortunately, the run goal ignore this option when it generates the .hpl 
file.
Any idea ?


On Tuesday, October 23, 2012 11:30:29 AM UTC+2, domi wrote:

 It is in the jenkins version too, I just checked the sources and changed 
 the groupId in the docu too.
 /Domi 


 On 23.10.2012, at 11:03, Edo Shor 
 edo@whitesourcesoftware.comjavascript: 
 wrote:

 This configuration option is not available in the jenkins version of the 
 plugin, only in the hudson one.

 My parent pom is 
 parent
 groupIdorg.jenkins-ci.plugins/groupId
 artifactIdplugin/artifactId
 version1.466/version
 /parent

 Any chance to incorporate this functionality in the jenkins version ?

 I've tried using this version of the plugin but it looks for the 
 hudson.war and we're building for jenkins...
 Any workaround for that ?

 10x
 Edo

 On Monday, October 22, 2012 2:16:43 PM UTC+2, domi wrote:

 I have updated the documentation: 

 https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Structure#PluginStructure-Classloader
  
 /Domi 

 On 21.10.2012, at 10:28, Edo Shor edo@whitesourcesoftware.com 
 wrote: 

  Hi, 
  
  My plugin uses velocity engine v 1.7 for creating reports. Can't change 
 that. 
  HPI plugin has a transitive dependency on v1.4 of this library causing 
 classpath hell erros. 
  I've tried to get rid of it somehow with maven excludes with no avail. 
  
  Is there any chance to change the way the plugin launches jenkins ? 
  Maybe some standalone jvm ? or a fresh classloader ? 
  




Re: hpi:run classpath hell

2012-10-23 Thread Jesse Glick

On 10/21/2012 09:06 AM, Stephen Connolly wrote:

There is a config option that lets you set the plugin's class loader as child 
first.


And IIRC Ognjen found it useful to combine this with another option…please 
update the wiki with details if so.


Re: hpi:run classpath hell

2012-10-23 Thread Stephen Connolly
Jesse you know my backlog... You seriously suggesting I have time to update
wikis? ;-)

On Tuesday, 23 October 2012, Jesse Glick wrote:

 On 10/21/2012 09:06 AM, Stephen Connolly wrote:

 There is a config option that lets you set the plugin's class loader as
 child first.


 And IIRC Ognjen found it useful to combine this with another option…please
 update the wiki with details if so.



Re: hpi:run classpath hell

2012-10-22 Thread domi
I have updated the documentation:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Structure#PluginStructure-Classloader
/Domi

On 21.10.2012, at 10:28, Edo Shor edo.s...@whitesourcesoftware.com wrote:

 Hi,
 
 My plugin uses velocity engine v 1.7 for creating reports. Can't change that.
 HPI plugin has a transitive dependency on v1.4 of this library causing 
 classpath hell erros.
 I've tried to get rid of it somehow with maven excludes with no avail.
 
 Is there any chance to change the way the plugin launches jenkins ? 
 Maybe some standalone jvm ? or a fresh classloader ?
 



Re: hpi:run classpath hell

2012-10-21 Thread Stephen Connolly
There is a config option that lets you set the plugin's class loader as
child first. Cannot recall what it is exactly called though

Sent from my iPhone

On Sunday, 21 October 2012, Edo Shor wrote:

 Hi,

 My plugin uses velocity engine v 1.7 for creating reports. Can't change
 that.
 HPI plugin has a transitive dependency on v1.4 of this library causing
 classpath hell erros.
 I've tried to get rid of it somehow with maven excludes with no avail.

 Is there any chance to change the way the plugin launches jenkins ?
 Maybe some standalone jvm ? or a fresh classloader ?