【发布时间】:2018-07-13 22:46:56
【问题描述】:
我没有看到任何红线,但是当我运行 (Play) 应用程序时,IntelliJ 找不到我的 Maven 依赖项。试过invalidate cache/restart。尝试运行mvn clean install。
编译器错误信息
(compile:compileIncremental) Compilation failed
[info] Compiling 8 Scala sources and 5 Java sources to /Users/****/IdeaProjects/GeoMood/target/scala-2.11/classes...
[error] /Users/****/IdeaProjects/GeoMood/app/views/show_tweets.scala.html:1: not found: value twitter4j
[error] @import twitter4j.Status
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>groupId</groupId>
<artifactId>geomood</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.8.0</version>
<classifier>models</classifier>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>[4.0,)</version>
</dependency>
</dependencies>
</project>
有没有人知道为什么 IntelliJ 不接受这个? maven 构建运行良好,依赖项列在外部库下。
【问题讨论】:
-
你能检查一下你是否可以从命令行运行应用程序吗?
-
尝试在设置(首选项)| 中启用运行前不要在IDEA中编译项目语言和框架 | Play2 设置或在此处启用 Play2 编译器。
标签: java maven intellij-idea pom.xml