一,下載并解壓阿帕奇項目到你的非系統(tǒng)盤符礁遵,創(chuàng)建一個my_maven_jar用來存放你的庫
二,進入IDEA搏嗡。
-
進行如下操作窿春,點擊進去
-
仔細(xì)看清楚路徑與對勾,選擇你文件所在目錄
-
在我們配置好maven之后采盒,點擊File旧乞,New一個Project,我們選擇maven磅氨,不再是Java尺栖,然后選中我們需要的,是.maven烦租,看清楚延赌。注意對勾。
-
之后我們就填寫自己的信息就可以叉橱,groupId為你的單位域名反寫挫以,下面的是項目名,默認(rèn)1.0版本窃祝。
-
之后一路next掐松,起自己的項目名。然后在新窗口打開粪小。會出現(xiàn)如下界面大磺,我們選擇Enable那一項,點開右邊的maven-project探膊,不時點刷新杠愧,之后安靜等待完成即可 。
- 在左邊展開我們的項目突想,點擊pom.xml,將其替換為如下代碼殴蹄。注意修改漢字標(biāo)注好的部分
<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>你的單位域名反寫</groupId>
<artifactId>你的項目名</artifactId>
<version>1.0-SNAPSHOT</version>
<name>你的項目名</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>
<kotlin.version>1.2.71</kotlin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.kordamp.bootstrapfx</groupId>
<artifactId>bootstrapfx-core</artifactId>
<version>0.2.4</version>
</dependency>
<dependency>
<groupId>org.fxmisc.richtext</groupId>
<artifactId>richtextfx</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.niit.FirstApp</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
</configuration>
</plugin>
</plugins>
</build>
</project>
#之后就構(gòu)造好啦究抓,該做什么做什么就可以了
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者