neuer
Caro 2024-06-04 13:43:34 +02:00
parent a760fcc342
commit 0899228bf7
4 changed files with 118 additions and 106 deletions

3
MvnDemoHelloWorld/.gitignore vendored 100644
View File

@ -0,0 +1,3 @@
/target/
/.classpath
/.project

View File

@ -0,0 +1,3 @@
/org.eclipse.m2e.core.prefs
/org.eclipse.core.resources.prefs
/org.eclipse.jdt.core.prefs

View File

@ -1,107 +1,112 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>hs-mannheim.de</groupId> <groupId>hs-mannheim.de</groupId>
<artifactId>MvnDemoHelloWorld</artifactId> <artifactId>MvnDemoHelloWorld</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target> <maven.compiler.target>21</maven.compiler.target>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId> <artifactId>junit-jupiter-api</artifactId>
<version>5.8.1</version> <version>5.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId> <artifactId>junit-jupiter-engine</artifactId>
<version>5.8.1</version> <version>5.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<configuration> <configuration>
<source>${maven.compiler.source}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- JAR creation --> <!-- JAR creation -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version> <version>3.2.4</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<transformers> <transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <transformer
<mainClass> de.hs_mannheim.informatik.mvn.Main</mainClass> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
</transformer> <mainClass>
</transformers> main.MvnDemoHelloWorld</mainClass>
</configuration> </transformer>
</execution> </transformers>
</executions> </configuration>
</plugin> </execution>
<!-- Code coverage, cf.: target/site/jacoco --> </executions>
<plugin> </plugin>
<groupId>org.jacoco</groupId> <!-- Code coverage, cf.: target/site/jacoco -->
<artifactId>jacoco-maven-plugin</artifactId> <plugin>
<version>0.8.12</version> <groupId>org.jacoco</groupId>
<executions> <artifactId>jacoco-maven-plugin</artifactId>
<execution> <version>0.8.12</version>
<goals> <executions>
<goal>prepare-agent</goal> <execution>
</goals> <goals>
</execution> <goal>prepare-agent</goal>
<execution> </goals>
<id>report</id> </execution>
<phase>test</phase> <execution>
<goals> <id>report</id>
<goal>report</goal> <phase>test</phase>
</goals> <goals>
</execution> <goal>report</goal>
</executions> </goals>
</plugin> </execution>
<!-- Static code analysis, cf: target/site/pmd.html --> </executions>
<plugin> </plugin>
<groupId>org.apache.maven.plugins</groupId> <!-- Static code analysis, cf: target/site/pmd.html -->
<artifactId>maven-pmd-plugin</artifactId> <plugin>
<version>3.22.0</version> <groupId>org.apache.maven.plugins</groupId>
<executions> <artifactId>maven-pmd-plugin</artifactId>
<execution> <version>3.22.0</version>
<phase>verify</phase> <executions>
<goals> <execution>
<goal>check</goal> <phase>verify</phase>
</goals> <goals>
</execution> <goal>check</goal>
</executions> </goals>
</plugin> </execution>
<!-- Security checking the plugins (not so important for non-web applications) --> </executions>
<plugin> </plugin>
<groupId>org.owasp</groupId> <!-- Security checking the plugins (not so important for non-web
<artifactId>dependency-check-maven</artifactId> applications) -->
<version>9.2.0</version> <plugin>
<executions> <groupId>org.owasp</groupId>
<execution> <artifactId>dependency-check-maven</artifactId>
<goals> <version>9.2.0</version>
<goal>check</goal> <executions>
</goals> <execution>
</execution> <goals>
</executions> <goal>check</goal>
</plugin> </goals>
</plugins> </execution>
</build> </executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,6 +8,7 @@ public class MvnDemoHelloWorld {
System.out.println("Und Tschüss!"); System.out.println("Und Tschüss!");
} }
} }