Start Maven by Using intellij idea

本文介绍如何下载并配置IntelliJ IDEA、Maven和JDK,通过设置环境变量启动IDE,并使用Maven创建项目的基本步骤。文中还解释了pom.xml文件中artifactId与groupId的概念。

1. download "intellij idea", maven and JDK.

2. Before run the interllij idea, "export" the M2_HOME to indicat the installed maven path and JAVA_HOME to specify the installed jdk path.

3. start the "interllij idea" by using "nohup ./bin/idea.sh &", close the termial now.

4. pom.xml

artifactId means the jar filename

groupID means the "package" name.

package org.apache.hadoop.examples;

import java.io.IOException;
import java.util.StringTokenizer;

5. Select the archetype: maven-archetype-quickstart not using default maven-archetype.


C:\Users\26945\.jdks\ms-17.0.15\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\26945\Desktop\java\xuesheng -Djansi.passthrough=true "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\lib\idea_rt.jar=62850:C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.7.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2024.1.4 tomcat9:run [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-parseable POM C:\Users\26945\Desktop\java\xuesheng\pom.xml: Duplicated tag: 'plugins' (position: START_TAG seen ...</plugins>\n <plugins>... @104:18) @ line 104, column 18 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project (C:\Users\26945\Desktop\java\xuesheng\pom.xml) has 1 error [ERROR] Non-parseable POM C:\Users\26945\Desktop\java\xuesheng\pom.xml: Duplicated tag: 'plugins' (position: START_TAG seen ...</plugins>\n <plugins>... @104:18) @ line 104, column 18 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException 进程已结束,退出代码为 1
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值