Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Strange problems with missing SuperPOM (Some jobs, but not all jobs, can't find their SuperPOM)
Strange problems with missing SuperPOM [message #1061158] Thu, 30 May 2013 09:45 Go to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
Hi there.

Even though I've not written here or in the mailing list for months, possibly years, I've been using Hudson for a lot of time and no major troubles. I use it in my software factory and it supports quite a number of jobs (several dozens). I use it with Maven and the relevant configuration for understanding the problem I'm submitting to your attention is explained below:

1. I have my own Nexus instance running on a server (let's call it services/nexus). It works as a proxy towards Central Repo and other public repos, and includes a local hosted repo for a bunch of artifacts that are not published elsewhere (I call it the 3rd party repo).

2. Another Nexus runs on the same server where Hudson runs (let's call it hudson/nexus). It is used as a local cache of artifacts, for speeding up Nexus jobs (some of them always start with a clean local repo), as well as a local snapshot repository that, being on the same host, works faster - it is used when a job completes and triggers another dependent job which is supposed to consume some snapshots produced by the former. For years, the configuration of hudson/nexus was a copy of services/nexus, plus a proxy for the 3rd party repo. With this configuration, no major problems in the past. I've recently changed it so it's simplified: now hudson/nexus is just a proxy towards services/nexus, plus the local snapshot repo.

It happens that most jobs are fine, while a few deterministically fail because they can't resolve the SuperPOM:

Started by user fabrizio.giudici
$ hg clone --rev default --noupdate ssh://hg@bitbucket.org/tidalwave/capecanaveral-src <hudson.tidalwave.it/hudson/job/CapeCanaveral_Compile_and_Test_and_Deploy_Local_Snapshot/ws/>
adding changesets
adding manifests
adding file changes
added 61 changesets with 577 changes to 316 files
[workspace] $ hg update --rev default
103 files updated, 0 files merged, 0 files removed, 0 files unresolved
[workspace] $ hg log --rev . --template {node}
[workspace] $ hg log --rev . --template {rev}
[workspace] $ hg log --rev 803a4c7658056131f748ed8202afc804953d4c98
[workspace] $ hg log --template "<changeset node='{node}' author='{author|xmlescape}' rev='{rev}' date='{date}'><msg>{desc|xmlescape}</msg><added>{file_adds|stringify|xmlescape}</added><deleted>{file_dels|stringify|xmlescape}</deleted><files>{files|stringify|xmlescape}</files><parents>{parents}</parents></changeset>\n" --rev default:0 --follow --prune 803a4c7658056131f748ed8202afc804953d4c98 --encoding UTF-8 --encodingmode replace
Found mavenVersion 3.0.4 from file jar:file:/home/tomcat/Workspaces/Hudson/tools/Maven_3.0.4/lib/maven-core-3.0.4.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Deleting old artifacts from #45
Parsing POMs
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact it.tidalwave.superpom:superpom:pom:2.10 and 'parent.relativePath' points at wrong local POM @ line 6, column 13
 
	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:325)
	at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:360)
	at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:330)
	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1197)
	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1040)
	at hudson.FilePath.act(FilePath.java:791)
	at hudson.FilePath.act(FilePath.java:773)
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:733)
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:541)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:434)
	at hudson.model.Run.run(Run.java:1390)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:414)
	at hudson.model.ResourceController.execute(ResourceController.java:82)
	at hudson.model.Executor.run(Executor.java:137)
[WARNINGS] Skipping publisher since build result is FAILURE
Archiving artifacts
Description set: 
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/target/**/testng-results.xml
Did not find any matching files.
Build does not meet criteria for workspace archiving - result is not at least UNSTABLE.


The heading of the involved Master POM is:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="maven.apache.org/POM/4.0.0" xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>it.tidalwave.superpom</groupId>
        <artifactId>superpom</artifactId>
        <version>2.10</version>
    </parent>



Needless to say that it.tidalwave.superpom:superpom:pom:2.10 has been published to Central Repo, it is available even at hudson/nexus and in fact is used by most of the other jobs running fine on the same Hudson instance. All the configurations of those jobs are *identical* since they are automatically generated starting from a template, only changing things such as the SCM URL, the name of the job, the JDK and such. They all use hudson/nexus as a repo mirror for anything.

