Announcement Announcement Module
Collapse
No announcement yet.
"Project configuration is not up-to-date with pom.xml" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "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
    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.

    Comment


    • #3
      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, 04:50 AM.

      Comment


      • #4
        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).

        Comment


        • #5
          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.

          Comment


          • #6
            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.

            Comment


            • #7
              Same issue

              Originally posted by Andrew Eisenberg View Post
              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.
              I am having the same problem. Super-simple project that I just started, Roo 1.2.1.RELEASE, STS 2.9.2. I haven't even started working on the web components yet...all I have is a few entities. I am not sure when it started, but it seems recent.

              I have 2 other projects loaded that are more "complete" and complex projects, and neither of them have the error. My m2e version is 1.0.200.20111228-1245. I tried doing a "Check for updates", but it came back saying none were available.

              I do have both Update Maven Dependencies (legacy) and Update Maven Dependencies as options. I tried running the latter, but I still have the error.

              A couple oddities to note with this project. The first is that one of my entities has a custom Enum it it. The Enum is in the same exact package, but for some reason Eclipse is claiming it can't find it. Second is that the Roo Shell seems to think my default package has .domain on the end. I defined my "default" without the .domain, and so far all I have created are some of the entities. I believe after I updated to 2.9.2 (from 2.8.x), the Roo Shell started assuming everything was in the .domain package. So, where I would usually do something like:
              Code:
              entity jpa --class ~.domain.MyNewEntity
              instead of being in the path com.mycompany.xyz.domain, its in com.mycompany.xyz.domain.domain. I thought I read somewhere that the Roo Shell grabs the "default" from the pom.xml, and I assume it to come from the group id, which has the correct package path.

              Right now, I am considering just scrapping this project and starting over. I haven't put too much into it yet, at least not enough to just wipe and start afresh. If I do, I'll report back if I am seeing the same issues or not.
              Last edited by mbabauer; Jul 21st, 2012, 08:49 AM.

              Comment


              • #8
                As I mentioned earlier, I need to see your .project file (usually it is a hidden file in your project in the workspace). It is likely that this file is using the old m2e entries.

                Comment


                • #9
                  My pom.xml is here: Attachment

                  I ended up just re-creating the project. So far, I haven't seen the error mentioned.
                  Attached Files

                  Comment


                  • #10
                    As I said, I need to see your .project file, the pom.xml file is not helpful for this. But anyway since you said your new project seems to be working, it's probably that you have started with a proper .project file and all the m2e configuration is now correct.

                    Please feel free to post here if you continue to have problems.

                    Comment


                    • #11
                      I'm having the same issue described here:

                      ENTRY org.eclipse.core.resources 2 568 2013-02-26 20:07:21.170
                      !MESSAGE Problems encountered while setting project description.
                      !SUBENTRY 1 org.eclipse.core.resources 2 35 2013-02-26 20:07:21.170
                      !MESSAGE Cannot remove nature org.springframework.ide.eclipse.core.springnature because it is a prerequisite of nature com.springsource.sts.roo.core.nature.

                      Using Spring IDE 3.1.0.201210040510-RELEASE under Indigo Service Release 2

                      I have tried many things, even removing the project from eclipse, run eclipse:clean, import the project again as an existing maven project.

                      My .project file contents are:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <projectDescription>
                      <name>xxxxxxx-model</name>
                      <comment></comment>
                      <projects>
                      </projects>
                      <buildSpec>
                      <buildCommand>
                      <name>org.eclipse.ajdt.core.ajbuilder</name>
                      <arguments>
                      </arguments>
                      </buildCommand>
                      <buildCommand>
                      <name>org.springframework.ide.eclipse.core.springb uilder</name>
                      <arguments>
                      </arguments>
                      </buildCommand>
                      <buildCommand>
                      <name>org.eclipse.m2e.core.maven2Builder</name>
                      <arguments>
                      </arguments>
                      </buildCommand>
                      </buildSpec>
                      <natures>
                      <nature>com.springsource.sts.roo.core.nature</nature>
                      <nature>org.springframework.ide.eclipse.core.sprin gnature</nature>
                      <nature>org.eclipse.ajdt.ui.ajnature</nature>
                      <nature>org.eclipse.jdt.core.javanature</nature>
                      <nature>org.eclipse.m2e.core.maven2Nature</nature>
                      </natures>
                      </projectDescription>

                      Any guidance would be really appreciated. Thanks.

                      Comment


                      • #12
                        Not too sure what is happening. Any chance you can share the project?

                        Comment


                        • #13
                          Out of desperation I started to simplify the pom.xml and I've found that it's related to using expressions in the parent.version tag. If I replace them with some constant version number, Maven->Project Update... doesn't fail anymore.

                          But it's estrange, because I use expressions in other sub-projects too without causing any problems. The only difference somewhat related to the error message is that this project does indeed use ROO. And no, the springnature doesn't get removed from those sub-projects after doing a Project Update. Shame the plugin doesn't give more detailed logs.

                          Anyway, maven also gives warnings against using expressions, so I guess it's time to find another way of doing what I was doing with them.

                          Comment


                          • #14
                            Thanks for the reply. It does sound like this is a limitation of the m2e plugin.

                            Comment


                            • #15
                              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

                              Comment

                              Working...
                              X