Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1227

Facet classloading problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • 1.x Future
    • 1.4.1.Final
    • Build Tools - Maven
    • None

      I am a bit puzzled about a Forge behaviour I can not seem to understand. There seems to be a difference in the line

      final Project topReactor = projectFactory.createProject(rootDirectory,DependencyFacet.class, MetadataFacet.class, MavenPluginFacet.class);
      

      if you use the "forge install-plugin", compared to if you download the repository 'manually' using Git and execute "forge source-plugin" on the repository.

      In the latter of these cases, the statement above is executed correctly and the plugin works well. In the former of these cases, however, the statement above throws an exception as shown below. I interpret this exception as something indicating that one of the Facets in the statement above is not present ... but since I cannot provoke this state when building the plugin locally (as is typical for debugging), I am at a loss to finding the cause. Is the statement above fundamentally wrong? Or should something be preceeding it to secure that the given Facets are present?

      java.util.NoSuchElementException
        at org.sonatype.guice.bean.locators.LocatedBeans$Itr.next(LocatedBeans.java:184)
        at org.sonatype.guice.bean.locators.LocatedBeans$Itr.next(LocatedBeans.java:124)
        at org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:64)
        at org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:52)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:229)
        at org.jboss.forge.maven.facets.MavenContainer.lookup(MavenContainer.java:214)
        at org.jboss.forge.maven.facets.MavenContainer.getBuildingRequest(MavenContainer.java:86)
        at org.jboss.forge.maven.facets.MavenContainer.getRequest(MavenContainer.java:68)
        at org.jboss.forge.maven.facets.MavenContainer$Proxy$_$$_WeldClientProxy.getRequest(MavenContainer$Proxy$_$$_WeldClientProxy.java)
        at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:90)
        at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:338)
        at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:394)
        at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:172)
        at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
        at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
        at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
        at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
        at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
        at org.jboss.forge.project.services.ProjectFactory.createProject(ProjectFactory.java:146)
        at se.jguru.nazgul.forge.factory.api.AbstractNewNazgulFrameworkProjectPlugin.makeNazgulStyleProjectStructure(AbstractNewNazgulFrameworkProjectPlugin.java:253)
      ...
      

              Unassigned Unassigned
              jgurureurope Lennart Jörelid (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: