Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-17492

Forge2: CLI appears to stall when project has errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 4.2.0.CR2
    • 4.2.0.Beta2
    • forge
    • None

      I have a project with errors. When in that project on the CLI and press tab for list of available commands, the CLI of forge1 and 2 act differently.

      On forge1 CLI, CLI pauses momentarily and then sticks out a list of issues with the project:

      [no project] workspace $ cd jboss-javaee6-webapp/
      ***ERROR*** Exception encountered: 14 problems were encountered while building the effective model for org.jboss.tools.examples:jboss-javaee6-webapp:0.0.1-SNAPSHOT
      [FATAL] Non-resolvable parent POM: Could not find artifact org.jboss.bom:jboss-bom-parent:pom:1.0.4.Final-redhat-4 in jboss-wfk-2-5-0-maven-repository (file:/home/applications/jboss-wfk/jboss-wfk-2.5.0-maven-repository/) @ org.jboss.bom:jboss-javaee-6.0-with-tools:1.0.4.Final-redhat-4
      [ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom:jboss-javaee-6.0-with-hibernate:pom:1.0.4.Final-redhat-4 in jboss-wfk-2-5-0-maven-repository (file:/home/applications/jboss-wfk/jboss-wfk-2.5.0-maven-repository/) @ line 83, column 25
      [ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 100, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. @ line 108, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_1.1_spec:jar is missing. @ line 116, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 124, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 132, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator:jar is missing. @ line 141, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.faces:jboss-jsf-api_2.1_spec:jar is missing. @ line 155, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-jpamodelgen:jar is missing. @ line 165, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator-annotation-processor:jar is missing. @ line 173, column 21
      [ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 180, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line 189, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @ line 195, column 21
       (type "set VERBOSE true" to enable stack traces)
      [no project] workspace $ 
      

      But on forge2 CLI, the same project causes the CLI to appear to freeze. On the CLI where I started JBDS, output is streaming:

      Jun 01, 2014 6:26:49 PM org.jboss.forge.addon.maven.projects.MavenFacetImpl getProperties
      WARNING: Failed to resolve properties in [/home/applications/workspace/jboss-javaee6-webapp/pom.xml].
      Jun 01, 2014 6:26:50 PM org.jboss.forge.addon.maven.projects.MavenFacetImpl getProperties
      WARNING: Failed to resolve properties in [/home/applications/workspace/jboss-javaee6-webapp/pom.xml].
      Jun 01, 2014 6:26:51 PM org.jboss.forge.addon.maven.projects.MavenFacetImpl resolveProperties
      WARNING: Failed to resolve properties in [/home/applications/workspace/jboss-javaee6-webapp/pom.xml] for input value [org.jboss.spec.javax.servlet].
      Jun 01, 2014 6:26:52 PM org.jboss.forge.addon.maven.projects.MavenFacetImpl resolveProperties
      WARNING: Failed to resolve properties in [/home/applications/workspace/jboss-javaee6-webapp/pom.xml] for input value [jboss-servlet-api_3.0_spec].
      Jun 01, 2014 6:26:54 PM org.jboss.forge.addon.maven.projects.MavenFacetImpl resolveProperties
      WARNING: Failed to resolve properties in [/home/applications/workspace/jboss-javaee6-webapp/pom.xml] for input value [provided].
      Jun 01, 2014 6:26:55 PM org.jboss.forge.addon.maven.projects.facets.MavenDependencyFacet getEffectiveDependencies
      SEVERE: Could not resolve managed dependencies in project [/home/applications/workspace/jboss-javaee6-webapp/pom.xml]. 
      java.lang.RuntimeException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [FATAL] Non-resolvable parent POM: Could not find artifact org.jboss.bom:jboss-bom-parent:pom:1.0.4.Final-redhat-4 in jboss-wfk-2-5-0-maven-repository (file:/home/applications/jboss-wfk/jboss-wfk-2.5.0-maven-repository/) @ org.jboss.bom:jboss-javaee-6.0-with-tools:1.0.4.Final-redhat-4, /home/mmurray/.m2/repository/org/jboss/bom/jboss-javaee-6.0-with-tools/1.0.4.Final-redhat-4/jboss-javaee-6.0-with-tools-1.0.4.Final-redhat-4.pom, line 7, column 13
      [ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom:jboss-javaee-6.0-with-hibernate:pom:1.0.4.Final-redhat-4 in jboss-wfk-2-5-0-maven-repository (file:/home/applications/jboss-wfk/jboss-wfk-2.5.0-maven-repository/) @ line 83, column 25
      [ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 100, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. @ line 108, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_1.1_spec:jar is missing. @ line 116, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 124, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 132, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator:jar is missing. @ line 141, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.faces:jboss-jsf-api_2.1_spec:jar is missing. @ line 155, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-jpamodelgen:jar is missing. @ line 165, column 21
      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator-annotation-processor:jar is missing. @ line 173, column 21
      [ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 180, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line 189, column 21
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @ line 195, column 21
      	at org.jboss.forge.addon.maven.projects.MavenBuildManager.getProjectBuildingResult(MavenBuildManager.java:99)
      	at org.jboss.forge.addon.maven.projects.MavenFacetImpl.getProjectBuildingResult(MavenFacetImpl.java:143)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:65)
      	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:81)
      	at org.jboss.forge.addon.maven.projects.MavenFacetImpl_$$_javassist_ffe99930-1b28-45db-85dc-fc7e03d14343.getProjectBuildingResult(MavenFacetImpl_$$_javassist_ffe99930-1b28-45db-85dc-fc7e03d14343.java)
      	at org.jboss.forge.addon.maven.projects.facets.MavenDependencyFacet.getEffectiveDependencies(MavenDependencyFacet.java:174)
      	at org.jboss.forge.addon.maven.projects.facets.MavenDependencyFacet.getEffectiveDependency(MavenDependencyFacet.java:156)
      	at org.jboss.forge.addon.maven.projects.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:150)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:65)
      	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:81)
      	at org.jboss.forge.addon.maven.projects.facets.MavenDependencyFacet_$$_javassist_a3cab0e2-fcad-460c-9669-88a997fb437b.hasEffectiveDependency(MavenDependencyFacet_$$_javassist_a3cab0e2-fcad-460c-9669-88a997fb437b.java)
      ...
      ...
      ...
      

      Eventually, forge2 CLI outputs list of commands but with no error messages.

      The long (minutes) pause isn't helpful to users. How can this be improved?

              rhn-support-ggastald George Gastaldi
              mmurray1@redhat.com Michelle Murray (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: