maven使用自己資料
maven.apache.org/guides/getting-started/index.html#What_is_Maven
新建JAVA普通專案:
mvn archetype:create \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.mycompany.app \
-DartifactId=my-app
新建WTP web專案:
mvn archetype:create \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DarchetypeArtifactId=maven-archetype-webapp \ -DgroupId=com.mycompany.app \ -DartifactId=my-webapp
下面是對pom.xml檔案裡面的標籤進行講解:
project This is the top-level element in all Maven pom.xml files. modelVersion This element indicates what version of the object model this POM is using. The version of the model itself changes very infrequently but it is mandatory in order to ensure stability of use if and when the Maven developers deem it necessary to change the model. groupId This element indicates the unique identifier of the organization or group that created the project. The groupId is one of the key identifiers of a project and is typically based on the fully qualified domain name of your organization. For example org.apache.maven.plugins is the designated groupId for all Maven plug-ins. artifactId This element indicates the unique base name of the primary artifact being generated by this project. The primary artifact for a project is typically a JAR file. Secondary artifacts like source bundles also use the artifactId as part of their final name. A typical artifact produced by Maven would have the form <artifactid></artifactid>-<version></version>.<extension></extension> (for example, myapp-1.0.jar ). packaging This element indicates the package type to be used by this artifact (e.g. JAR, WAR, EAR, etc.). This not only means if the artifact produced is JAR, WAR, or EAR but can also indicate a specific lifecycle to use as part of the build process. (The lifecycle is a topic we will deal with further on in the guide. For now, just keep in mind that the indicated packaging of a project can play a part in customizing the build lifecycle.) The default value for the packaging element is JAR so you do not have to specify this for most projects. version This element indicates the version of the artifact generated by the project. Maven goes a long way to help you with version management and you will often see the SNAPSHOT designator in a version, which indicates that a project is in a state of development. We will discuss the use of snapshots and how they work further on in this guide. name This element indicates the display name used for the project. This is often used in Maven's generated documentation. url This element indicates where the project's site can be found. This is often used in Maven's generated documentation. description This element provides a basic description of your project. This is often used in Maven's generated documentation.以下maven自已的命令格式:
mvn compile
mvn test
mvn test-compile ( simply want to compile your test sources )
mvn clean test-compile
mvn install
mvn clean install
mvn clean
mvn install(可將你的專案打包成jar檔案放到你的.m2/repo下面了)
mvn package
mvn site
mvn resources:resources
mvn idea:idea
mvn eclipse:eclipse
mvn eclipse:clean
mvn process-resources
mvn process-resources "-Dcommand.line.prop=hello again"
# application.properties
java.version=${java.version}
command.line.prop=${command.line.prop}
# application.properties
application.name=${pom.name}
application.version=${pom.version}
<build></build>
<resources></resources>
<resource></resource>
<directory></directory>src/main/resources
<filtering></filtering>true
mvn deploy
- [...]
- <distributionManagement>
- <repository>
- <id>proficio-repositoryid>
- <name>Proficio Repositoryname>
- <url>file://${basedir}/target/deployurl>
- repository>
- distributionManagement>
- [...]
指定編譯後目錄:
- <build>
- <directory>${basedir}/targetdirectory>
- build>
For this example, we will configure the Java compiler to allow JDK 5.0 sources. This is as simple as adding this to your POM:
... |
dependencies
dependency這行依賴
http://www.devzuz.com/web/guest/downloads
相關文章
- 使用github搭建自己的maven庫GithubMaven
- 使用labelme標記自己的資料jsonJSON
- 使用Map將資料變成自己想要的
- Maven 使用Maven
- IDEA如何配置自己的maven和maven設定阿里雲倉庫IdeaMaven阿里
- Maven的使用Maven
- 關於使用maven打包如何聚合資原始檔Maven
- 使用Maven配置SpringMavenSpring
- Maven高階使用Maven
- 釋出自己的jar到Maven Repository公服上JARMaven
- Windows10 使用 Tensorflow Object_detection API 訓練自己的資料WindowsObjectAPI
- 使用Maven打包你的應用——maven-jar-plugin & maven-assembly-plugin & maven-shade-pluginMavenJARPlugin
- 靈活使用Maven ProfileMaven
- 使用 Github 搭建 maven 私服GithubMaven
- 如何在 GPU 深度學習雲服務裡,使用自己的資料集?GPU深度學習
- 使用自己的資料集訓練MobileNet、ResNet實現影象分類(TensorFlow)
- 自己收集的部分Angular學習資料Angular
- yolov3訓練自己資料教程YOLO
- 自己動手寫Android資料庫框架Android資料庫框架
- 將自己的開源專案釋出到 Maven 中央倉庫Maven
- Maven經典使用指南Maven
- Maven 私服的簡單使用Maven
- maven中profiles使用詳解Maven
- 使用Maven整合SSH總結Maven
- 把 Maven 提交到專案?Maven Wrapper的使用與好處MavenAPP
- 使用TensorFlow slim資料夾當中的inception_resnet_v2網路訓練自己的分類資料集
- Mxnet R FCN 訓練自己的資料集
- 使用Maven構建Java專案MavenJava
- 使用idea建立springBoot Maven聚合工程IdeaSpring BootMaven
- 在 Maven 專案中使用 HanLPMavenHanLP
- Maven使用指南的筆記Maven筆記
- Nexus私有maven庫部署和使用Maven
- 全網最細 | 教你如何在 docker 容器下使用 mmdetection 訓練自己的資料集Docker
- nnUNet使用指南(一):Ubuntu系統下使用nnUNet對自己的多模態MR資料集訓練Ubuntu
- keras-retinanet 用自己的資料集訓練KerasNaN
- 用SSD-Pytorch訓練自己的資料集PyTorch
- Mxnet-R-FCN-訓練自己的資料集
- 慕課全套資料,需要的同學自己拿
- 【Maven實戰技巧】「外掛使用專題」Maven-Archetype外掛建立自定義maven專案骨架Maven