Created
January 23, 2020 00:13
-
-
Save gbalbuena/72b91929c0c6f72d9e78d5f9ed088b4d to your computer and use it in GitHub Desktop.
basic maven and makefile to compile build and test java projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: | |
docker run -it --rm -v "$(shell pwd)":/usr/src/app -w /usr/src/app maven:3-jdk-8-openj9 mvn clean package | |
test: | |
docker run -it --rm -v "$(shell pwd)":/usr/src/app -w /usr/src/app maven:3-jdk-8-openj9 mvn test | |
run: | |
docker run -it --rm -v "$(shell pwd)":/usr/src/app -w /usr/src/app maven:3-jdk-8-openj9 java -jar target/*.jar | |
.PHONY: build test run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>au.com.dius</groupId> | |
<artifactId>project</artifactId> | |
<version>0.0.1</version> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.5.1</version> | |
<configuration> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.6</version> | |
<configuration> | |
<archive> | |
<manifest> | |
<mainClass>com.dius.bowling.Run</mainClass> | |
</manifest> | |
</archive> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.12</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment