[jbosstools-issues] [JBoss JIRA] (JBIDE-10475) AS7 examples from JBoss Central such as helloworld do not have a targeted runtime after import

Rob Stryker (Created) (JIRA) jira-events at lists.jboss.org
Wed Dec 14 04:13:09 EST 2011


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

                 Key: JBIDE-10475
                 URL: https://issues.jboss.org/browse/JBIDE-10475
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: project-examples
    Affects Versions: 3.3.0.M5
            Reporter: Rob Stryker
            Assignee: Snjezana Peco
             Fix For: 3.3.0.Beta1


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


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list