You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by William Vuong <WV...@NBME.org> on 2008/09/25 02:24:02 UTC

maven ant tasks and the provided scope

I have something like this in my ant file and the maven ant tasks 2.0.9 and
ant 1.7 that loads a pom.xml file and creates a bunch of filesets:

 

      <target name="wtf">

            <!-- declare pom.xml -->

            <artifact:pom id="maven.project" file="pom.xml" />

 

            <!-- provided.fileset -->

            <artifact:dependencies pomRefId="maven.project"
pathId="provided.classpath" filesetId="provided.fileset"
verbose="${maven.verbosity}" useScope="provided" />

            

            <!-- make a copy of it -->

            <mkdir dir="provided-scope"/>

            <copy todir="provided-scope" flatten="true">

                  <fileset refid="provided.fileset"/>

            </copy>

      </target>

 

And my pom file does have several dependencies with the provided scope:

 

            <dependency>

                  <groupId>com.oracle</groupId>

                  <artifactId>ojdbc14</artifactId>

                  <version>9.0.2.0.0</version>

                  <scope>provided</scope>

            </dependency>

 

So when I execute "ant wtf", none of the dependencies in the provided scope
gets copied into that directory.  The provided scope is supported by the
maven ant tasks, right?  Or am I doing something wrong?

 

Thanks.


Re: maven ant tasks and the provided scope

Posted by will vuong <wv...@gmail.com>.
i've managed to work around by hardcoding in the three or four provided scope
deps.

should i create a jira issue for this?


will vuong wrote:
> 
> yes, i've tried changing it to use the runtime scope and it looks like
> everything in the runtime scope is copied to the directory.
> 
> 
> 
> Brett Porter wrote:
>> 
>> I don't believe so, since it assumes it to be provided.
>> 
>> If you use "compile" instead of "provided", does it work? It is not
>> expected to be transitive, however.
>> 
>> - Brett
>> 
>> 2008/9/25 William Vuong <WV...@nbme.org>:
>>> I have something like this in my ant file and the maven ant tasks 2.0.9
>>> and
>>> ant 1.7 that loads a pom.xml file and creates a bunch of filesets:
>>>
>>>
>>>
>>>      <target name="wtf">
>>>
>>>            <!-- declare pom.xml -->
>>>
>>>            <artifact:pom id="maven.project" file="pom.xml" />
>>>
>>>
>>>
>>>            <!-- provided.fileset -->
>>>
>>>            <artifact:dependencies pomRefId="maven.project"
>>> pathId="provided.classpath" filesetId="provided.fileset"
>>> verbose="${maven.verbosity}" useScope="provided" />
>>>
>>>
>>>
>>>            <!-- make a copy of it -->
>>>
>>>            <mkdir dir="provided-scope"/>
>>>
>>>            <copy todir="provided-scope" flatten="true">
>>>
>>>                  <fileset refid="provided.fileset"/>
>>>
>>>            </copy>
>>>
>>>      </target>
>>>
>>>
>>>
>>> And my pom file does have several dependencies with the provided scope:
>>>
>>>
>>>
>>>            <dependency>
>>>
>>>                  <groupId>com.oracle</groupId>
>>>
>>>                  <artifactId>ojdbc14</artifactId>
>>>
>>>                  <version>9.0.2.0.0</version>
>>>
>>>                  <scope>provided</scope>
>>>
>>>            </dependency>
>>>
>>>
>>>
>>> So when I execute "ant wtf", none of the dependencies in the provided
>>> scope
>>> gets copied into that directory.  The provided scope is supported by the
>>> maven ant tasks, right?  Or am I doing something wrong?
>>>
>>>
>>>
>>> Thanks.
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Brett Porter
>> Blog: http://blogs.exist.com/bporter/
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/maven-ant-tasks-and-the-provided-scope-tp19662878p19804834.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: maven ant tasks and the provided scope

Posted by will vuong <wv...@gmail.com>.
yes, i've tried changing it to use the runtime scope and it looks like
everything in the runtime scope is copied to the directory.



Brett Porter wrote:
> 
> I don't believe so, since it assumes it to be provided.
> 
> If you use "compile" instead of "provided", does it work? It is not
> expected to be transitive, however.
> 
> - Brett
> 
> 2008/9/25 William Vuong <WV...@nbme.org>:
>> I have something like this in my ant file and the maven ant tasks 2.0.9
>> and
>> ant 1.7 that loads a pom.xml file and creates a bunch of filesets:
>>
>>
>>
>>      <target name="wtf">
>>
>>            <!-- declare pom.xml -->
>>
>>            <artifact:pom id="maven.project" file="pom.xml" />
>>
>>
>>
>>            <!-- provided.fileset -->
>>
>>            <artifact:dependencies pomRefId="maven.project"
>> pathId="provided.classpath" filesetId="provided.fileset"
>> verbose="${maven.verbosity}" useScope="provided" />
>>
>>
>>
>>            <!-- make a copy of it -->
>>
>>            <mkdir dir="provided-scope"/>
>>
>>            <copy todir="provided-scope" flatten="true">
>>
>>                  <fileset refid="provided.fileset"/>
>>
>>            </copy>
>>
>>      </target>
>>
>>
>>
>> And my pom file does have several dependencies with the provided scope:
>>
>>
>>
>>            <dependency>
>>
>>                  <groupId>com.oracle</groupId>
>>
>>                  <artifactId>ojdbc14</artifactId>
>>
>>                  <version>9.0.2.0.0</version>
>>
>>                  <scope>provided</scope>
>>
>>            </dependency>
>>
>>
>>
>> So when I execute "ant wtf", none of the dependencies in the provided
>> scope
>> gets copied into that directory.  The provided scope is supported by the
>> maven ant tasks, right?  Or am I doing something wrong?
>>
>>
>>
>> Thanks.
>>
>>
> 
> 
> 
> -- 
> Brett Porter
> Blog: http://blogs.exist.com/bporter/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/maven-ant-tasks-and-the-provided-scope-tp19662878p19694597.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: maven ant tasks and the provided scope

Posted by Brett Porter <br...@gmail.com>.
I don't believe so, since it assumes it to be provided.

If you use "compile" instead of "provided", does it work? It is not
expected to be transitive, however.

- Brett

2008/9/25 William Vuong <WV...@nbme.org>:
> I have something like this in my ant file and the maven ant tasks 2.0.9 and
> ant 1.7 that loads a pom.xml file and creates a bunch of filesets:
>
>
>
>      <target name="wtf">
>
>            <!-- declare pom.xml -->
>
>            <artifact:pom id="maven.project" file="pom.xml" />
>
>
>
>            <!-- provided.fileset -->
>
>            <artifact:dependencies pomRefId="maven.project"
> pathId="provided.classpath" filesetId="provided.fileset"
> verbose="${maven.verbosity}" useScope="provided" />
>
>
>
>            <!-- make a copy of it -->
>
>            <mkdir dir="provided-scope"/>
>
>            <copy todir="provided-scope" flatten="true">
>
>                  <fileset refid="provided.fileset"/>
>
>            </copy>
>
>      </target>
>
>
>
> And my pom file does have several dependencies with the provided scope:
>
>
>
>            <dependency>
>
>                  <groupId>com.oracle</groupId>
>
>                  <artifactId>ojdbc14</artifactId>
>
>                  <version>9.0.2.0.0</version>
>
>                  <scope>provided</scope>
>
>            </dependency>
>
>
>
> So when I execute "ant wtf", none of the dependencies in the provided scope
> gets copied into that directory.  The provided scope is supported by the
> maven ant tasks, right?  Or am I doing something wrong?
>
>
>
> Thanks.
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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