Re: Validate Button to run doCheck method of other fields

2015-02-06 Thread James Richard
I found that there is a way to invoke the check methods using the Stapler : Stapler.getCurrent().invoke(Stapler.getCurrentRequest(), Stapler. getCurrentResponse(), this, "/checkField"); The only problem is that the FormValidation messages appear next to the button not where the TextBox message

Re: Validate Button to run doCheck method of other fields

2015-02-06 Thread James Richard
I found that there is a way to invoke the check methods using the Stapler : Stapler.getCurrent().invoke(Stapler.getCurrentRequest(), Stapler. getCurrentResponse(), this, "/checkField"); The only problem is that the FormValidation messages appear next to the button not where the TextBox messages

Validate Button to run doCheck method of other fields

2015-02-06 Thread James Richard
Hello, I was wondering if there was a way to run other doCheck methods when the method for a ValidateButton finishes? For example, say I have a textbox with a file name and it's doCheck method looks to see if the file exists. If the file doesnt exist the User can press on the validate butt

Re: Unfinished implementation in SCM class for buildEnvVars method

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 10:59 AM, Paul Allen wrote: > ERROR: P4: Run not instance of AbstractBuild. Sounds like an error coming from your own code. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop re

Re: Unfinished implementation in SCM class for buildEnvVars method

2015-02-06 Thread Paul Allen
Sorry to ask so many questions... I'm getting the error: Started by user anonymous Running: Allocate node : Start Running on Achilles in /home/pallen/jenkins_slave/workspace/Workflow1 Running: Allocate node : Body : Start Running: General SCM Running: Allocate node : Body : End Running: Allocate

Re: Unfinished implementation in SCM class for buildEnvVars method

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 10:44 AM, Paul Allen wrote: > How would I add support for 'p4:' syntax instead (like the 'git:' example) > instead of the 'scm: [$class: 'PerforceScm']' syntax? For that you would need to create a custom subclass of SCMStep, thus adding at least an optional dependency on t

Re: Unfinished implementation in SCM class for buildEnvVars method

2015-02-06 Thread Paul Allen
How would I add support for 'p4:' syntax instead (like the 'git:' example) instead of the 'scm: [$class: 'PerforceScm']' syntax? > On 6 Feb 2015, at 15:08, Jesse Glick wrote: > > On Fri, Feb 6, 2015 at 9:27 AM, Paul Allen wrote: >> I have been following the Mercurial Plugin as an example. >

Re: Subversion plugin 2.5 and Multiple SCM 0.3 problem

2015-02-06 Thread Craig Rodrigues
On Fri, Feb 6, 2015 at 5:22 AM, Jesse Glick wrote: > > Probably this and other issues in multiple-scms are not really > fixable, given the design of the SCM interface. My recommendation is > to avoid that plugin, and if you need multiple checkouts in one build, > use Workflow which supports this

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 10:05 AM, Nigel Magnay wrote: > What's the current story with guava? Hell. > I.E: if you're pluginFirstClassLoader and a later-than-core guava in > WEB-INF/lib, will this work? If you are very careful. > I notice jclouds-plugin goes to lengths to shade its dependency. It

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 10:00 AM, Kirill wrote: > The problem is that the users of Plugin B recently started to complain that > they regularly get errors "java.lang.ClassCastException: com.foo.EventImpl > cannot be cast to com.foo.Event". Library XX contains an interface > com.foo.Event and an impl

Re:

2015-02-06 Thread Ivo Bellin Salarin
Thanks Jesse, I'm thus using setSCM instead of getSCMs. Le Fri Feb 06 2015 at 4:18:41 PM, Jesse Glick a écrit : > On Fri, Feb 6, 2015 at 10:02 AM, Ivo Bellin Salarin > wrote: > > Why am I getting this error? > > Because https://github.com/jenkinsci/jenkins/blob/ > 17baaf7151fb3dbb5c7c79ac61a3b

Re:

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 10:02 AM, Ivo Bellin Salarin wrote: > Why am I getting this error? Because https://github.com/jenkinsci/jenkins/blob/17baaf7151fb3dbb5c7c79ac61a3bf2769dd82f6/core/src/main/java/hudson/model/Project.java#L120 is intentionally given a signature which makes it impossible to a

Re: Unfinished implementation in SCM class for buildEnvVars method

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 9:27 AM, Paul Allen wrote: > I have been following the Mercurial Plugin as an example. Good, that is the most straightforward example, because I wrote it. :-) > Not sure if there is anything specific I need to implement for the p4 plugin > to support the Workflow: SCM Ste

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Nigel Magnay
What's the current story with guava? I.E: if you're pluginFirstClassLoader and a later-than-core guava in WEB-INF/lib, will this work? Or are you saying this implementation will 'leak' into other plugins? I notice jclouds-plugin goes to lengths to shade its dependency. It'd be nice if the jenkins

[no subject]

