Skip to content

Commit

Permalink
add try catch for pom file
Browse files Browse the repository at this point in the history
  • Loading branch information
m-raab committed Sep 4, 2019
1 parent dce8183 commit 32e84ee
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,12 @@ open class WriteCartridgeDescriptor : WriteProperties() {
.find { it is ResolvedArtifactResult &&
it.file.name == "${moduleID.module}-${moduleID.version}.pom"} as ResolvedArtifactResult

val xml = XmlSlurper().parse(modulePomArtifact.file)

println("found .... " + modulePomArtifact.file.name + " ... " + xml.getProperty("name"))
try {
val xml = XmlSlurper().parse(modulePomArtifact.file)
println("found .... " + modulePomArtifact.file.name + " ... " + xml.getProperty("name"))
}catch (ex: Exception) {
project.logger.info("Pom file is not readable - " + moduleID.moduleIdentifier)
}
}
return false
}
Expand Down

0 comments on commit 32e84ee

Please sign in to comment.