chore: adapted mvn config: disabled snapshot, disabled maven-compoler-plugin

This commit is contained in:
Begerad, Stefan 2021-10-01 09:32:30 -04:00
parent b2e61d7397
commit 722fd68f95
1 changed files with 24 additions and 16 deletions

View File

@ -6,7 +6,7 @@
<groupId>de.begerad.file-age-rm</groupId> <groupId>de.begerad.file-age-rm</groupId>
<artifactId>file-age-rm</artifactId> <artifactId>file-age-rm</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1</version>
<properties> <properties>
<!-- https://maven.apache.org/general.html#encoding-warning --> <!-- https://maven.apache.org/general.html#encoding-warning -->
@ -33,7 +33,6 @@
<build> <build>
<plugins> <plugins>
<!--The default maven-surefire-plugin is outdated, <!--The default maven-surefire-plugin is outdated,
make sure update to the latest.--> make sure update to the latest.-->
<plugin> <plugin>
@ -48,32 +47,41 @@
<version>3.2.4</version> <version>3.2.4</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase>
<goals> <goals>
<!-- tells that it should be run in package phase -->
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.MF</exclude>
</excludes>
</filter>
</filters>
<shadedArtifactAttached>true</shadedArtifactAttached> <shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>depds</shadedClassifierName>
<transformers> <transformers>
<transformer implementation= <!-- configure resources transformer for Maven Shade Plugin with ManifestResourceTransformer that allows us to define a mainClass in the META-INF/MANIFEST.MF file of the jar file, making the jar file after building, can run standalone -->
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <transformer
<mainClass>de.begerad.fileagerm.Main</mainClass> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<!-- define some other information in the META-INF/MANIFEST.MF file inside the jar file -->
<manifestEntries>
<Main-Class>de.begerad.fileagerm.Main</Main-Class>
<Specification-Title>${project.artifactId}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Implementation-Title>${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
</manifestEntries>
</transformer> </transformer>
</transformers> </transformers>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>