Skip to content

Commit

Permalink
refactor: no duplication of config information
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed Apr 12, 2019
1 parent c37ddce commit 2203e66
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .travis/travis-maven-repair.sh
Expand Up @@ -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 ..
Expand Up @@ -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());
Expand Down
Expand Up @@ -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());
Expand Down

0 comments on commit 2203e66

Please sign in to comment.