karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-3210) karaf:features-generate-descriptor fails with Maven 3.1.x and 3.2.x : required class was missing ... org/sonatype/aether/RepositorySystem
Date Mon, 08 Sep 2014 12:36:28 GMT
Stuart McCulloch created KARAF-3210:
---------------------------------------

             Summary: 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


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)

Mime
View raw message