[
https://issues.apache.org/jira/browse/KARAF-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14132575#comment-14132575
]
Jean-Baptiste Onofré commented on KARAF-3210:
---------------------------------------------
Fixed on master:
https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=commitdiff;h=703b6a7a9b2b5a74fac99b10f4b3cd45be925638
> karaf:features-generate-descriptor fails with Maven 3.1.x and 3.2.x :
> required class was missing ... org/sonatype/aether/RepositorySystem
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: KARAF-3210
> URL: https://issues.apache.org/jira/browse/KARAF-3210
> Project: Karaf
> Issue Type: Bug
> Components: karaf-tooling
> Reporter: Stuart McCulloch
> Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.0, 3.0.2
>
>
> Appears to be a regression that affects the latest 3.0.x and master branches.
> Note this is subtly different to KARAF-2395 which was an exception due to a
> missing component whereas this an exception due to a missing/hidden class.
> Switching over to the {{hasComponent(String)}} method solves the problem:
> {code}
> diff --git
> a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/DependencyHelperFactory.java
>
> b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/DependencyHelperFactory.java
> index f054c6c..1287dc8 100644
> ---
> a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/DependencyHelperFactory.java
> +++
> b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/DependencyHelperFactory.java
> @@ -51,12 +51,12 @@ public class DependencyHelperFactory {
> */
> public static DependencyHelper createDependencyHelper(PlexusContainer
> container, MavenProject mavenProject, MavenSession mavenSession, Log log)
> throws MojoExecutionException {
> try {
> - if
> (container.hasComponent(org.sonatype.aether.RepositorySystem.class)) {
> + if
> (container.hasComponent("org.sonatype.aether.RepositorySystem")) {
> org.sonatype.aether.RepositorySystem system =
> container.lookup(org.sonatype.aether.RepositorySystem.class);
> org.sonatype.aether.RepositorySystemSession session =
> mavenSession.getRepositorySession();
> List<RemoteRepository> repositories =
> mavenProject.getRemoteProjectRepositories();
> return new Dependency30Helper(repositories, session, system);
> - } else if
> (container.hasComponent(org.eclipse.aether.RepositorySystem.class)) {
> + } else if
> (container.hasComponent("org.eclipse.aether.RepositorySystem")) {
> org.eclipse.aether.RepositorySystem system =
> container.lookup(org.eclipse.aether.RepositorySystem.class);
> Object session;
> try {
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)