markov / jenkins-maven-metadata-plugin

A plugin for Jenkins to retrieve a maven repository maven-metadata.xml file and present the versions in it as a drop-down list of available versions.
3 stars 24 forks source link

Incompatible with rebuild plugin / handling of emtpy parameter values #2

Open beiske opened 8 years ago

beiske commented 8 years ago

For artifacts without classifiers the classifier parameter seems to be set to null and not empty an string. This works fine when creating a new build, but when trying to rebuild a previous build I get the below exception. I'm not sure if this bug should be fixed in this plugin or the Rebuild plugin, but I thought I'd mention it here first since this is the plugin in the stacktrace.

java.lang.IllegalArgumentException: Null value not allowed as an environment variable: MY_ARTIFACT_CLASSIFIER
    at hudson.EnvVars.put(EnvVars.java:356)
    at eu.markov.jenkins.plugin.mvnmeta.MavenMetadataParameterValue.buildEnvVars(MavenMetadataParameterValue.java:80)
    at hudson.model.ParameterValue.buildEnvironment(ParameterValue.java:174)
    at hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:89)
    at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:950)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1090)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)