Skip to content
Permalink
Browse files

Fix JENKINS-14290

  • Loading branch information
gboissinot committed Jul 3, 2012
1 parent deab4c0 commit 729f70a6658f37ff19afc762e3e4a26e6c1a9d69
13 pom.xml
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

@@ -38,7 +39,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<envinject.lib.version>1.8</envinject.lib.version>
<envinject.lib.version>1.10</envinject.lib.version>
<ivy.plugin.version>1.21</ivy.plugin.version>
</properties>

<scm>
@@ -59,6 +61,13 @@
<version>${envinject.lib.version}</version>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ivy</artifactId>
<version>${ivy.plugin.version}</version>
<optional>true</optional>
</dependency>

</dependencies>

</project>
@@ -79,7 +79,11 @@ private boolean isEligibleJobType(AbstractBuild build) {
job = build.getParent();
}

return job instanceof FreeStyleProject || job instanceof MatrixProject || job instanceof AbstractMavenProject;
return job instanceof FreeStyleProject
|| job instanceof MatrixProject
|| job instanceof AbstractMavenProject
|| (Hudson.getInstance().getPlugin("ivy") != null && job instanceof hudson.ivy.IvyModuleSet);

}

private void loadEnvironmentVariablesNode(AbstractBuild build, Node buildNode, EnvInjectLogger logger) throws EnvInjectException {
@@ -69,6 +69,9 @@ public void removeBuildWrappers(AbstractBuild build, Class<? extends BuildWrappe
} else if (abstractProject instanceof MavenModuleSet) {
MavenModuleSet moduleSet = (MavenModuleSet) abstractProject;
return moduleSet.getBuildWrappersList();
} else if (Hudson.getInstance().getPlugin("ivy") != null && abstractProject instanceof hudson.ivy.IvyModuleSet) {
hudson.ivy.IvyModuleSet ivyModuleSet = (hudson.ivy.IvyModuleSet) abstractProject;
return ivyModuleSet.getBuildWrappersList();
} else {
throw new EnvInjectException(String.format("Job type %s is not supported", abstractProject));
}
@@ -60,6 +60,9 @@ private EnvInjectPasswordWrapper getEnvInjectPasswordWrapper(AbstractBuild build
} else if (abstractProject instanceof MavenModuleSet) {
MavenModuleSet moduleSet = (MavenModuleSet) abstractProject;
wrappersProject = moduleSet.getBuildWrappersList();
} else if (Hudson.getInstance().getPlugin("ivy") != null && abstractProject instanceof hudson.ivy.IvyModuleSet) {
hudson.ivy.IvyModuleSet ivyModuleSet = (hudson.ivy.IvyModuleSet) abstractProject;
wrappersProject = ivyModuleSet.getBuildWrappersList();
} else {
throw new EnvInjectException(String.format("Job type %s is not supported", abstractProject));
}

0 comments on commit 729f70a

Please sign in to comment.
You can’t perform that action at this time.