karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Updated] (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:38:28 GMT

     [ https://issues.apache.org/jira/browse/KARAF-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré updated KARAF-3210:
----------------------------------------
    Fix Version/s: 3.0.2
                   4.0.0

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

Mime
View raw message