Bug 1015038

Summary: Usage of an internal XMvn class
Product: [Fedora] Fedora Reporter: Krzysztof Daniel <kdaniel>
Component: tychoAssignee: Roland Grunberg <rgrunber>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: java-sig-commits, kdaniel, mbenitez, mizdebsk, rgrunber
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tycho-0.18.1-7.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-29 20:56:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Krzysztof Daniel 2013-10-03 11:00:18 UTC
A fix for bug 989600 replaced calls to xmvn with a reflection-based solution, that did not require spawning new processes.

I got today:
ava.lang.ClassNotFoundException: org.fedoraproject.maven.resolver.DefaultResolver
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at org.eclipse.tycho.p2.repository.LocalRepositoryReader.getLocalArtifactLocation(LocalRepositoryReader.java:34)
        at org.eclipse.tycho.p2.maven.repository.AbstractMavenArtifactRepository.getRawArtifact(AbstractMavenArtifactRepository.java:211)
        at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getRawOrNormalArtifact(CompositeArtifactRepository.java:368)
        at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getRawArtifact(CompositeArtifactRepository.java:360)

This caused by the fact that org.fedoraproject.maven.resolver.DefaultResolver has been refactored into org.fedoraproject.maven.resolver.impl.DefaultResolver.
DefaultResolver is not an API and can be changed without any warning as it happened in this time. I will push a new tycho build with a proper Class.forName call, but it would be good to have more robust solution (use API).

Comment 1 Krzysztof Daniel 2013-10-03 11:35:45 UTC
The referenced bug should be 986900.

Comment 2 Roland Grunberg 2013-10-04 15:29:21 UTC
Thanks for the workaround. I changed the usage of XMvn DefaultResolver in favour of using the plexus component with role=org.eclipse.aether.repository.WorkspaceReader (http://pkgs.fedoraproject.org/cgit/tycho.git/commit/?id=d3195d860848a948fafa074b39e72670eac41cb4) . I've tested this with eclipse-jgit and can confirm things are working.

Setting version to f20, since for f19 XMvn is still at 0.5.0 (and I assume will probably stay that way).