我安装了Maven,可以轻松导入/管理org.apache.commons:comons-lang3:3.1
的依赖项。打开pom.xml
后,无法运行或调试项目。
pom.xml中:
<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>myGroup</groupId>
<artifactId>myArtifact</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>deleteme</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
</project>
“运行”和“调试”按钮变为非活动状态。
答案 0 :(得分:1)
这与maven没什么关系。它关于IntelliJ设置! 实际上,maven的文件结构略有不同
/project-root
/src
/main
/java <-- put your sources here
/resources
/test
/java
/resources
/your-packages-and-sources <-- now your sources is probably here
pom.xml
尝试: