Skip to content

Commit

Permalink
JENKINS-20929
Browse files Browse the repository at this point in the history
  • Loading branch information
emenaceb committed Jan 27, 2014
1 parent a81156b commit 8da2178
Showing 1 changed file with 23 additions and 14 deletions.
Expand Up @@ -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.