2015-02-06 Thread Ivo Bellin Salarin
In a class derived from Project the instruction this.getSCMs().add(gitSCM) causes the compilation error: incompatible types: GitSCM cannot be converted to CAP#1 where CAP#1 is a fresh type-variable: CAP#1 extends SCM frpù capture of ? extends SCM The object gitSCM is being initialized

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Kirill
Thanks for a very descriptive answer, Jesse. Actually the library XX is our internal library, so it's definitely not among the Jenkins core libs. The problem is that the users of Plugin B recently started to complain that they regularly get errors "java.lang.ClassCastException: com.foo.EventImp

Re: Unfinished implementation in SCM class for buildEnvVars method

2015-02-06 Thread Paul Allen
Hi Jesse, Thanks for helping to fill in some of the blanks. Now I have implemented it, it makes more sense. I have been following the Mercurial Plugin as an example. Not sure if there is anything specific I need to implement for the p4 plugin to support the Workflow: SCM Step, but I guess th

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 7:08 AM, Kirill wrote: > So you actually say that plugins share their libraries unless the > child-first classloading is defined? No, I think several possible cases are being mixed up in this discussion. If the library is bundled in Jenkins core, you have a problem, becaus

Re: NoClassDefFoundError: com/google/common/cache/CacheLoader

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 4:53 AM, Ivo Bellin Salarin wrote: > I was using netbeans mvn autocompletion to fill the dependencies, and I > haven't tried to type 2 as first version digit Tip: Tools » Options » Java » Maven » Edit Global Custom Goal Definitions… » Add Pick a name, and under Execute Go

Re: Subversion plugin 2.5 and Multiple SCM 0.3 problem

2015-02-06 Thread Jesse Glick
On Fri, Feb 6, 2015 at 4:29 AM, Per Arnold Blaasmo wrote: > The problem seem to bee that the activity on the multiple-scms-plugin is low. Probably this and other issues in multiple-scms are not really fixable, given the design of the SCM interface. My recommendation is to avoid that plugin, and i

Re: Request for new Jira Component for EC2-deployment-dashboard plugin

2015-02-06 Thread Ulli Hafner
Done. > Am 06.02.2015 um 12:56 schrieb Marcel Birkner : > > Username will be marcelbirkner > > Thanks, > Marcel > > > Am Freitag, 30. Januar 2015 23:31:23 UTC+1 schrieb Daniel Beck: > What's your/the component owner's jenkins-ci.org > user name? This user will be defa

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Kirill
So you actually say that plugins share their libraries unless the child-first classloading is defined? That's odd. For example, many plugins use Apache Commons or Guava, or some XML parsing libs. If they'd share their libs, every Jenkins instance would be a "JAR hell" - but it's not. -- You

Re: Request for new Jira Component for EC2-deployment-dashboard plugin

2015-02-06 Thread Marcel Birkner
Username will be *marcelbirkner* Thanks, Marcel Am Freitag, 30. Januar 2015 23:31:23 UTC+1 schrieb Daniel Beck: > > What's your/the component owner's jenkins-ci.org user name? This user > will be default assignee for new issues. > > Note that it'll be named ec2-deployment-dashboard-plugin. >

Re: Jenkins plugin's classloader isolation

2015-02-06 Thread Stephen Connolly
So what will happen is that, unless you configure the hpi plugin correctly, they will be use the plugin uberclassloader which will be selecting one of those library versions as the winner. The normal way to handle this issue is to create a mostly empty plugin that the other plugins can depend on d

Re: NoClassDefFoundError: com/google/common/cache/CacheLoader

2015-02-06 Thread Mark Waite
You may want to also consider using mvn versions: use-latest--releases to automate the setting of the version numbers in the pom. Mark Waite On Feb 6, 2015 2:53 AM, "Ivo Bellin Salarin" wrote: > My fault. I'm really sorry. > > (I was using netbeans mvn autocompletion to fill the dependencies, an

Jenkins plugin's classloader isolation

2015-02-06 Thread Kirill
Hi, In our company we have created 2 plugins: plugin A and plugin B. Both of them use a library XX, but different versions of it. The question is: are plugins (they *do not* depend on each other) using separate isolated class loaders? It's not obvious from reading https://wiki.jenkins-ci.org/di

Re: NoClassDefFoundError: com/google/common/cache/CacheLoader

2015-02-06 Thread Ivo Bellin Salarin
My fault. I'm really sorry. (I was using netbeans mvn autocompletion to fill the dependencies, and I haven't tried to type 2 as first version digit) Using the latest version of the git plugin (2.3.4) solves the problem. Thank you. Le Thu Feb 05 2015 at 6:20:40 PM, Jesse Glick a écrit : > On

Re: Subversion plugin 2.5 and Multiple SCM 0.3 problem

2015-02-06 Thread Per Arnold Blaasmo
On 06. feb. 2015 05:35, Craig Rodrigues wrote: > Hi, > > I had to update the Subversion plugin to 2.5 in order > to use svn 1.8. Basic checkouts work fine, but when I tried > to use the Multiple SCM 0.3 plugin, I got this: > > FATAL: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState canno