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