Eclipse Blue,Maven:项目配置不是最新的pom.xml [英] Eclipse Blue, Maven: Project configuration is not up-to-date with pom.xml
问题描述
我通常按照以下路径从SVN导入maven项目:
文件>进口> SVN>从SVN结帐项目
然后导入所有maven项目:
右键单击导入的项目> Maven4MyEclipse>现有的Maven项目
我有一个名为project-ear的maven模块,此模块要绑定所有我的Web应用程序一个耳朵。
但是,当我将EAR模块导入eclipse项目时,eclipse会在问题选项卡中提示以下错误:
项目配置不是最新的pom.xml。运行项目配置更新。
如何解决这个问题?我没有看到任何方式运行项目配置更新。
请帮助。
xml for EAR模块:
< 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>
< parent>
< groupId> com.company.xxx< / groupId>
< artifactId> my< / artifactId>
< version> 1.0-SNAPSHOT< / version>
< / parent>
< groupId> com.company.xxx.ear< / groupId>
< artifactId> my-ear< / artifactId>
< packaging> ear< / packaging>
< name> my-ear< / name>
< build>
< finalName> web-app< / finalName>
< plugins>
< plugin>
< artifactId> maven-ear-plugin< / artifactId>
< version> 2.5< / version>
< configuration>
< modules>
< webModule>
< groupId> com.company.xxx.myweb< / groupId>
< artifactId> my-web< / artifactId>
< contextRoot> / txcs< / contextRoot>
< / webModule>
< / modules>
< generateApplicationXml> true< / generateApplicationXml>
< displayName> web-app< / displayName>
< / configuration>
< / plugin>
< / plugins>
< / build>
<依赖关系>
<依赖关系>
< groupId> com.company.xxx.myweb< / groupId>
< artifactId> my-web< / artifactId>
< type> war< / type>
< version> $ {project.version}< / version>
< / dependency>
< / dependencies>
抱歉,我还没有添加评论。 stonedsquirrel(上图)是对的,他们的答案应该是正确的:
- 转到包资源管理器
- 右键单击项目
- 选择Maven\Update Project
对我来说。
I am using Eclipse Blue 10 & Maven 3 in my development environment.
I generally import maven projects from SVN by following below path:
File > Import> SVN > Checkout Projects from SVN
Then import all maven projects:
Right click on imported project > Maven4MyEclipse> Existing Maven Projects
I have a maven module called 'project-ear' and this module is to bind all my web applications into one ear.
But whenever I import EAR module as eclipse project, eclipse prompts below error in 'Problems' tab:
Project configuration is not up-to-date with pom.xml. Run project configuration update.
How to resolve this issue? I don't see any way to "Run project configuration update".
Please help.
Pom.xml for EAR module:
<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>
<parent>
<groupId>com.company.xxx</groupId>
<artifactId>my</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.company.xxx.ear</groupId>
<artifactId>my-ear</artifactId>
<packaging>ear</packaging>
<name>my-ear</name>
<build>
<finalName>web-app</finalName>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.5</version>
<configuration>
<modules>
<webModule>
<groupId>com.company.xxx.myweb</groupId>
<artifactId>my-web</artifactId>
<contextRoot>/txcs</contextRoot>
</webModule>
</modules>
<generateApplicationXml>true</generateApplicationXml>
<displayName>web-app</displayName>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.company.xxx.myweb</groupId>
<artifactId>my-web</artifactId>
<type>war</type>
<version>${project.version}</version>
</dependency>
</dependencies>
Sorry, I don't have the rep to add comment yet. stonedsquirrel (above) is right though and their answer should be voted as correct:
- Go to package explorer
- Right-click the project
- Select Maven\Update Project
Worked perfectly for me.
这篇关于Eclipse Blue,Maven:项目配置不是最新的pom.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!