[ http://jira.codehaus.org/browse/MNG-795?page=all ]
     
Brett Porter closed MNG-795:
----------------------------

    Resolution: Fixed

> ant artifact:dependencies task adds entire local repo to classpath if no 
> dependencies are specified
> ---------------------------------------------------------------------------------------------------
>
>          Key: MNG-795
>          URL: http://jira.codehaus.org/browse/MNG-795
>      Project: Maven 2
>         Type: Bug
>   Components: maven-artifact-ant
>     Versions: 2.0-alpha-3
>  Environment: Mac OS X 10.4.2, Java 1.4.2
>     Reporter: Rick Mann
>     Assignee: Brett Porter
>      Fix For: 2.0-beta-1

>
> Original Estimate: 15 minutes
>        Time Spent: 15 minutes
>         Remaining: 0 minutes
>
> The ant artifact:dependencies task adds entire local repo to classpath if no 
> dependencies are specified. For example, my build.xml contains this:
>       <typedef resource="org/apache/maven/artifact/ant/antlib.xml" 
> uri="urn:maven-artifact-ant">
>               <classpath>
>                       <pathelement 
> location="lib/maven-artifact-ant-2.0-alpha-3-dep.jar" />
>               </classpath>
>       </typedef>
>   
>       <artifact:dependencies filesetId="runtime.fileset">
>       </artifact:dependencies>
>       
>       <path id="compile.classpath">
>               <fileset refid="runtime.fileset"/>
>       </path>
>       
>       <target name="compile" description="==> Compile all the .java files">
>               <mkdir  dir="${obj}"/>
>               
>               <javac  srcdir="${src}"
>                               destdir="${obj}"
>                               source="1.4"
>                               deprecation="on"
>                               debug="on">
>                       <classpath refid="compile.classpath"/>
>               </javac>
>       </target>
> This causes all .jars in the ~/.m2/ repo to be added to the class path. Kenny 
> Westerhof wrote this in the users-list thread "Ant Maven2 Tasks include all 
> .jars in local repo?":
> ----------------
> It could be described as a bug: what the task does is
> create an ant FileSet object. Since you defined no dependencies,
> it's the same as <fileset id="runtime.fileset" dir="${localRepository}"/>
> (where ${localRepository} = ~/.m2/repository).
> I guess the default ant implementation for FileSet has an include
> filter of **/* and no exclude filter.
> As soon as you specify 1 dependency it will override the default include
> and put the referenced jar in there.
> ------------------

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to