Skip to content

Commit

Permalink
fix: Maven config transitions from root to child pom files (eclipse#1156
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andre15silva committed Dec 9, 2020
1 parent 1357e4a commit 4c3098b
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
5 changes: 0 additions & 5 deletions .ci/ci-deploy.sh
Expand Up @@ -6,18 +6,13 @@
set -e

sudo apt-get update
sudo apt-get install -y xmlstarlet


### MAVEN CENTRAL
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
cp .travis/travis-settings.xml $HOME/.m2/settings.xml
cd src

# pushing snapshot to https://oss.sonatype.org/content/repositories/snapshots/fr/inria/repairnator/
VERSION=`xmlstarlet sel -t -v '//_:project/_:properties/_:revision' pom.xml`
sed -i -e 's/\${revision}/'$VERSION'/' pom.xml */pom.xml
git diff
mvn deploy -DskipTests -Dcheckstyle.skip
echo Deployment to Maven Central done
fi
Expand Down
2 changes: 1 addition & 1 deletion .ci/ci-dockerfile
@@ -1,4 +1,4 @@
FROM maven:3.6-openjdk-8

RUN apt-get update
RUN apt-get install xmlstarlet -y
RUN apt-get install xmlstarlet -y
5 changes: 0 additions & 5 deletions .ci/ci-maven-repair.sh
Expand Up @@ -4,11 +4,6 @@
set -e
export M2_HOME=/usr/local/maven

VERSION=`xmlstarlet sel -t -v '//_:project/_:properties/_:revision' src/pom.xml`
sed -i -e 's/\${revision}/'$VERSION'/' src/repairnator-core/pom.xml
sed -i -e 's/\${revision}/'$VERSION'/' src/pom.xml
sed -i -e 's/\${revision}/'$VERSION'/' "${TEST_PATH}"/pom.xml

NPEFIX_VERSION=`xmlstarlet sel -t -v '//_:dependency[_:artifactId="npefix"]/_:version' src/maven-repair/pom.xml`

mvn clean install -B -f src/repairnator-core/ && mvn -Dtest=$TEST_LIST -DNPEFIX_VERSION=$NPEFIX_VERSION clean test -B -f $TEST_PATH -DskipTests
5 changes: 0 additions & 5 deletions .ci/ci-run-with-core.sh
Expand Up @@ -8,9 +8,4 @@ export M2_HOME=/usr/local/maven
# sudo apt-get update
# sudo apt-get install -y xmlstarlet

VERSION=`xmlstarlet sel -t -v '//_:project/_:properties/_:revision' src/pom.xml`
sed -i -e 's/\${revision}/'$VERSION'/' src/repairnator-core/pom.xml
sed -i -e 's/\${revision}/'$VERSION'/' src/pom.xml
sed -i -e 's/\${revision}/'$VERSION'/' "${TEST_PATH}"/pom.xml

mvn clean install -B -f src/repairnator-core/ && mvn -Dtest=$TEST_LIST clean test -B -f $TEST_PATH -DskipTests
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -5,6 +5,7 @@ pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
.flattened-pom.xml
release.properties
dependency-reduced-pom.xml
buildNumber.properties
Expand Down Expand Up @@ -34,4 +35,4 @@ repairnator/docker-images/pipeline-dockerimage/version.ini
repairnator/repairnator-pipeline/spooned*
repairnator/repairnator-pipeline/output_astor
/bin/
*.java-version
*.java-version
25 changes: 25 additions & 0 deletions src/pom.xml
Expand Up @@ -115,6 +115,31 @@

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down

0 comments on commit 4c3098b

Please sign in to comment.