Results 1 to 10 of 17

Thread: "Project configuration is not up-to-date with pom.xml"

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default "Project configuration is not up-to-date with pom.xml"

    I seem to fall into an odd loop in some of my simple Roo projects.

    At some point I get the Marker under "Maven problems" with the message "Project configuration is not up-to-date with pom.xml. Run project configuration update".
    I do what is asked and run Maven -> "update project configuration" from the right-click popup menu and I choose to update dependencies for the codebase of the project. When I do I'm noticed "Unable to update maven configuration" with error "problems encountered when setting project description".
    Sometimes I also get the submessage that "Cannot remove nature org.springframework.ide.eclipse.core.springnature because it is a prerequisite of nature com.springsource.sts.roo.core.nature."

    I tried a couple of times to remove and re-add the natures in question, which resolved the problem temporarily. Any small change to the pom starts this cycle once more however.

    Project was created with Roo and some changes made to the pom. The project in use validates, compiles and tests run green.

    STS 2.8.1.RELEASE fresh install with Mercurial, Infinitest. For maven (external 3.03) I added the plugins maven-builder-helper, Failsafe and Cargo.

    I need to get out of this cycle now. Any ideas or thoughts?

  2. #2

    Default

    Just tried to create a standard Roo project, added plugins you stated and a couple of new dependencies, but I can't make it fail.
    BTW, I'm using STS 2.9.1.RELEASE

    My suggestion is you try with this newer STS version.

    Best,
    Carlos.

  3. #3
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    This seem to only happen in a small number of projects. I've been using Roo with STS for close to 2 years and I have never seen this specific problem before.

    I've added 2 new source folders: "src/it/java" and "src/it/resources", besides that the project is a typical Spring Roo MVC project. In maven everything runs as expected and maven doesn't complain about anything, it's just STS that detect a mismatch. When I check the project config everything looks normal to me. Comparisons to very similar projects that do not exhibit this symptom doesn't reveal anything that sticks out. I'm wondering if source order in the pom affects.

    Here's an extract of my setup of maven-builder-helper, Failsafe and Cargo:
    Code:
    <!-- All typical Roo dependencies and all other typical Roo pom parts here with Jetty being commented out. Jetty 7 is added as a profile instead.-->
    <build>
    <pluginManagement>
    <!--All typical Roo made plugins without the executions part are within the "pluginManagement" element. The executions part go into the later "plugins" element.-->
    <plugins>
    <plugin>
    				<groupId>org.codehaus.cargo</groupId>
    				<artifactId>cargo-maven2-plugin</artifactId>
    				<version>1.2.1</version>
    				<!-- Config -->
    				<configuration>
    					<configuration>
    						<deployables>
    							<!-- The project's artifact is automatically deployed if no deployable 
    								is defined. However, we define it here so that we can specify the context 
    								(we don't want the version to be included in the context). -->
    							<deployable>
    								<groupId>${project.groupId}</groupId>
    								<artifactId>${project.artifactId}</artifactId>
    								<type>war</type>
    								<properties>
    									<context>${project.artifactId}</context>
    								</properties>
    							</deployable>
    						</deployables>
    						<properties>
    							<cargo.servlet.port>${servlet.port}</cargo.servlet.port>
    						</properties>
    					</configuration>
    				</configuration>
    			</plugin>
    		</plugins>
    		</pluginManagement>
    <plugin>
    				<groupId>org.codehaus.mojo</groupId>
    				<artifactId>build-helper-maven-plugin</artifactId>
    <!--version 1.5 in previous section-->
    				<executions>
    					<execution>
    						<id>add-it-source</id>
    						<goals>
    							<goal>add-test-source</goal>
    						</goals>
    						<configuration>
    							<sources>
    								<source>src/it/java</source>
    							</sources>
    						</configuration>
    					</execution>
    					<execution>
    						<id>add-it-resource</id>
    						<goals>
    							<goal>add-test-resource</goal>
    						</goals>
    						<configuration>
    							<resources>
    								<resource>
    									<directory>src/it/resources</directory>
    								</resource>
    							</resources>
    						</configuration>
    					</execution>
    				</executions>
    			</plugin>
    
                           <plugin>
    				<groupId>org.apache.maven.plugins</groupId>
    				<artifactId>maven-failsafe-plugin</artifactId>
    <!--Failsafe version 2.8 in pluginManagement section-->
    				<executions>
    					<execution>
    						<id>perform-it</id>
    						<goals>
    							<goal>integration-test</goal>
    						</goals>
    						<configuration>
    							<systemProperties>
    								<property>
    									<name>servlet.port</name>
    									<value>${servlet.port}</value>
    								</property>
    							</systemProperties>
    						</configuration>
    					</execution>
    					<execution>
    						<id>verify-it</id>
    						<goals>
    							<goal>verify</goal>
    						</goals>
    					</execution>
    				</executions>
    			</plugin>
    </plugins>
    <profiles>
    		<profile>
    			<id>jetty7x</id>
    			<activation>
    				<activeByDefault>true</activeByDefault>
    			</activation>
    			<build>
    				<pluginManagement>
    					<plugins>
    						<plugin>
    							<groupId>org.codehaus.cargo</groupId>
    							<artifactId>cargo-maven2-plugin</artifactId>
    							<configuration>
    								<container>
    									<containerId>jetty7x</containerId>
    									<artifactInstaller>
    										<groupId>org.eclipse.jetty</groupId>
    										<artifactId>jetty-distribution</artifactId>
    										<version>7.6.2.v20120308</version>
    									</artifactInstaller>
    								</container>
    								<!-- Tillagd -->
    								<webAppConfig>
    									<contextPath>/${project.name}</contextPath>
    								</webAppConfig>
    							</configuration>
    						</plugin>
    					</plugins>
    				</pluginManagement>
    			</build>
    		</profile>
    	</profiles>
    </build>
    Last edited by MiB; May 23rd, 2012 at 03:50 AM.

  4. #4
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    What version of mw2eclipse are you using? 2.8.x was when we moved to m2e v1.0. Previously, we included v0.13. In 2.8.1, we included the ability to switch your m2e version.

    It could be related to the m2e version you are using, or it could also be related to some as yet undiscovered quirk in our handling of both versions.

    Check for relevant errors in your error log and paste them here.

    If you want to upgrade, I'd recommend going to 2.9.2 (available Friday, or just use the nightly update sites to get it now).
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  5. #5
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Thanks for the response, Andrew. The short answer is that m2e 1.0.100 is installed. On the other hand under "Spring Tools" I can only choose "Update Maven Dependencies (legacy). The non legacy option is greyed out. Does this mean I'm not using m2e? I don't see any option to convert projects to m2e.

    I think I imported this project as an existing maven project after I let Roo configure the project in the terminal.

  6. #6
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    And just to be clear...you have other maven-roo projects that are working for you in this workspace?

    Based on the fact that the update legacy maven dependencies is the only one available, it would seem to me that somehow your project is set up to use the old version even though your workspace uses the new version of m2e.

    Can you paste your .project file here? I am particularly interested in the builders and natures section.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  7. #7
    Join Date
    Mar 2013
    Location
    Casablanca, Morocco
    Posts
    1

    Default

    Quote Originally Posted by MiB View Post
    I seem to fall into an odd loop in some of my simple Roo projects.

    At some point I get the Marker under "Maven problems" with the message "Project configuration is not up-to-date with pom.xml. Run project configuration update".
    I do what is asked and run Maven -> "update project configuration" from the right-click popup menu and I choose to update dependencies for the codebase of the project. When I do I'm noticed "Unable to update maven configuration" with error "problems encountered when setting project description".
    Sometimes I also get the submessage that "Cannot remove nature org.springframework.ide.eclipse.core.springnature because it is a prerequisite of nature com.springsource.sts.roo.core.nature."

    I tried a couple of times to remove and re-add the natures in question, which resolved the problem temporarily. Any small change to the pom starts this cycle once more however.

    Project was created with Roo and some changes made to the pom. The project in use validates, compiles and tests run green.

    STS 2.8.1.RELEASE fresh install with Mercurial, Infinitest. For maven (external 3.03) I added the plugins maven-builder-helper, Failsafe and Cargo.

    I need to get out of this cycle now. Any ideas or thoughts?


    1 - Open Marker View
    2 - Right-click on the Error message
    3 - Select Quick Fix
    4 - Click Finish

  8. #8
    Join Date
    Feb 2013
    Posts
    3

    Default

    It turned out my problem wasn't related to expressions in the parent.version tag, as the error came back later. I guess that something else that I did, "fixed" the issue temporary.

    I later realised that my parent project also had the org.springframework.ide.eclipse.core.springnature and com.springsource.sts.roo.core.nature natures, that were left there and not used anymore since the project was split in modules. So I removed them, and I haven't seen the error since.

  9. #9
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey!

    Glad to hear its working now and thanks for the additional details!!!

    Cheers,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •