Skip to content

Commit

Permalink
chore: do not compile tests when building for dev (dhis2#9072)
Browse files Browse the repository at this point in the history
Using -DskipTests or setting it in the profile still leads to tests to
be compiled and test resources to be copied. Since we have ~820 tests
that does take some time.

Using
https://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-tests.html
  • Loading branch information
teleivo authored Oct 21, 2021
1 parent 78b24b2 commit 396fc90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dhis-2/build-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ print() {

# Requires maven to be on the classpath
# Skips clean and test phases
# Also skips copying test resources and compiling tests

print "Building dhis2-core..."


MAVEN_BUILD_OPTS="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25"
MAVEN_BUILD_OPTS="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.test.skip=true"

mvn clean install -T1C -Pdev -Pjdk11 -f $DIR/pom.xml -pl -dhis-web-embedded-jetty $MAVEN_BUILD_OPTS
mvn clean install -T1C -Pdev -Pjdk11 -f $DIR/dhis-web/pom.xml $MAVEN_BUILD_OPTS
Expand Down

0 comments on commit 396fc90

Please sign in to comment.