maven learning nine about some parameters of maven several common plugins of maven

一 maven profile:

     Different operating environments , such as development environment, test environment, production environment, and our software in different environments, some configurations may be different, such as data source configuration, log file configuration, and some basic software running process. Configuration, then every time we deploy the software to a different environment, we need to modify the corresponding configuration file, so it is easy to make mistakes and waste labor.

  Maven provides a convenient solution to this problem, which is the profile function.

    Package it with mvn install -P{profile} command.

     For example: mvn clean package -Pdist -DskipTests to package and skip tests.

Two  common plugins of Maven

     maven-dependency-plugin: used to copy the dependent jar package to the specified folder

maven-assembly-plugin: Packaging configuration, such as what type of package to type, what content is included in the package, etc.
maven-jar-plugin: When making a jar, set the parameters of the manifest, such as the Main class to be run, and the dependent jar packages, which are added to the classpath

 

 

    

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324998537&siteId=291194637