You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arik Kfir (JIRA)" <ji...@codehaus.org> on 2006/12/22 11:40:41 UTC

[jira] Created: (MIDEA-82) [Patch] EJB module packaging is not generated correctly, and also does not support EJB 3.0

[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
            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

        

[jira] Commented: (MIDEA-82) [Patch] EJB module packaging is not generated correctly, and also does not support EJB 3.0

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MIDEA-82?page=comments#action_84276 ] 
            
Stephane Nicoll commented on MIDEA-82:
--------------------------------------

All right but this $MAVEN_REPO$ is introduced by this patch right?

Since the localRepository can be injected by the plexus container, I don't understand why we should configure this. Could you please explain 5 a bit more?

> [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

        

[jira] Commented: (MIDEA-82) [Patch] EJB module packaging is not generated correctly, and also does not support EJB 3.0

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MIDEA-82?page=comments#action_84260 ] 
            
Stephane Nicoll commented on MIDEA-82:
--------------------------------------

Not sure I follow the $MAVEN_REPO$ thingy. Is this something that needs to be configured in IDEA?

Regarding point 3 it is regarding JEE, what about J2EE 1.3 / 1.4?

> [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

        

[jira] Commented: (MIDEA-82) [Patch] EJB module packaging is not generated correctly, and also does not support EJB 3.0

Posted by "Arik Kfir (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MIDEA-82?page=comments#action_84267 ] 
            
Arik Kfir commented on MIDEA-82:
--------------------------------

Hi,

The $MAVEN_REPO$ is a macro (idea feature, much like path variables in eclipse) which points to the local maven repository. The user has to configure such a variable to point to ~/.m2/repository. If the user wants to use a different repo, he/she simply change the variable. This is not mandatory, but makes things more modular...

Regarding 3 - the same thing is valid for J2EE 1.3/4, only in JEE5 all JARs in "/lib" are automatically "classpath'ed" for all wars/ejbs/etc. In 1.3/4, the war/ejbs need to reference these JARs in their MANIFEST.MF (using "Class-Path" directive). The fix is valid regardless of J2EE version, as no "WEB-INF/classes" dir can exist in EAR files anyway (even in 1.3/4) - I think it's simply a forgotten copy/paste bug.

> [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

        

[jira] Closed: (MIDEA-82) [Patch] EJB module packaging is not generated correctly, and also does not support EJB 3.0

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MIDEA-82?page=all ]

Stephane Nicoll closed MIDEA-82.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

Applied, thanks.

> [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
>             Fix For: 2.1
>
>         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

        

[jira] Commented: (MIDEA-82) [Patch] EJB module packaging is not generated correctly, and also does not support EJB 3.0

Posted by "Arik Kfir (JIRA)" <ji...@codehaus.org>.
    [ 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