Maven is not able to ignore a placeholder in its commandline. Jenkins has to do that just before calling maven.

Maybe other tools are affected too.

I propose to filter the maven goals before committing them to a Builder.

For a private hotfix I used this method:

private List<String> getListWithoutUnresolvableVariables(ArgumentListBuilder alb)
{
	List<String> result = new LinkedList<String>();
	//  pattern taken from hudson.Util.VARIABLE
	final Pattern varPattern = Pattern.compile("\\$([A-Za-z0-9_]+|\\{[A-Za-z0-9_.]+\\}|\\$)");
	
	for( String entry : alb.toList())
	{
		Matcher m = varPattern.matcher(entry);
		final String intern = m.replaceAll("").trim();
		if (0 < intern.length())
		{
			result.add(intern);
		}
	}
	return result;
}

to modify the calculated hudson.util.ArgumentListBuilder in hudson.maven.MavenModuleSetBuild.MavenModuleSetBuildExecution.doRun(BuildListener). This works well for Maven jobs but not for freestyle jobs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to