what is Maven Project management tool
install to windows
<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>java_training</groupId>
<artifactId>java_lang</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>
<console.encoding>utf-8</console.encoding>
<!-- console.encoding>Windows-31J</console.encoding -->
<maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<additionalJOption>-J-Dfile.encoding=${console.encoding}</additionalJOption>
<additionalOptions>--enable-preview</additionalOptions>
<source>${maven.compiler.source}</source>
<linksource>true</linksource>
</configuration>
</plugin>
</plugins>
</build>
</project>
build
mvn compile //compile
mvn compile exec:java // exec.Can be executed if the mainClass property is set
mvn javadoc:javadoc //Generate javadoc
mvn clean //Delete auto-generated files
mvn -Dmaven.test.skip=true package //skip test
mvn -DskipTests package //skip test
Recommended Posts