Skip to content
Permalink
Browse files

refactor: no duplication of config information

  • Loading branch information...
monperrus committed Apr 12, 2019
1 parent c37ddce commit 2203e6640e065ebd2ddef0de5e71e7f476df0c99
@@ -5,6 +5,8 @@ set -e

cd ./maven-repair

mvn test
NPEFIX_VERSION=`python3 -c 'import xml.etree.ElementTree; print(xml.etree.ElementTree.parse("pom.xml").findall("//mvn:dependency[mvn:artifactId=\"npefix\"]/mvn:version",{"mvn":"http://maven.apache.org/POM/4.0.0"})[0].text)'`

mvn test -DNPEFIX_VERSION=$NPEFIX_VERSION

cd ..
@@ -271,7 +271,7 @@ private String classpath(List<URL> dependencies) {
URL s = dependencies.get(i);
sb.append(s.getPath()).append(File.pathSeparatorChar);
}
final Artifact artifact =artifactFactory.createArtifact("fr.inria.gforge.spirals","npefix", "0.7", null, "jar");
final Artifact artifact =artifactFactory.createArtifact("fr.inria.gforge.spirals","npefix", System.getProperty("NPEFIX_VERSION"), null, "jar");
File file = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifact));

sb.append(file.getAbsoluteFile());
@@ -249,7 +249,7 @@ private String classpath(List<URL> dependencies) {
URL s = dependencies.get(i);
sb.append(s.getPath()).append(File.pathSeparatorChar);
}
final Artifact artifact =artifactFactory.createArtifact("fr.inria.gforge.spirals","npefix", "0.7", null, "jar");
final Artifact artifact =artifactFactory.createArtifact("fr.inria.gforge.spirals","npefix", System.getProperty("NPEFIX_VERSION"), null, "jar");
File file = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifact));

sb.append(file.getAbsoluteFile());

0 comments on commit 2203e66

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