Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.3.2
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Plugin configuration should include a property to set library-directory configuration in generated application.xml. It may not be necessary to include this property. Maybe something like "if defaultLibBundleDir is different from lib, include configuration".

      1. MEAR-78.patch
        3 kB
        Markus Knittig
      2. MEAR-78-new.patch
        3 kB
        Markus Knittig

        Activity

        Hide
        Stéphane Nicoll added a comment -

        ? uh?

        What are you talkin about?

        Show
        Stéphane Nicoll added a comment - ? uh? What are you talkin about?
        Hide
        Danilo Eiji Seki added a comment -

        In the current plugin version, the following pom.xml configuration

        <?xml version="1.0" encoding="UTF-8"?>
        <project xmlns="http://maven.apache.org/POM/4.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        
            <modelVersion>4.0.0</modelVersion>
            <groupId>com.mygroup</groupId>
            <artifactId>application</artifactId>
            <packaging>ear</packaging>
            <version>1.0-SNAPSHOT</version>
        
            <dependencies>
                <dependency>
                    <groupId>com.mygroup</groupId>
                    <artifactId>ejbmodule</artifactId>
                    <type>ejb</type>
                    <version>1.0-SNAPSHOT</version>
                </dependency>
            </dependencies>
        
            <build>
                <plugin>
                    <artifactId>maven-ear-plugin</artifactId>
                    <configuration>
                        <defaultLibBundleDir>/MYLIBDIR</defaultLibBundleDir>
                        <modules>
                            <version>5</version>
                        </modules>
                    </configuration>
                </plugin>
            </build>
        
        </project>
        

        Generates the following application.xml:

        <?xml version="1.0" encoding="UTF-8"?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
                version="5">
        
                <module>
                        <ejb>ejbmodule-1.0-SNAPSHOT.jar</ejb>
                </module>
        
        </application>
        

        But notice that the above generated XML does not include a library-directory configuration, included in JEE 5. This new configuration ends the "different library directory problem across servers" problem.

        What I need is that in the case of EAR version 5 and defaultLibBundleDir set for the EAR plugin, such value to be included in the application.xml, generating something like this:

        <?xml version="1.0" encoding="UTF-8"?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
            version="5">
        
            <module>
                <ejb>ejbmodule-1.0-SNAPSHOT.jar</ejb>
            </module>
        
            <library-directory>/MYLIBDIR</library-directory>
        
        </application>
        
        Show
        Danilo Eiji Seki added a comment - In the current plugin version, the following pom.xml configuration <?xml version= "1.0" encoding= "UTF-8" ?> <project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" > <modelVersion> 4.0.0 </modelVersion> <groupId> com.mygroup </groupId> <artifactId> application </artifactId> <packaging> ear </packaging> <version> 1.0-SNAPSHOT </version> <dependencies> <dependency> <groupId> com.mygroup </groupId> <artifactId> ejbmodule </artifactId> <type> ejb </type> <version> 1.0-SNAPSHOT </version> </dependency> </dependencies> <build> <plugin> <artifactId> maven-ear-plugin </artifactId> <configuration> <defaultLibBundleDir> /MYLIBDIR </defaultLibBundleDir> <modules> <version> 5 </version> </modules> </configuration> </plugin> </build> </project> Generates the following application.xml : <?xml version= "1.0" encoding= "UTF-8" ?> <application xmlns= "http://java.sun.com/xml/ns/javaee" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version= "5" > <module> <ejb> ejbmodule-1.0-SNAPSHOT.jar </ejb> </module> </application> But notice that the above generated XML does not include a library-directory configuration, included in JEE 5. This new configuration ends the "different library directory problem across servers" problem. What I need is that in the case of EAR version 5 and defaultLibBundleDir set for the EAR plugin, such value to be included in the application.xml , generating something like this: <?xml version= "1.0" encoding= "UTF-8" ?> <application xmlns= "http://java.sun.com/xml/ns/javaee" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version= "5" > <module> <ejb> ejbmodule-1.0-SNAPSHOT.jar </ejb> </module> <library-directory> /MYLIBDIR </library-directory> </application>
        Hide
        Stéphane Nicoll added a comment -

        Oh right. My bad ...

        Show
        Stéphane Nicoll added a comment - Oh right. My bad ...
        Hide
        David Wallace Croft added a comment - - edited

        This one snagged me too. It took me awhile to figure out what was going on. I would like to see it fixed.

        Except that I would like to see <library-directory> added to application.xml whenever <defaultLibBundleDir> is specified in the configuration, whether it is the default of lib or other.

        Show
        David Wallace Croft added a comment - - edited This one snagged me too. It took me awhile to figure out what was going on. I would like to see it fixed. Except that I would like to see <library-directory> added to application.xml whenever <defaultLibBundleDir> is specified in the configuration, whether it is the default of lib or other.
        Hide
        Markus Knittig added a comment -

        +1 to David's suggestion

        Show
        Markus Knittig added a comment - +1 to David's suggestion
        Hide
        Stéphane Nicoll added a comment -

        Done. Thanks for the patch Markus.

        Show
        Stéphane Nicoll added a comment - Done. Thanks for the patch Markus.
        Hide
        Maarten Van Puymbroeck added a comment - - edited

        I might be mistaken, but it seems this improvement is no longer present in version 2.4.1.
        I can't seem to find a contra-issue for this, is it possibly regression ?

        – Edited: Never mind, it seemed to be some local weirdness; should have spent 3 hours searching instead of 2 before posting.

        Show
        Maarten Van Puymbroeck added a comment - - edited I might be mistaken, but it seems this improvement is no longer present in version 2.4.1. I can't seem to find a contra-issue for this, is it possibly regression ? – Edited: Never mind, it seemed to be some local weirdness; should have spent 3 hours searching instead of 2 before posting.
        Hide
        Yifei Zhang added a comment - - edited

        I don't get it. What if I want the defaultLibBundleDir is APP-INF/lib??? You will using APP-INF/lib as library-directory??? Is that correct??? What are you thinking about???

        Show
        Yifei Zhang added a comment - - edited I don't get it. What if I want the defaultLibBundleDir is APP-INF/lib??? You will using APP-INF/lib as library-directory??? Is that correct??? What are you thinking about???

          People

          • Assignee:
            Stéphane Nicoll
            Reporter:
            Danilo Eiji Seki
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: