Bug 1015038 - Usage of an internal XMvn class
Usage of an internal XMvn class
Product: Fedora
Classification: Fedora
Component: tycho (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Roland Grunberg
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-03 07:00 EDT by Krzysztof Daniel
Modified: 2014-01-12 19:28 EST (History)
5 users (show)

See Also:
Fixed In Version: tycho-0.18.1-7.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-29 16:56:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Krzysztof Daniel 2013-10-03 07:00:18 EDT
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 07:35:45 EDT
The referenced bug should be 986900.
Comment 2 Roland Grunberg 2013-10-04 11:29:21 EDT
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).

Note You need to log in before you can comment on or make changes to this bug.