日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) >

配置maven仓库 手写maven项目 配置maven打包

發(fā)布時(shí)間:2024/3/26 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 配置maven仓库 手写maven项目 配置maven打包 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

配置maven倉(cāng)庫(kù) 手寫(xiě)maven項(xiàng)目 配置maven打包

  • 操作錄像
  • maven環(huán)境變量
  • maven倉(cāng)庫(kù)
  • maven標(biāo)準(zhǔn)pom.xml
  • maven打包插件
  • 附錄:FreeBSD默認(rèn)環(huán)境變量

操作錄像

配置maven倉(cāng)庫(kù)-手寫(xiě)maven項(xiàng)目-配置maven打包


視頻傳送門(mén): https://www.bilibili.com/video/BV1Mt4y1z7eV/

maven環(huán)境變量

export MAVEN_HOME=/home/ray/maven export PATH=$PATH:$MAVEN_HOME/bin

maven倉(cāng)庫(kù)

<!-- 阿里云倉(cāng)庫(kù) --> <mirror><id>alimaven</id><mirrorOf>central</mirrorOf><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror> <!-- 中央倉(cāng)庫(kù)1 --> <mirror><id>repo1</id><mirrorOf>central</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://repo1.maven.org/maven2/</url> </mirror> <!-- 中央倉(cāng)庫(kù)2 --> <mirror><id>repo2</id><mirrorOf>central</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://repo2.maven.org/maven2/</url> </mirror>

maven標(biāo)準(zhǔn)pom.xml

<?xml version="1.0" encoding="UTF-8"?><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>org.ray</groupId><artifactId>helloworld</artifactId><version>1.0-SNAPSHOT</version><name>helloworld</name><!-- FIXME change it to the project's website --><url>http://www.example.com</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target></properties><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version><scope>test</scope></dependency></dependencies><build></build> </project>

maven打包插件

<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><executions><execution><phase>package</phase><goals><goal>shade</goal></goals><configuration><transformers><transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"><mainClass>org.ray.helloworld.Main</mainClass></transformer></transformers></configuration></execution></executions></plugin> </plugins>

附錄:FreeBSD默認(rèn)環(huán)境變量

/usr/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin

總結(jié)

以上是生活随笔為你收集整理的配置maven仓库 手写maven项目 配置maven打包的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。