我必须构建一个Java Web项目来在本地运行它并调整一些HTML。不幸的是,在从SVN服务器进行另一次更新后,项目停止了可构建。
以下是IntelliJ IDEA的日志:
"C:\Program Files\Java\jdk1.7.0_07\bin\java" -Xms256m -Xmx512m
"-Dclassworlds.conf=C:\Program Files (x86)\Apache Software Foundation\apache-maven-2.2.1\bin\m2.conf"
"-Dmaven.home=C:\Program Files (x86)\Apache Software Foundation\apache-maven-2.2.1"
-Didea.launcher.port=7532
"-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.3\bin"
-Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\Apache Software Foundation\apache-maven-2.2.1\boot\classworlds-1.1.jar;
C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.3\lib\idea_rt.jar"
com.intellij.rt.execution.application.AppMain
org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast
--strict-checksums --update-snapshots
-f C:\Users\Kat\IdeaProjects\MYROOT\MYPROJECT\pom.xml install
+ Enabling strict checksum verification on all artifact downloads.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building MYPROJECT Project
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 20 source files to C:\Users\Kat\IdeaProjects\MYROOT\MYPROJECT\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\Users\Kat\IdeaProjects\MYROOT\MYPROJECT\src\main\java\MYPROJECT\dto\BillDto.java:
10,43] error: package com.thoughtworks.xstream.annotations does not exist
我尝试过:
两者都无济于事。我是Java世界的新手,并且不知道下一步该做什么。
顺便说一下,IDEA看到了XStream类,并让它们通过它们进行导航。
此致
答案 0 :(得分:0)
如果您在IntelliJ中使用Maven集成,那么您不应该使用“项目结构” - > “图书馆”对话框。 IntelliJ将通过读取模块的pom.xml文件自动配置这些库。
请参阅:http://www.jetbrains.com/idea/webhelp/maven-projects-tool-window.html
和
http://www.jetbrains.com/idea/webhelp/maven-importing.html
您还应验证XStream依赖项是否仍在pom.xml中