Skip to content
Permalink
Browse files
JENKINS-20929
  • Loading branch information
emenaceb committed Jan 27, 2014
1 parent a81156b commit 8da217868f6f7e2e81609827fd8e3d5962f21152
Showing with 23 additions and 14 deletions.
  1. +23 −14 src/main/java/jenkins/plugins/maveninfo/extractor/properties/PomPropertiesFinder.java
@@ -34,20 +34,29 @@ public void findProperties(ExtractorContext ctx) throws IOException,
.getCompiledMainModulePattern();

MavenModule main = BuildUtils.getMainModule(mmsb, mainPattern);
MavenBuild build = mmsb.getModuleLastBuilds().get(main);
FilePath p = build.getWorkspace().child("pom.xml");
Digester digester = new Digester3();
digester.setRules(new ExtendedBaseRules());

ctx.getRuleSet().addRuleInstances(digester);

InputStream is = p.read();
try {
digester.parse(is);
} catch (SAXException ex) {
throw new IOException("Can't read POM: " + p.toString());
} finally {
is.close();
if (main != null) {

MavenBuild build = mmsb.getModuleLastBuilds().get(main);
if (build != null) {

FilePath p = build.getWorkspace().child("pom.xml");
if (p != null) {

Digester digester = new Digester3();
digester.setRules(new ExtendedBaseRules());

ctx.getRuleSet().addRuleInstances(digester);

InputStream is = p.read();
try {
digester.parse(is);
} catch (SAXException ex) {
throw new IOException("Can't read POM: " + p.toString());
} finally {
is.close();
}
}
}
}
}
}

0 comments on commit 8da2178

Please sign in to comment.