From 5a8ddef03bf57f02e82a898425871e098fdcb01d Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Tue, 14 Feb 2017 20:34:09 +0100 Subject: [PATCH] Add failsafe plugin and basic test, to verify the binary distribution zip file has been created. --- pmd-dist/pom.xml | 22 ++++++++++++++++++- .../sourceforge/pmd/it/BinaryDistTest.java | 22 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 pmd-dist/src/test/java/net/sourceforge/pmd/it/BinaryDistTest.java diff --git a/pmd-dist/pom.xml b/pmd-dist/pom.xml index c63d594bf5..1681c20758 100644 --- a/pmd-dist/pom.xml +++ b/pmd-dist/pom.xml @@ -3,7 +3,7 @@ 4.0.0 pmd-dist PMD Distribution Packages - pom + jar net.sourceforge.pmd @@ -55,6 +55,19 @@ + + org.apache.maven.plugins + maven-failsafe-plugin + 2.19.1 + + + + integration-test + verify + + + + @@ -143,6 +156,13 @@ pmd-xml ${project.version} + + + junit + junit + 4.11 + test + diff --git a/pmd-dist/src/test/java/net/sourceforge/pmd/it/BinaryDistTest.java b/pmd-dist/src/test/java/net/sourceforge/pmd/it/BinaryDistTest.java new file mode 100644 index 0000000000..b7f3730b54 --- /dev/null +++ b/pmd-dist/src/test/java/net/sourceforge/pmd/it/BinaryDistTest.java @@ -0,0 +1,22 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.it; + +import static org.junit.Assert.assertTrue; + +import java.io.File; + +import org.junit.Test; + +import net.sourceforge.pmd.PMD; + +public class BinaryDistTest { + + @Test + public void testFileExistence() { + File file = new File(".", "target/pmd-bin-" + PMD.VERSION + ".zip"); + assertTrue(file.exists()); + } +}