Community
Participate
Working Groups
After using Ctrl+Click on the <parent> element to view the parent pom in the m2e pom editor view, that pom file becomes corrupted in the local repository. Looking in the local repository itself, the file becomes 0 bytes in length. This causes failures inside (when updating project) and outside of eclipse: c:\work\ApolloServer\BenTatham>mvn validate [INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project ca.nanometrics.apollo:ApolloServer:2.1.1-SNAPSHOT (c:\work\ApolloServer\BenTatham\pom.xml) has 1 error [ERROR] Non-readable POM C:\tools\maven\repository\ca\nanometrics\maven\web-common-pom-java6\4.1.2\web-common-pom-java6-4.1.2.pom: input contained no data @ C:\tools\maven\repository\ca\nanometrics\maven\web-common-pom-java6\4.1.2\web-common-pom-java6-4.1.2.pom [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [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 read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException c:\work\ApolloServer\BenTatham> Eclipse IDE for Java Developers Version: Indigo Release Build id: 20110615-0604 eclipse.buildId=I20110613-1736 M2E 1.0.0.20110607-2117 jdk1.6.0_25 os.arch=amd64 os.name=Windows 7 os.version=6.1
I've tried with a few of our own codebases but could not reproduce, however I'm on Mac, not Windows. is this 100% reproducible for you or just a one time (random) event? Any additional details, steps to reproduce, logs etc appreciated.
Created attachment 198484 [details] Maven Console This is the maven console view when I ctrl+clicked the parent element. It happens on all my projects consistently and repeatedly, with different parent poms (although they are all part of the same pom hierarchy). If I blow away the broken pom's directory in my local repo filesystem, it happens again the next time too.
I was using vrapper as well (http://vrapper.sourceforge.net/home/) and thought that might be the culprit, but I uninstalled that, and I still get the same behaviour. The only message related in the Error Log is the same one in the maven console: JAR will be empty - no content was marked for inclusion! An exception stack trace is not available. eclipse.buildId=I20110613-1736 java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_CA Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Installing C:\tools\maven\repository\ca\nanometrics\maven\common-pom-libgcj\4.1.2\common-pom-libgcj-4.1.2.pom to C:\tools\maven\repository\ca\nanometrics\maven\common-pom-libgcj\4.1.2\common-pom-libgcj-4.1.2.pom is the common-pom-libgcj-4.1.2.pom the parent pom in question? I'm not sure where this logs are coming from, it looks like a maven-install-plugin log entry.. the weird part here is that both the origin and destination locations are equal. So maybe some part of m2e is performing a build on the location in the local repository of yours? BTW: by any chance do you have the c:\tools\ path (or any of it's children) in the eclipse workspace?
(In reply to comment #4) > is the common-pom-libgcj-4.1.2.pom the parent pom in question? yes, common-pom-libgcj:4.1.2 is the parent pom in question. > I'm not sure where this logs are coming from, it looks like a > maven-install-plugin log entry.. the weird part here is that both the origin > and destination locations are equal. So maybe some part of m2e is performing a > build on the location in the local repository of yours? sounds like its installing a 0B jar as the pom itself for the parent project...it definitely sounds like you're on to something. I don't have any extra config for the maven-install-plugin in any of my parent poms...The only entry in my effective pom is from the Maven Super POM: <plugin> <artifactId>maven-install-plugin</artifactId> <version>2.3.1</version> <executions> <execution> <id>default-install</id> <phase>install</phase> <goals> <goal>install</goal> </goals> </execution> </executions> </plugin> > BTW: by any chance do you have the c:\tools\ path (or any of it's children) in > the eclipse workspace? no. my workspaces are all in c:\work\...
Same problem for me. Parent pom gets corrupted when opening via pom editor (empty file). Tried same setup / workspace on Linux Ubuntu 11.4 and Mac. * works on Mac * files gets corrupted on Ubuntu 11.4 Problem occured Failed to load Effective POM Can't read Maven project Some problems were encountered while processing the POMs: [FATAL] Non-readable POM .../.m2/repository/org/apache/struts/struts2-core/2.2.3-sg-1.7/struts2-core-2.2.3-sg-1.7.pom: input contained no data @ Some problems were encountered while processing the POMs: [FATAL] Non-readable POM .../.m2/repository/org/apache/struts/struts2-core/2.2.3-sg-1.7/struts2-core-2.2.3-sg-1.7.pom: input contained no data @
*** Bug 352543 has been marked as a duplicate of this bug. ***
by any chance, do your affected projects define the build/defaultGoal element in the pom? (or more precisely does the defaultGoal element show up in the effective pom of the affected project?)
(In reply to comment #8) > by any chance, do your affected projects define the build/defaultGoal element > in the pom? (or more precisely does the defaultGoal element show up in the > effective pom of the affected project?) our affected pom doesnt have a defaultGoal. As posted above: the same pom file gets corrupted with Ubuntu 11.4 and Eclipse 3.7, while it doesnt corrupt with Mac and Eclipse 3.7. So might be independent to its content.
I suspect the problematic code is the SelectionUtils.readMavenProject() method which calls IMaven.execute() but shall be doing something along the IMaven.readProject() lines. I cannot verify the theory though as I still cannot reproduce locally.. The execute() method is definitely weird to be called on pom files from local repository..
Can people affected by the problem attach their user settings.xml (stripped off credentials and other sensitive info, of course)?
Created attachment 199979 [details] settings.xml Looking over it, there aint anything special in there.
Created attachment 199992 [details] settings.xml that reproduces the problem I removed all the profile stuff from my settings.xml and I can still reproduce the problem.
(In reply to comment #8) > by any chance, do your affected projects define the build/defaultGoal element > in the pom? (or more precisely does the defaultGoal element show up in the > effective pom of the affected project?) Yes, I did a "mvn help:effective-pom" in the child project, and the result contained this: <defaultGoal>clean install</defaultGoal>
That question about the defaultGoal made me curious: I removed the defaultGoal tag from the parent pom file in the local repository and the problem didnt occur the next time I tried the "Open Parent POM" action!
Cool, that sort of confirms my theory with execute() vs readProject()... (In reply to comment #15) > That question about the defaultGoal made me curious: I removed the defaultGoal > tag from the parent pom file in the local repository and the problem didnt > occur the next time I tried the "Open Parent POM" action!
I've replaced the execute() call with readProject(). That shall avoid the problem if default goals kicking in. http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=93179f239cac8aab9f4f59c4fe9df995eb3d872c please verify by installing m2e from this url and testing with your projects and setup. Thanks a lot. https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.0.100/N/LATEST/
(In reply to comment #17) > please verify by installing m2e from this url and testing with your projects > and setup. Verified. Parent pom is no longer corrupted.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/