I've been trying to understand this problem for some days, but now I think I need help. If you need more details about the configuration of the job, it is available at the URL below and the configuration page should be available in read-only mode to everybody.

hudson (dot) tidalwave (dot) it/hudson/job/CapeCanaveral_Compile_and_Test_and_Deploy_Local_Snapshot/

I'm not filing a bug yet since I can't tell whether it's a problem of mine, or a real Hudson bug.

Thanks.







Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
Re: Strange problems with missing SuperPOM [message #1061220 is a reply to message #1061158] Thu, 30 May 2013 15:12 Go to previous messageGo to next message
Bob Foster is currently offline Bob FosterFriend
Messages: 74
Registered: January 2013
Member
This may not be helpful, but I've found that problems like that can be caused if there's some stray pom.xml in the folder enclosing the folder with the pom.xml whose scan fails. The cure is to get it out of there or try <relativePath/> in the <parent>.
Re: Strange problems with missing SuperPOM [message #1061227 is a reply to message #1061220] Thu, 30 May 2013 15:34 Go to previous messageGo to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
Thanks for the suggestion. I tried it, but it only changed a detail in the error message:

17:29:00  Parsing POMs
17:29:00  ERROR: Failed to parse POMs
17:29:00  org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
17:29:00  [FATAL] Non-resolvable parent POM: Could not find artifact it.tidalwave.superpom:superpom:pom:2.10 and 'parent.relativePath' points at no local POM @ line 6, column 13
17:29:00  
17:29:00  	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:325)
17:29:00  	at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:360)
17:29:00  	at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:330)
17:29:00  	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1197)
17:29:00  	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1040)
17:29:00  	at hudson.FilePath.act(FilePath.java:791)
17:29:00  	at hudson.FilePath.act(FilePath.java:773)
17:29:00  	at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:733)
17:29:00  	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:541)
17:29:00  	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:434)
17:29:00  	at hudson.model.Run.run(Run.java:1390)
17:29:00  	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:414)
17:29:00  	at hudson.model.ResourceController.execute(ResourceController.java:82)
17:29:00  	at hudson.model.Executor.run(Executor.java:137)
17:29:00  [WARNINGS] Skipping publisher since build result is FAILURE


I'll apply the change to all my projects, in any case, since I think it's formally more correct. But doesn't solve my current problem. Is there any place where I can see in a log file the details about POM resolving?

Thanks.


Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."

[Updated on: Thu, 30 May 2013 15:35]

Report message to a moderator

