Commit cccd0c16 authored by Jamie Tanna's avatar Jamie Tanna

Main

- Build fat JAR with Shade
- Set `mainClass` to use our `main` wrapper
- Ensures difference between the tests-of-the-tests and actual
  implementation tests
parent 5367d363
...@@ -6,32 +6,29 @@ ...@@ -6,32 +6,29 @@
<groupId>me.jvt.hacking</groupId> <groupId>me.jvt.hacking</groupId>
<artifactId>fat-cucumber.jar</artifactId> <artifactId>fat-cucumber.jar</artifactId>
<version>0.1</version> <version>0.2</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.cucumber</groupId> <groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId> <artifactId>cucumber-junit</artifactId>
<version>3.0.2</version> <version>3.0.2</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.cucumber</groupId> <groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId> <artifactId>cucumber-java</artifactId>
<version>3.0.2</version> <version>3.0.2</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
<version>3.10.0</version> <version>3.10.0</version>
<scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -39,14 +36,21 @@ ...@@ -39,14 +36,21 @@
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.22.0</version> <version>3.1.1</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase>
<goals> <goals>
<goal>integration-test</goal> <goal>shade</goal>
<goal>verify</goal>
</goals> </goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>me.jvt.hacking.RunCukes</mainClass>
</transformer>
</transformers>
</configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
......
...@@ -7,5 +7,8 @@ import org.junit.runner.RunWith; ...@@ -7,5 +7,8 @@ import org.junit.runner.RunWith;
@RunWith(Cucumber.class) @RunWith(Cucumber.class)
@CucumberOptions(plugin = "json:target/report.json", features = {"classpath:features"}) @CucumberOptions(plugin = "json:target/report.json", features = {"classpath:features"})
public class RunCukesIT { public class RunCukes {
public static void main(String[] args) {
JUnitCore.main(RunCukes.class.getName());
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment