Bug 1015038 - Usage of an internal XMvn class
Summary: Usage of an internal XMvn class
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tycho
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roland Grunberg
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-03 11:00 UTC by Krzysztof Daniel
Modified: 2014-01-13 00:28 UTC (History)
5 users (show)

Fixed In Version: tycho-0.18.1-7.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-29 20:56:13 UTC
Type: Bug


Attachments (Terms of Use)

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).


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