Re: Strange problems with missing SuperPOM [message #1061257 is a reply to message #1061227] Thu, 30 May 2013 19:26 Go to previous messageGo to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
I worked around the problem by running mvn from the command line in the workspaces of the broken jobs, and killing it almost immediately, just after it downloaded the first artifacts, including the superpom. Now the jobs work and I can confirm that they are downloading stuff from the expected Nexus mirror (it was a doubt of mine that I was missing something wrong in the settings.xml). This is just a workaround to restore the sanity of my Hudson jobs, but as soon as I'll have to scratch a workspace I'll face again the problem.

At this point, I'd say it's a strange bug in Hudson. What do you think?


Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
Re: Strange problems with missing SuperPOM [message #1061291 is a reply to message #1061257] Fri, 31 May 2013 03:45 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 449
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Is by any chance offline property (in the advanced section) is set in the maven builder.
You could try by passing -X option to the maven builder and look through the enormous amount of debug data printed and see if there is any obvious hint.


Winston Prakash
Eclipse Hudson team
Re: Strange problems with missing SuperPOM [message #1061308 is a reply to message #1061291] Fri, 31 May 2013 06:46 Go to previous messageGo to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
-X is the first thing I tried - but it doesn't work here. I mean, I get the error before any typical output with -X is produced. When the thing works, I see that there are some POM download logs *before* this section appears:

18:40:18  <===[HUDSON REMOTING CAPACITY]===>channel started
18:40:20  Executing Maven:  -B -f /home/tomcat/Workspaces/Hudson/jobs/CapeCanaveral_Compile_and_Test_and_Deploy_Local_Snapshot/workspace/pom.xml -Dmaven.repo.local=/home/tomcat/Workspaces/Hudson/jobs/CapeCanaveral_Compile_and_Test_and_Deploy_Local_Snapshot/workspace/.repository -X -B -fae clean install clirr:check -Pgenerate-revision-id -DtestReportsDirectory=target/surefire-reports/plain -Dtestset.cached.folder=/tmp/TestCacheFolder -DtestFailureIgnore=true
18:40:21  Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
18:40:21  [INFO] Maven home: /home/tomcat/Workspaces/Hudson/tools/Maven_3.0.4
18:40:21  Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
18:40:21  Scanning for projects...Java home: /home/tomcat/Workspaces/Hudson/tools/JDK_1.6.0_24/jre
18:40:21  Default locale: en_US, platform encoding: UTF-8


which means that when the error occurs because the superpom is not found, it happens before Maven is actually started, with the -X option. Is it something related to the Maven embedded customization by Hudson? This is independent of "Resolve Dependencies during Pom parsing" - normally I check this option, but the behaviour doesn't change with this option disabled.


Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."

[Updated on: Fri, 31 May 2013 06:47]

Report message to a moderator

Re: Strange problems with missing SuperPOM [message #1061763 is a reply to message #1061308] Mon, 03 June 2013 20:01 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 449
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I guess you have checked the "private repository" option in the maven builder advanced option. Because of that maven is using the local repo as -Dmaven.repo.local=/home/tomcat/Workspaces/Hudson/jobs/CapeCanaveral_Compile_and_Test_and_Deploy_Local_Snapshot/workspace/.repository. So if your super pom is not in that, then maven can't find that. Can you uncheck "private repository" option and build.

Winston Prakash
Eclipse Hudson team
Re: Strange problems with missing SuperPOM [message #1061765 is a reply to message #1061763] Mon, 03 June 2013 20:18 Go to previous messageGo to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
Yes, I use that option, but it has always worked, and other jobs with the same option work fine...

Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
Re: Strange problems with missing SuperPOM [message #1061904 is a reply to message #1061765] Tue, 04 June 2013 15:39 Go to previous messageGo to next message
Bob Foster is currently offline Bob FosterFriend
Messages: 74
Registered: January 2013
Member
Sure, but in this particular case, could you try unchecking that option and see if the job will build without any special repository priming?
Re: Strange problems with missing SuperPOM [message #1061932 is a reply to message #1061904] Tue, 04 June 2013 20:27 Go to previous messageGo to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
Tried to uncheck the option, but it didn't make any difference. Note that in the meantime a subset of the broken jobs spontaneously "fixed" themselves: I mean, in these days I did some push to the SCM, they rebuilt, and some are back ok now. So it sounds it's also an intermittent problem.

Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
Re: Strange problems with missing SuperPOM [message #1061936 is a reply to message #1061932] Tue, 04 June 2013 22:58 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 449
Registered: August 2011
Location: Fremont, CA USA
Senior Member
One more thing, I guess you build super-pom and it is in your local repo right not in the Nexus correct? If so, if you are building in slaves, then this super-pom need to be built on that slave once for other jobs to build. However, if you push your artifacts to Nexus, and it is available from all slaves, then my point is moot.

Winston Prakash
Eclipse Hudson team
Re: Strange problems with missing SuperPOM [message #1062152 is a reply to message #1061936] Thu, 06 June 2013 09:27 Go to previous message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
"One more thing, I guess you build super-pom and it is in your local repo right not in the Nexus correct?"

It's not correct. The super-pom in this case is in a separated project and already deployed. Usually it's even a RELEASE, but in this moment I'm doing some large refactoring, so it's a SNAPSHOT itself. But, as I said, previously deployed. At the moment I'm not using slaves, only a single instance.


Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
Previous Topic:StackOverFlow after updating JDepend plugin
Next Topic:Hudson can't authenticate via ssh
Goto Forum:
  


Current Time: Sat Dec 20 22:32:09 GMT 2014

Powered by FUDForum. Page generated in 0.02968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software