Java 创建maven项目错误
我键入上面的命令来创建maven hibernate项目。在这之后,我进入我的项目文件夹,键入Java 创建maven项目错误,java,hibernate,maven,struts2,Java,Hibernate,Maven,Struts2,我键入上面的命令来创建maven hibernate项目。在这之后,我进入我的项目文件夹,键入mvnclipse:eclipse,然后键入mvncleanstall 此后,我在EclipseIDE中单击了工作区中的import-->现有项目,但无法打开它,因为pom.xml不在那里 注意:当我键入mvn clean install时,我得到了以下错误 mvn archetype:generate -B -DgroupId=com.my-company.my-pro
mvnclipse:eclipse
,然后键入mvncleanstall
此后,我在EclipseIDE中单击了工作区中的import-->现有项目
,但无法打开它,因为pom.xml不在那里
注意:当我键入mvn clean install
时,我得到了以下错误
mvn archetype:generate -B
-DgroupId=com.my-company.my-project
-DartifactId=my-project-domain
-DpackageName=com.company.project.domain
-DarchetypeGroupId=org.appfuse.archetypes
-DarchetypeArtifactId=appfuse-basic-struts
-DremoteRepositories=http://maven.rodcoffin.com/repo
-DarchetypeVersion=1.0.0
编辑
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compil
e (default) on project my-project-domain: The artifact org.springframework:sprin
g-aspects referenced in aspectj plugin as an aspect library, is not found the pr
oject dependencies -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
即使它说有一个丢失的代码>符号,当我检查App.java
文件时,我没有发现任何语法错误
aspectj中引用的工件org.springframework:spring方面
插件作为一个方面库,在项目依赖项中找不到
您需要添加此插件工件的依赖项尝试删除包路径中的连字符。我这样做了;但我仍然得到了错误org.aspectj aspectjrt 1.6.9 org.aspectj aspectjtools 1.6.9
这不是正确的依赖项,依赖项工件是org.springframework:springaspects
,正如我在回答中列出的那样。我已经编辑了我上面的问题,你能看一下吗
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.1:compile (default-compile) on project my-project-domain: Compilation failure
[ERROR] \Users\Administrator\Documents\MYPROJECTS\my-project-domain\src\main
\java\com\my-company\my-project\App.java:[1,14] ';' expected
[ERROR] -> [Help 1]