You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ch...@aami.com.au on 2008/05/29 07:57:28 UTC

Multi Module Projects - manifest question

Hi,

        I have a multi module ear project.

        One of the modules is a standard jar (just a resource jar with no 
dependencies of it's own).

        One of the other modules is a war file.

        How do I get the manifest file of the war file to reference the 
(utility) jar in that is correctly packaged in the ear file?

        The ear is being correctly built and all of the required modules 
are being placed in it. However, the final issue that I face is to get the 
manifests of the war file to be correct.

        As this is a multi module project, the war project does not 
actually list the resource jar as a dependency. Should it? I would not 
have thought so, as the resource jar itself should not be installed into 
the repository.

        Help! I've spent about 4 weeks bashing maven into shape, and as 
far as I can tell, this appears to be pretty much the last hurdle. 
Otherwise I have to scap maven.

-Chris


**********************************************************************
CAUTION - This message is intended for the addressee named above. It may contain privileged or confidential information. 

If you are not the intended recipient of this message you must: 
- Not use, copy, distribute or disclose it to anyone other than the addressee;
- Notify the sender via return email; and
- Delete the message (and any related attachments) from your computer immediately.

Internet emails are not necessarily secure. Australian Associated Motors Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do not accept responsibility for changes made to this message after it was sent.

Unless otherwise stated, views expressed within this email are the author's own and do not represent those of AAMI.
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi Module Projects - manifest question

Posted by Ch...@aami.com.au.
Hi Martin.

        Yes I did. I had some issues with the EJB jar needing the type of 
it to be specifially set.

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>au.com.aami</groupId>
        <artifactId>aami-parent</artifactId>
        <version>1-SNAPSHOT</version>
    </parent>

    <groupId>au.com.aami.dialler</groupId>
    <artifactId>DiallerWeb</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>DiallerWeb Project</name>
    <description>DiallerWeb Project</description>
    <url>http://centre.ourspace.int.corp.sun/it/sd/webapplications/</url>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>au.com.aami</groupId>
            <artifactId>AAMITools</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>au.com.aami.dialler</groupId>
            <artifactId>DiallerResources</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>au.com.aami.dialler</groupId>
            <artifactId>DiallerEJB</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>

        <dependency>
            <groupId>com.ibm.websphere.appserver</groupId>
            <artifactId>runtime</artifactId>
            <version>6.1</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <properties>
        <junit.version>3.8.1</junit.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <!-- This is broken in maven-war-plugin 2.0, works in 
2.0.1 -->
                    <warSourceExcludes>WEB-INF/lib/*.jar</
warSourceExcludes>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <!--
                            <classpathPrefix>lib/</classpathPrefix>
                            -->
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <wtpversion>1.5</wtpversion>

                    <additionalBuildcommands>
                        <buildcommand>
org.eclipse.wst.validation.validationbuilder</buildcommand>
                        <buildcommand>
org.eclipse.wst.common.project.facet.core.builder</buildcommand>
                    </additionalBuildcommands>

                    <additionalProjectnatures>
                        <projectnature>
org.eclipse.wst.common.project.facet.core.nature</projectnature>
                        <projectnature>
org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
                    </additionalProjectnatures>

                    <classpathContainers>
                        <classpathContainer>
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere 
v6.1 JRE</classpathContainer>
                        <classpathContainer>
org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v61/was.base.v61
</classpathContainer>
                        <classpathContainer>
org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
                        <classpathContainer>
org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
                    </classpathContainers>

                    <additionalProjectFacets>
                        <com.ibm.websphere.extended.web>6.1</
com.ibm.websphere.extended.web>
                        <com.ibm.websphere.coexistence.web>6.1</
com.ibm.websphere.coexistence.web>
                    </additionalProjectFacets>

                </configuration>
            </plugin>
        </plugins>
    </build>

</project>


Now I need to get it work for fhe actual EJB jar itself.

-Chris

"Martin" <mg...@hotmail.com> wrote on 29/05/2008 22:28:24:

> Hi Chris-
> 
> Have you looked at configuring the <manifest-entries> in the maven war 
> plugin
> 
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html
> 
> Martin
> ----- Original Message ----- 
> From: <Ch...@aami.com.au>
> To: "Maven Users List" <us...@maven.apache.org>
> Sent: Thursday, May 29, 2008 1:57 AM
> Subject: Multi Module Projects - manifest question
> 
> 
> > Hi,
> >
> >        I have a multi module ear project.
> >
> >        One of the modules is a standard jar (just a resource jar with 
no
> > dependencies of it's own).
> >
> >        One of the other modules is a war file.
> >
> >        How do I get the manifest file of the war file to reference the
> > (utility) jar in that is correctly packaged in the ear file?
> >
> >        The ear is being correctly built and all of the required 
modules
> > are being placed in it. However, the final issue that I face is to get 
the
> > manifests of the war file to be correct.
> >
> >        As this is a multi module project, the war project does not
> > actually list the resource jar as a dependency. Should it? I would not
> > have thought so, as the resource jar itself should not be installed 
into
> > the repository.
> >
> >        Help! I've spent about 4 weeks bashing maven into shape, and as
> > far as I can tell, this appears to be pretty much the last hurdle.
> > Otherwise I have to scap maven.
> >
> > -Chris
> >
> >
> > **********************************************************************
> > CAUTION - This message is intended for the addressee named above. It 
may 
> > contain privileged or confidential information.
> >
> > If you are not the intended recipient of this message you must:
> > - Not use, copy, distribute or disclose it to anyone other than the 
> > addressee;
> > - Notify the sender via return email; and
> > - Delete the message (and any related attachments) from your computer 
> > immediately.
> >
> > Internet emails are not necessarily secure. Australian Associated 
Motors 
> > Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, 
do 
> > not accept responsibility for changes made to this message after it 
was 
> > sent.
> >
> > Unless otherwise stated, views expressed within this email are the 
> > author's own and do not represent those of AAMI.
> > **********************************************************************
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> The following message has been automatically added by the Internet mail 
> gateway to comply with the Group's Information Security requirements.
> 
> "This e-mail has arrived via the Internet, and therefore you should be 
> cautious about its origin and content. Replies which contain sensitive 
> information and / or legal/contractual obligations are particularly 
vulnerable.
> 
> In these cases you should not reply unless you are authorised to do so, 
> and adequate encryption is employed."
> 
> If you have any questions, please contact the IS Service Desk.


**********************************************************************
CAUTION - This message is intended for the addressee named above. It may contain privileged or confidential information. 

If you are not the intended recipient of this message you must: 
- Not use, copy, distribute or disclose it to anyone other than the addressee;
- Notify the sender via return email; and
- Delete the message (and any related attachments) from your computer immediately.

Internet emails are not necessarily secure. Australian Associated Motors Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do not accept responsibility for changes made to this message after it was sent.

Unless otherwise stated, views expressed within this email are the author's own and do not represent those of AAMI.
**********************************************************************

Re: Multi Module Projects - manifest question

Posted by Martin <mg...@hotmail.com>.
Hi Chris-

Have you looked at configuring the <manifest-entries> in the maven war 
plugin
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

Martin
----- Original Message ----- 
From: <Ch...@aami.com.au>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Thursday, May 29, 2008 1:57 AM
Subject: Multi Module Projects - manifest question


> Hi,
>
>        I have a multi module ear project.
>
>        One of the modules is a standard jar (just a resource jar with no
> dependencies of it's own).
>
>        One of the other modules is a war file.
>
>        How do I get the manifest file of the war file to reference the
> (utility) jar in that is correctly packaged in the ear file?
>
>        The ear is being correctly built and all of the required modules
> are being placed in it. However, the final issue that I face is to get the
> manifests of the war file to be correct.
>
>        As this is a multi module project, the war project does not
> actually list the resource jar as a dependency. Should it? I would not
> have thought so, as the resource jar itself should not be installed into
> the repository.
>
>        Help! I've spent about 4 weeks bashing maven into shape, and as
> far as I can tell, this appears to be pretty much the last hurdle.
> Otherwise I have to scap maven.
>
> -Chris
>
>
> **********************************************************************
> CAUTION - This message is intended for the addressee named above. It may 
> contain privileged or confidential information.
>
> If you are not the intended recipient of this message you must:
> - Not use, copy, distribute or disclose it to anyone other than the 
> addressee;
> - Notify the sender via return email; and
> - Delete the message (and any related attachments) from your computer 
> immediately.
>
> Internet emails are not necessarily secure. Australian Associated Motors 
> Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do 
> not accept responsibility for changes made to this message after it was 
> sent.
>
> Unless otherwise stated, views expressed within this email are the 
> author's own and do not represent those of AAMI.
> **********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org