Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 创建maven项目错误_Java_Hibernate_Maven_Struts2 - Fatal编程技术网

Java 创建maven项目错误

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

我键入上面的命令来创建maven hibernate项目。在这之后,我进入我的项目文件夹,键入
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]