You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Antonio PAROLINI <An...@hcuge.ch> on 2005/10/14 18:13:06 UTC

[m2] artifact:dependencies and EAR generation probleme

Hello,

I am trying to put jars referenced by a pom into an EAR using a ant
task:
-------------------
 <target name="make-ear-maven" if="maven.aware" >
    <artifact:dependencies  filesetId="dependency.fileset">
       <artifact:pom id="maven.project" file="${file.maven.pom}" />
    </artifact:dependencies>
   
    <ear manifest="${file.manifest}" appxml="${file.applicationxml}"
compress="false" destfile="${ear}">
            <fileset refid="dependency.fileset"/>
    </ear>
  </target>
---------------------------

The probleme is that this generates an EAR file with the jar fullpath.

My ear will look like:
 groupID/artifact/version/myjar1.jar
 groupID/artifact/version/myjar2.jar
 groupID/artifact/version/myjar2r.jar

instead of:
myjar1.jar
myjar2.jar
myjar3.jar

Any idea of to correct this ?

Thanks in advance.

-antonio



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


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


Re: [m2] artifact:dependencies and EAR generation probleme

Posted by Brett Porter <br...@gmail.com>.
Use ant's flatten mapper:

<mapper type="flatten"/>

On 10/15/05, Antonio PAROLINI <An...@hcuge.ch> wrote:
> Hello,
>
> I am trying to put jars referenced by a pom into an EAR using a ant
> task:
> -------------------
>  <target name="make-ear-maven" if="maven.aware" >
>     <artifact:dependencies  filesetId="dependency.fileset">
>        <artifact:pom id="maven.project" file="${file.maven.pom}" />
>     </artifact:dependencies>
>
>     <ear manifest="${file.manifest}" appxml="${file.applicationxml}"
> compress="false" destfile="${ear}">
>             <fileset refid="dependency.fileset"/>
>     </ear>
>   </target>
> ---------------------------
>
> The probleme is that this generates an EAR file with the jar fullpath.
>
> My ear will look like:
>  groupID/artifact/version/myjar1.jar
>  groupID/artifact/version/myjar2.jar
>  groupID/artifact/version/myjar2r.jar
>
> instead of:
> myjar1.jar
> myjar2.jar
> myjar3.jar
>
> Any idea of to correct this ?
>
> Thanks in advance.
>
> -antonio
>
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> **********************************************************************
>
>
> ---------------------------------------------------------------------
> 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