[JIRA] (JENKINS-40991) No signature of method: groovy.util.Node.div()... error in configure block

84 views
Skip to first unread message

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Jan 11, 2017, 7:02:01 AM1/11/17
to jenkinsc...@googlegroups.com
Jakub Bochenski created an issue
 
Jenkins / Bug JENKINS-40991
No signature of method: groovy.util.Node.div()... error in configure block
Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 2017/Jan/11 12:01 PM
Priority: Minor Minor
Reporter: Jakub Bochenski

After upgrading to 1.56 the following code block started to throw errors

				
maven{
					mavenInstallation 'maven339'
					goals '-B -q dependency:resolve-plugins'
					configure { it / injectBuildVariables << false }
	}

The error message is

No signature of method: groovy.util.Node.div() is applicable for argument types: (java.lang.Boolean) values: [true]
Possible solutions: is(java.lang.Object), wait(), find(), any(), dump(), wait(long)}}

I can use the method added in JENKINS-40636 but the error message looks weird – why can't I use the configure block now?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

mail@daniel-spilker.com (JIRA)

unread,
Jan 11, 2017, 7:30:01 AM1/11/17
to jenkinsc...@googlegroups.com
Daniel Spilker commented on Bug JENKINS-40991
 
Re: No signature of method: groovy.util.Node.div()... error in configure block

Unfortunately this kind of problem arises from time to time when introducing new methods with the same name as the corresponding XML element. I'm have no idea how this can be fixed.

Background: it has type groovy.util.Node and Node.div() is called when using the / operator on it. And Groovy is looking for variant with a boolean argument because injectBuildVariables resolves to the injectBuildVariables boolean field in the outer block which delegates to MavenContext.

rob.kielty@gmail.com (JIRA)

unread,
Jan 30, 2017, 1:55:03 AM1/30/17
to jenkinsc...@googlegroups.com
Rob Kielty updated an issue
 
Change By: Rob Kielty
After upgrading to {{1.56}} the following code block started to throw errors
{code}    

maven{
     mavenInstallation 'maven339'
     goals '-B -q dependency:resolve-plugins'
     configure {

it / injectBuildVariables << false
}
}

{code}

The error message is {code}

No signature of method: groovy.util.Node.div()
is applicable for argument types: (java.lang.Boolean) values: [true]

Possible solutions: is(java.lang.Object), wait(), find(), any(), dump(), wait(long)}}{code}

I can use the method added in JENKINS-40636 but the error message looks weird -- why can't I use the configure block now?

mail@daniel-spilker.com (JIRA)

unread,
Feb 20, 2017, 11:34:02 AM2/20/17
to jenkinsc...@googlegroups.com

sam.mxracer@gmail.com (JIRA)

unread,
Feb 14, 2018, 4:13:03 AM2/14/18
to jenkinsc...@googlegroups.com
Sam Gleske commented on Bug JENKINS-40991
 
Re: No signature of method: groovy.util.Node.div()... error in configure block

I solved this odd message by quoting the selector.  Example:

maven{
    mavenInstallation 'maven339'
    goals '-B -q dependency:resolve-plugins'
    configure { 
        it / 'injectBuildVariables' << false 
    }
}
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

contact@anthonygreen.me (JIRA)

unread,
May 4, 2019, 2:29:03 PM5/4/19
to jenkinsc...@googlegroups.com

This bug is breaking the use of the configure block with the job dsl plugin

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

contact@anthonygreen.me (JIRA)

unread,
May 4, 2019, 2:31:02 PM5/4/19
to jenkinsc...@googlegroups.com
Anthony Green edited a comment on Bug JENKINS-40991
This bug is breaking the all use of the configure block with the job dsl plugin

contact@anthonygreen.me (JIRA)

unread,
May 7, 2019, 5:34:03 AM5/7/19
to jenkinsc...@googlegroups.com
Anthony Green edited a comment on Bug JENKINS-40991
This bug is breaking all use of the configure block with the job dsl plugin when the jobs are stored in source control and executed from the workspace

contact@anthonygreen.me (JIRA)

unread,
May 7, 2019, 6:48:02 AM5/7/19
to jenkinsc...@googlegroups.com
Anthony Green edited a comment on Bug JENKINS-40991
This bug is breaking all use of I managed a work around to the configure block with the job dsl plugin when the jobs are stored in source control and executed from the workspace / being interpreted as a div() command..

def removeJvmOptions = { node ->
  node.remove(node.get(jvmOptions)[0])
}

contact@anthonygreen.me (JIRA)

unread,
May 7, 2019, 6:49:02 AM5/7/19
to jenkinsc...@googlegroups.com
Anthony Green edited a comment on Bug JENKINS-40991
I managed a work around to the / being interpreted as a div() command..

def removeJvmOptions = { node ->
  node.remove(node.get(jvmOptions)[0])
}
Reply all
Reply to author
Forward
0 new messages