[ http://jira.codehaus.org/browse/MIDEA-82?page=comments#action_84277 ] Arik Kfir commented on MIDEA-82: --------------------------------
Sure: $MAVEN_REPO$ - I guess you're right ;-) About 5: if we drop the MAVEN_REPO thing, then 5 is no longer required (replace all calls to the existing "getLibraryUrl" method instead. In fact, looking now at the patch, it could be avoided all together anyway. It was intended for cases when the caller has no Artifact instace, but I see now that in all references, there is always an Artifact reference, so this method is not needed. > [Patch] EJB module packaging is not generated correctly, and also does not > support EJB 3.0 > ------------------------------------------------------------------------------------------ > > Key: MIDEA-82 > URL: http://jira.codehaus.org/browse/MIDEA-82 > Project: Maven 2.x Idea Plugin > Issue Type: Bug > Affects Versions: 2.0, 2.1 > Environment: All > Reporter: Arik Kfir > Assigned To: Stephane Nicoll > Priority: Critical > Attachments: MEJB-ejb3_and_ejb_deployment.patch > > > When the plugin generates an IML for a module of EJB packaging, IDEA's Ejb > Module Settings section is not generated correctly. The dependencies > themselves are generated fine, but the settings for how they are deployed is > wrong. > Each EJB module in IDEA has an EJB Module Settings tab where each of the EJB > module's dependencies is configured for deployment (link via manifest, target > directory in the EAR, etc). Currently, the plugin specifies "WEB-INF/classes" > as the target directory for each dependency, which is obviously wrong. > Attached is a patch which does: > 1. Adds the "ideaVersion" parameter to the IdeaModuleMojo. This is needed so > that the "name" attribute of a module is not added to it in IDEA 6.x (other > version will receive it as before) > 2. Extracts the "ejbVersion" parameter from the "maven-ejb-plugin" > configuration in the pom (if present). If not available, defaults to "2.x" as > before. If present and equals "3.0", will mark the ejb-jar.xml as such and > make it optional (as the ejb spec specified). > 3. Fixes EJB deployment directory for ejb modules' dependencies from > "/WEB-INF/classes" to "/lib/<artifact-id>.jar". This is consistent with the > JEE spec. > 4. Adds the missing <url> element for each dependency of EJB modules, > pointing to the local repo. > 5. Adds a new method "getJarUrl" which accepts a File instance and returns an > IDEA-style URL ("jar://<myjar>!/") and modified the "getLibraryUrl" method to > use the new method. This was required for cases when you don't have an > Artifact instance in hand. > 6. In IdeaMojo, pass "ideaVersion" to the IdeaModuleMojo instance (see 1) > 7. Updates IdeaModuleTest.java to accomodate new changes -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
