aboutsummaryrefslogtreecommitdiff
path: root/calculator-java
diff options
context:
space:
mode:
authorMaël Gassmann <mael.gassmann@students.bfh.ch>2021-06-12 11:42:00 +0200
committerMaël Gassmann <mael.gassmann@students.bfh.ch>2021-06-12 11:42:00 +0200
commit1274ae50ac78ed009acd829edc26750549947f26 (patch)
tree3be016a5d6ca8404b449e7010158ce532c2e1c0c /calculator-java
parentf02eee6fd65e352c3fdc16b51aa7f99c2c63482d (diff)
[~] corrected maven package to generate a working jar
Diffstat (limited to 'calculator-java')
-rw-r--r--calculator-java/pom.xml37
1 files changed, 37 insertions, 0 deletions
diff --git a/calculator-java/pom.xml b/calculator-java/pom.xml
index d181b7d..a7a56f8 100644
--- a/calculator-java/pom.xml
+++ b/calculator-java/pom.xml
@@ -25,6 +25,43 @@
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
+ <main.class>ch.bfh.Main</main.class>
</properties>
+ <build>
+ <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
+ <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
+ <!--<resources>
+ <resource>
+ <directory>${project.basedir}/src/main/resources</directory>
+ </resource>
+ </resources>-->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${main.class}</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>assemble-all</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project> \ No newline at end of file