You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/08/27 00:37:03 UTC

[jira] Updated: (MNG-795) ant artifact:dependencies task adds entire local repo to classpath if no dependencies are specified

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

Brett Porter updated MNG-795:
-----------------------------

    Fix Version: 2.0-beta-1
     Complexity: Novice  (was: Intermediate)

> 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
>      Fix For: 2.0-beta-1

>
>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org