what is Maven Outil de gestion de projet
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 //compiler
mvn compile exec:java // exec.Peut être exécuté si la propriété mainClass est définie
mvn javadoc:javadoc //Générer javadoc
mvn clean //Supprimer le fichier généré automatiquement
mvn -Dmaven.test.skip=true package //sauter le test
mvn -DskipTests package //sauter le test
Recommended Posts