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

AS7 examples from JBoss Central such as helloworld do not have a targeted runtime after import

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 3.3.0.Beta1
    • 3.3.0.M5
    • project-examples
    • None

      As described by Martin:

      When I try to create one of the examples with AS 7.1 installed, it doesn't complain about anything and simply creates the project. But when you go to "Project -> Properties -> Targeted runtimes" no runtime is checked. The 7.1 runtime should be automatically checked, right?

      I did some digging and found that none of the fixes in project examples add the facet runtime as a primary runtime object to the project. In my environment, after importing the hello-world example via JBoss Central, the only "fix" that is != null is WTPRuntimeFix. This fix, however, seems heavily targeted to ESB fixes, and not to generic projects such as hello-world.

      What I'm noting is that on line 94, the project has no primary runtime set yet. Therefore, it slips into the correcting of the esb section, where it does nothing.

      I'm attaching a patch which attempts to fix this logic. It isolates the code to check for whether esb is required. Then it ensures that the proper facet-runtime is added regardless of whether one exists on the project already.

      The patch is not 100%, though, because I commented out two lines, calling fixNonFacetedEsbProject. I commented these lines out because by this point in the code, we have already guaranteed the project IS faceted. I am confident this code is correct, but I admit I do not know all the usecases and so cannot guarantee it. A test on your part would prove very helpful

            snjeza_jira Snjezana Peco (Inactive)
            rob.stryker Rob Stryker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: