当前位置: 首页 > 知识库问答 >
问题:

月蚀,梅文

糜雪峰
2023-03-14

我正在尝试使用Spring Roo 1.2.4创建和编译一个项目……我正在使用:-Spring Roo 1.2.4.RELEASE-Spring STS 3.4.0.RELEASE-Maven 3.0.5

Spring Roo控制台接缝正常。但Maven依赖项在Eclipse IDE中有一个错误。

缺少神器org.springframework.roo:org.springframework.roo.annotations: jar:1.2.4.RELEASE

我使用Spring STS向导创建了我的项目…我的pom.xml是:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>ar.gov.pjn.scw.migrator</groupId>
    <artifactId>scw_migrator</artifactId>
    <packaging>war</packaging>
    <version>0.1.0.BUILD-SNAPSHOT</version>
    <name>xxx</name>
    <properties>
        <aspectj.version>1.7.2</aspectj.version>
        <java.version>7</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <roo.version>1.2.4.RELEASE</roo.version>
        <slf4j.version>1.7.5</slf4j.version>
        <spring.version>3.2.3.RELEASE</spring.version>
        <oracle.version>11.2.0.3</oracle.version>
        <spring-security.version>3.1.3.RELEASE</spring-security.version>    
    </properties>
    <repositories>
        <repository>
            <id>spring-maven-release</id>
            <name>Spring Maven Release Repository</name>
            <url>http://maven.springframework.org/release</url>
        </repository>
        <repository>
            <id>spring-maven-milestone</id>
            <name>Spring Maven Milestone Repository</name>
            <url>http://maven.springframework.org/milestone</url>
        </repository>
        <repository>
            <id>spring-roo-repository</id>
            <name>Spring Roo Repository</name>
            <url>http://spring-roo-repository.springsource.org/release</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-maven-release</id>
            <name>Spring Maven Release Repository</name>
            <url>http://maven.springframework.org/release</url>
        </pluginRepository>
        <pluginRepository>
            <id>spring-maven-milestone</id>
            <name>Spring Maven Milestone Repository</name>
            <url>http://maven.springframework.org/milestone</url>
        </pluginRepository>
        <pluginRepository>
            <id>spring-roo-repository</id>
            <name>Spring Roo Repository</name>
            <url>http://spring-roo-repository.springsource.org/release</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <!-- General dependencies for standard applications -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${aspectj.version}</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${aspectj.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.flexjson</groupId>
            <artifactId>flexjson</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>
        <!-- ROO dependencies -->
        <dependency>
            <groupId>org.springframework.roo</groupId>
            <artifactId>org.springframework.roo.annotations</artifactId>
            <version>${roo.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- Spring dependencies -->
        <dependency>
          <groupId>com.oracle</groupId>
          <artifactId>ojdbc6</artifactId>
          <version>${oracle.version}</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.2.2.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.2.2.Final</version>
            <exclusions>
                <exclusion>
                    <groupId>cglib</groupId>
                    <artifactId>cglib</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
            <version>1.0.1.Final</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.3.1.Final</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
        </dependency>
        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.5.6</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
                <!-- <configuration> <webXml>target/web.xml</webXml> </configuration> -->
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.4</version>
                <!-- NB: do not use 1.3 or 1.3.x due to MASPECTJ-90 issue  -->
                <dependencies>
                    <!-- NB: You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outxml>true</outxml>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <!--
                      Aspects in src/main/java and src/main/aspects are added 
                      as default in the compile goal.
                      Aspects in src/test/java and src/test/aspects are added 
                      as default in the test-compile goal.
                      Aspects in src/main/java are added in the test-compile 
                      goal if weaveWithAspectsInMainSourceFolder is set to true
                    -->
                    <weaveWithAspectsInMainSourceFolder>false</weaveWithAspectsInMainSourceFolder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
                <configuration>
                    <printSummary>false</printSummary>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <excludes>
                        <exclude>**/*_Roo_*</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
            </plugin>
            <!-- IDE -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
                <!-- Note 2.8 does not work with AspectJ aspect path -->
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>false</downloadJavadocs>
                    <wtpversion>2.0</wtpversion>
                    <additionalBuildcommands>
                        <buildCommand>
                            <name>org.eclipse.ajdt.core.ajbuilder</name>
                            <arguments>
                                <aspectPath>org.springframework.aspects</aspectPath>
                            </arguments>
                        </buildCommand>
                        <buildCommand>
                            <name>org.springframework.ide.eclipse.core.springbuilder</name>
                        </buildCommand>
                    </additionalBuildcommands>
                    <additionalProjectnatures>
                        <projectnature>org.eclipse.ajdt.ui.ajnature</projectnature>
                        <projectnature>com.springsource.sts.roo.core.nature</projectnature>
                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                    </additionalProjectnatures>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-idea-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <dependenciesAsLibraries>true</dependenciesAsLibraries>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <version>1.1</version>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.4.v20120524</version>
                <configuration>
                    <webAppConfig>
                        <contextPath>/${project.name}</contextPath>
                    </webAppConfig>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

有什么想法吗?

共有2个答案

朱和惬
2023-03-14

如果您还没有这样做,请尝试更新有关Maven的项目。

在Eclipse Kepler中,右键单击项目,然后< code>Maven

对于Eclipse的旧版本,您只需右键单击项目,然后< code>Maven,然后我相信< code > Update project configuration 。

每一个都应该向Eclipse发出信号,表明pom.xml已经更新,需要重新检查并下载任何依赖项。

澹台蕴藉
2023-03-14

在我的联结中配置“Springroo发布存储库”后,我解决了它,但没有成功....我解决了它清理我的用户专家存储库...并强制专家更新...因为它没有下载JAR文件,所以我把它放在它应该去的地方...它正在工作

 类似资料:
  • 梅雁电子文档管理系统是基于Python+Django开发的一个类知识库和在线图书馆的开源系统,是 Mayan EDMS 的中文化版本。 Mayan EDMS 是一个文档管理系统。其主要目的是存储、内省和分类文件,重点是保留文档的上下文和业务信息。它还可以OCR、预览、标签、签名、发送和接收文件。其他功能是其工作流系统,基于角色的访问控制和REST API。 2009年乌拉圭政府发起了一个文档电子化

  • 我有eclipse版本:“Mars Release(4.5.0)” 我从https://projectlombok.org/download.html下载了最新的龙目岛罐子 我执行: 在此之后,我可以看到lombok.jar在我的eclipse目录和eclipse.ini. 使用:eclipse-clean重新启动eclipse 但龙目岛仍然不适合我。

  • 主要内容:示例,示例侵蚀与扩张是非常相似的过程。 但是这里计算的像素值在扩张中是最小的而不是最大的。 图像在定位点下被替换为最小像素值。 通过这个程序,黑暗地区的面积增加,明亮的地区减少。 例如,黑暗阴影或黑色阴影的物体的尺寸增加,而白色阴影或明亮阴影下的尺寸减小。 示例 可以使用类的方法在图像上执行此操作。 以下是这种方法的语法 - 该方法接受以下参数 - src - 表示此操作的源(输入图像)的对象。 dst -

  • 我试图运行Maven的两个cucumber功能文件,但什么也没发生。我用的是荷兰版的小cucumber。当我直接在Eclipse或Gradle中运行功能文件时,它们运行良好。我在Stackoverflow上研究了所有关于这个问题的早期问题,但仍然找不到解决方案。 这是我在Eclipse中的项目结构:Eclipse项目结构 使用命令mvn Test与Maven一起运行项目的结果是: 我还尝试使用:“

  • 我正在使用Tizen IDE进行可穿戴设备,在选择新的空工作区后,它崩溃了,有什么想法吗?我有最新的IE浏览器。

  • 今天在工作中,我的eclipse开始反复崩溃。打开它并开始编辑文件几分钟后就会崩溃。我重新安装了所有东西:Eclipse、WorkspaceJava但没有任何帮助。请尝试确定我的问题的根源,因为我目前无法工作。 (…)