![]() ![]() Maven users can choose to configure either the \conf\settings.xml file in the installation directory or the settings.xml file in the. m2 folder under C:\ Users\qw.TCENT.m2\settings.xml. m2 folder except for the repository repository, but most Maven users need to copy the D:\ProgramData\apache-maven-3.8.3\conf\settings.xml file from the installation directory to the. By default, there are no other directories or files in the. You can go to C:\Users\qw.TCENT.m2\repository\org\apache\maven\plugins\maven-help-plugin\ directory to find the pom file and jar file of maven-help-plugin that you just downloaded.Ĭonfigure the user-scoped settings.xml file. By default, the Maven local repository is placed in this folder and all Maven artifacts are stored in this repository for easy reuse. m2 folder is now created and can be found in the user directory, e.g. These files are downloaded to the Maven local repository. We can see from the command line output that Maven will download \maven-help-plugin, including the pom file and jar file. The purpose of this command is to get Maven to perform a task that is in progress. This command will print out all Java system properties and environment variables, which are useful to turn into our daily work. m2 folder and execute the following command in a cmd window: mvn help:system. OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" PS C: \Users \qw.TCENT> Java version: 1.8.0_231, vendor: Oracle Corporation, runtime: D: \Program Files \Java \jdk1.8.0_231 \jreĭefault locale: zh_CN, platform encoding: GBK Provides a set of dependency management mechanisms.Īn ordinary Java project managed with Maven has the following directory structure by default.Īpache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739 ) Maven home: D: \ProgramData \apache-maven-3.8.3.provides a standardized set of build process (compile, test, package, release ……).provides a standardized set of project structure. ![]() Maven is the management and build tool built specifically for Java projects, and its main features are. What we need is a standardized Java project management and build tool. If every project had its own set of configurations, it would be a mess. These tasks are not too difficult, but very trivial and time-consuming. Finally, in addition to using an IDE like Eclipse for compilation, we must also be able to compile via command line tools to be able to compile, test, and deploy the project on a standalone server. In addition, we also need to configure the environment, such as the version of the JDK, the compilation and packaging process, the current code version number. For example, the src directory holds the Java source code, resources directory holds the configuration files, bin directory holds the compiled. Next, we need to determine the directory structure of the project. These are the dependency packages management. if we also need log4j, we need to put all the log4j related jar packages into the classpath. For example, if we need to use commons logging, we must put the commons logging jar packages into the classpath. First, we need to determine which dependency packages to introduce. Before we get into Maven, let’s take a look at what you need for a Java project. ![]()
0 Comments
Leave a Reply. |