You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jesse Glick (JIRA)" <ji...@codehaus.org> on 2010/08/17 02:31:32 UTC

[jira] Created: (MARCHETYPES-35) Cleaner handling of javaee-endorsed-api dependency

Cleaner handling of javaee-endorsed-api dependency
--------------------------------------------------

                 Key: MARCHETYPES-35
                 URL: http://jira.codehaus.org/browse/MARCHETYPES-35
             Project: Maven Archetype Bundles
          Issue Type: Improvement
          Components: Maven Webapp Archetype
    Affects Versions: 1.1
         Environment: Tested on Ubuntu w/ JDK 6 & Maven 2.2.1; XP, JDK 6, 3.0-beta-2.
            Reporter: Jesse Glick
         Attachments: mojo-archetypes-javaee6-endorsed-api.diff

The current archetypes for Java EE 6 WAR or EJB projects use the technique of prepending to the bootclasspath in order to use newer EE APIs in place of older SE APIs. There are two problems with this hack:

1. It relies on {{sun.boot.class.path}} and so must be activated only in a profile for Sun JDKs.

2. The artifacts listed as dependencies (currently just one) must be written twice (in order to force a download), risking inconsistency.

I have a patch that uses {{-endorseddirs}} in conjunction with {{maven-dependency-plugin}}, which seems to be the preferred idiom judging by internet search hits I have found for people struggling with endorsed libraries in Maven, although MNG-4752 would be the preferred long-term solution. Please consider applying for the 1.2 versions of the archetypes.

https://netbeans.org/bugzilla/show_bug.cgi?id=185139#c16 explains why adjusting the Surefire execution environment accordingly is not possible.

-- 
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: (MARCHETYPES-35) Cleaner handling of javaee-endorsed-api dependency

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MARCHETYPES-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233249#action_233249 ] 

Jesse Glick commented on MARCHETYPES-35:
----------------------------------------

http://netbeans.org/bugzilla/show_bug.cgi?id=189899#c3 shows that #2 (download of remote artifact when not present locally) does not work with the existing archetype when using Maven 3, so fixing this and publishing a new release should be considered a high priority.

> Cleaner handling of javaee-endorsed-api dependency
> --------------------------------------------------
>
>                 Key: MARCHETYPES-35
>                 URL: http://jira.codehaus.org/browse/MARCHETYPES-35
>             Project: Maven Archetype Bundles
>          Issue Type: Improvement
>          Components: Maven Webapp Archetype
>    Affects Versions: 1.1
>         Environment: Tested on Ubuntu w/ JDK 6 & Maven 2.2.1; XP, JDK 6, 3.0-beta-2.
>            Reporter: Jesse Glick
>         Attachments: mojo-archetypes-javaee6-endorsed-api.diff
>
>
> The current archetypes for Java EE 6 WAR or EJB projects use the technique of prepending to the bootclasspath in order to use newer EE APIs in place of older SE APIs. There are two problems with this hack:
> 1. It relies on {{sun.boot.class.path}} and so must be activated only in a profile for Sun JDKs.
> 2. The artifacts listed as dependencies (currently just one) must be written twice (in order to force a download), risking inconsistency.
> I have a patch that uses {{-endorseddirs}} in conjunction with {{maven-dependency-plugin}}, which seems to be the preferred idiom judging by internet search hits I have found for people struggling with endorsed libraries in Maven, although MNG-4752 would be the preferred long-term solution. Please consider applying for the 1.2 versions of the archetypes.
> https://netbeans.org/bugzilla/show_bug.cgi?id=185139#c16 explains why adjusting the Surefire execution environment accordingly is not possible.

-- 
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: (MARCHETYPES-35) Cleaner handling of javaee-endorsed-api dependency

Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MARCHETYPES-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Milos Kleint closed MARCHETYPES-35.
-----------------------------------

    Resolution: Fixed

patch applied. 

Please note that unlike the previous solution (as far as I remember) the endorsed classpath wil only be correct for built project. When netbeans creates new projects from archetypes, it only downloads dependencies which will not have any effect on the endorsed classpath

> Cleaner handling of javaee-endorsed-api dependency
> --------------------------------------------------
>
>                 Key: MARCHETYPES-35
>                 URL: http://jira.codehaus.org/browse/MARCHETYPES-35
>             Project: Maven Archetype Bundles
>          Issue Type: Improvement
>          Components: Maven Webapp Archetype
>    Affects Versions: 1.1
>         Environment: Tested on Ubuntu w/ JDK 6 & Maven 2.2.1; XP, JDK 6, 3.0-beta-2.
>            Reporter: Jesse Glick
>            Assignee: Milos Kleint
>         Attachments: mojo-archetypes-javaee6-endorsed-api.diff
>
>
> The current archetypes for Java EE 6 WAR or EJB projects use the technique of prepending to the bootclasspath in order to use newer EE APIs in place of older SE APIs. There are two problems with this hack:
> 1. It relies on {{sun.boot.class.path}} and so must be activated only in a profile for Sun JDKs.
> 2. The artifacts listed as dependencies (currently just one) must be written twice (in order to force a download), risking inconsistency.
> I have a patch that uses {{-endorseddirs}} in conjunction with {{maven-dependency-plugin}}, which seems to be the preferred idiom judging by internet search hits I have found for people struggling with endorsed libraries in Maven, although MNG-4752 would be the preferred long-term solution. Please consider applying for the 1.2 versions of the archetypes.
> https://netbeans.org/bugzilla/show_bug.cgi?id=185139#c16 explains why adjusting the Surefire execution environment accordingly is not possible.

-- 
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: (MARCHETYPES-35) Cleaner handling of javaee-endorsed-api dependency

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MARCHETYPES-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235543#action_235543 ] 

Jesse Glick commented on MARCHETYPES-35:
----------------------------------------

> When netbeans creates new projects from archetypes, it only downloads dependencies which will not have any effect on the endorsed classpath

Right, but after the project is built the endorsed CP will be updated immediately (in NB 6.10).

> Cleaner handling of javaee-endorsed-api dependency
> --------------------------------------------------
>
>                 Key: MARCHETYPES-35
>                 URL: http://jira.codehaus.org/browse/MARCHETYPES-35
>             Project: Maven Archetype Bundles
>          Issue Type: Improvement
>          Components: Maven Webapp Archetype
>    Affects Versions: 1.1
>         Environment: Tested on Ubuntu w/ JDK 6 & Maven 2.2.1; XP, JDK 6, 3.0-beta-2.
>            Reporter: Jesse Glick
>            Assignee: Milos Kleint
>         Attachments: mojo-archetypes-javaee6-endorsed-api.diff
>
>
> The current archetypes for Java EE 6 WAR or EJB projects use the technique of prepending to the bootclasspath in order to use newer EE APIs in place of older SE APIs. There are two problems with this hack:
> 1. It relies on {{sun.boot.class.path}} and so must be activated only in a profile for Sun JDKs.
> 2. The artifacts listed as dependencies (currently just one) must be written twice (in order to force a download), risking inconsistency.
> I have a patch that uses {{-endorseddirs}} in conjunction with {{maven-dependency-plugin}}, which seems to be the preferred idiom judging by internet search hits I have found for people struggling with endorsed libraries in Maven, although MNG-4752 would be the preferred long-term solution. Please consider applying for the 1.2 versions of the archetypes.
> https://netbeans.org/bugzilla/show_bug.cgi?id=185139#c16 explains why adjusting the Surefire execution environment accordingly is not possible.

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