You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marshall Schor <ms...@schor.com> on 2008/02/26 17:12:01 UTC

specifying version of Ant to use for maven-ant-run

We need to have the maven ant run plugin to run ant at version 1.7.0.

How should this be specified?

We tried putting in the POM:

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <dependencies>
            <!-- Ant -->
            <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant</artifactId>
                <version>1.7.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant-launcher</artifactId>
                <version>1.7.0</version>
            </dependency>
          </dependencies>
          ...

But we get maven downloading ant 1.6.5:  see the --debug trace snippet 
from a mvn run where ant was not in the local repository.  It seems to 
ask for ant 1.7.0.  We're using repo1.maven.org/maven2   as the 
repository - I looked there and the entry for 
http://repo1.maven.org/maven2/ant/ant/1.7.0/ is there but only has a POM 
- no "jar" files.  and there is no entry for the ant-launcher at 1.7.0 
there.

Is there another repository we should be using to get this?

I'm surprised that this is being "resolved" using version 1.6.5, which 
is below the 1.7.0 asked for - can someone explain that?

[DEBUG] 
org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1:runtime 
(selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.ant:ant-parent::1.7.0 for 
project: org.apache.ant:ant:jar:1.7.0 from the repository.
[DEBUG]   org.apache.ant:ant:jar:1.7.0:compile (selected for compile)
[DEBUG]     org.apache.ant:ant-launcher:jar:1.7.0:compile (selected for 
compile)
[DEBUG] Skipping disabled repository snapshots
[DEBUG] Trying repository central
Downloading: http://repo1.maven.org/maven2/ant/ant/1.6.5/ant-1.6.5.pom
764b downloaded
[DEBUG]   Artifact resolved
[DEBUG] Retrieving parent-POM: org.apache:apache::4 for project: 
ant:ant:jar:1.6.5 from the repository.
[DEBUG]   ant:ant:jar:1.6.5:runtime (selected for 
runtime)                        


Thanks.  -Marshall

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


Re: specifying version of Ant to use for maven-ant-run

Posted by Trevor Torrez <ja...@gmail.com>.
On Tue, Feb 26, 2008 at 5:07 PM, Marshall Schor <ms...@schor.com> wrote:
> Dennis Lundberg wrote:
>  > ...
>
> > There is an issue for this in JIRA already:
>  >
>  > http://jira.codehaus.org/browse/MANTRUN-68http://jira.codehaus.org/browse/MANTRUN-68
>  >
>  I see that issue is more than a year old, and is still "open".
>
>  Until this is fixed, is there a recommended "work-around"?
>
>
>
>  -Marshall
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
>
>

Would it be possible to add a relocation to the central repo like was
done for ehcache (ehcache:ehcache:1.2 -> net.sf.ehcache:ehcache:1.2)?
It seemed to work transparently in that case.

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


Re: specifying version of Ant to use for maven-ant-run

Posted by Marshall Schor <ms...@schor.com>.
Dennis Lundberg wrote:
> ...
> There is an issue for this in JIRA already:
>
> http://jira.codehaus.org/browse/MANTRUN-68http://jira.codehaus.org/browse/MANTRUN-68
>   
I see that issue is more than a year old, and is still "open".

Until this is fixed, is there a recommended "work-around"?

-Marshall

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


Re: specifying version of Ant to use for maven-ant-run

Posted by Dennis Lundberg <de...@apache.org>.
Wayne Fay wrote:
> The easiest solution would be to "build" your own internal pom for
> maven-antrunner-plugin and specify the ant 1.7 artifacts as
> dependencies, then declare that plugin version number in your pom
> where you need to run the ant 1.7 version. Your version would be
> something like 1.1-SCHOR.
> 
> Grab the source for m-a-p, edit the version to an internal version
> specific to your company, edit the dependencies to org.ant.* and
> version 1.7, and mvn install/deploy it (you can do this right now).
> 
> Or post a JIRA against this plugin asking for a 1.7-compatible release
> (but this will not happen overnight).

There is an issue for this in JIRA already:

http://jira.codehaus.org/browse/MANTRUN-68http://jira.codehaus.org/browse/MANTRUN-68

> 
> Wayne
> 
> On 2/26/08, Marshall Schor <ms...@schor.com> wrote:
>> Wayne Fay wrote:
>>> <version>1.7.0</> is merely a strong suggestion to Maven.
>>> <version>[1.7.0]</> will fail the build if it is unable to acquire
>>> this artifact
>>>
>> Further investigation shows these dependency statements added ant to the
>> "compile" <scope> - I think this has nothing to do with what ant-run
>> uses.  I tried adding <scope>runtime</scope> but that didn't work either.
>>
>>> As for the missing 1.7.0 jar files, please ask the Ant team to upload
>>> them, or move them to a shared sync directory etc (depends on how they
>>> have set this up).
>>>
>> Further investigation shows the jars for 1.7. 0 *are* in the
>> http://repo1.maven.org/maven2/ but not under "ant" but rather under
>> "org" (that is, org/apache/ant/... etc.)
>>
>> So the real underlying problem is the mechanism I tried for the ant
>> dependency is not working to specify the ant version to use for the
>> maven running.  I think that's coming from the maven-antrun-plugin.
>> This plugin has these pom entries:
>>
>> <dependency>
>> <groupId>ant</groupId>
>> <artifactId>ant-launcher</artifactId>
>> <version>1.6.5</version>
>> <scope>runtime</scope>
>> </dependency>
>> −
>>    <dependency>
>> <groupId>ant</groupId>
>> <artifactId>ant</artifactId>
>> <version>1.6.5</version>
>> </dependency>
>>
>> Is there a way to get maven-ant-plugin to use ant 1.7.0 level?
>>
>> -Marshall
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 


-- 
Dennis Lundberg

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


Re: specifying version of Ant to use for maven-ant-run

Posted by Marshall Schor <ms...@schor.com>.
Wayne Fay wrote:
> The easiest solution would be to "build" your own internal pom for
> maven-antrunner-plugin and specify the ant 1.7 artifacts as
> dependencies, then declare that plugin version number in your pom
> where you need to run the ant 1.7 version. Your version would be
> something like 1.1-SCHOR.
>
> Grab the source for m-a-p, edit the version to an internal version
> specific to your company, edit the dependencies to org.ant.* and
> version 1.7, and mvn install/deploy it (you can do this right now).
>
> Or post a JIRA against this plugin asking for a 1.7-compatible release
> (but this will not happen overnight).
>   
Thanks, Wayne. My "Company" is the Apache UIMA project in the incubator.
We currently don't have a maven repository we're using, other than the
main Apache ones. So I'm missing a solution that lets everyone working
on Apache UIMA have a stable reproducable build...

A bit more investigation showed that if I make the dependency have
<scope>runtime</scope>, then both the 1.6.5 and the 1.7.0 end up the
classpath used for running the plugin. The problem is the "order" of
these is arbitrary. So it's "unreliable".

I thought I might be able to use the <exclude> maven element to exclude
the 1.6.5 ant level - but I couldn't figure out how to get the exclude
to apply to the dependencies in the maven-ant-run POM..

It seems to me that others might want to be able to specify what level
of Ant to use with ant-run-plugin. So maybe the Jira I post should
suggest a fix that makes the version of Ant used something that can be
configured in the caller's POM.

-Marshall

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


Re: specifying version of Ant to use for maven-ant-run

Posted by Wayne Fay <wa...@gmail.com>.
The easiest solution would be to "build" your own internal pom for
maven-antrunner-plugin and specify the ant 1.7 artifacts as
dependencies, then declare that plugin version number in your pom
where you need to run the ant 1.7 version. Your version would be
something like 1.1-SCHOR.

Grab the source for m-a-p, edit the version to an internal version
specific to your company, edit the dependencies to org.ant.* and
version 1.7, and mvn install/deploy it (you can do this right now).

Or post a JIRA against this plugin asking for a 1.7-compatible release
(but this will not happen overnight).

Wayne

On 2/26/08, Marshall Schor <ms...@schor.com> wrote:
> Wayne Fay wrote:
> > <version>1.7.0</> is merely a strong suggestion to Maven.
> > <version>[1.7.0]</> will fail the build if it is unable to acquire
> > this artifact
> >
> Further investigation shows these dependency statements added ant to the
> "compile" <scope> - I think this has nothing to do with what ant-run
> uses.  I tried adding <scope>runtime</scope> but that didn't work either.
>
> > As for the missing 1.7.0 jar files, please ask the Ant team to upload
> > them, or move them to a shared sync directory etc (depends on how they
> > have set this up).
> >
> Further investigation shows the jars for 1.7. 0 *are* in the
> http://repo1.maven.org/maven2/ but not under "ant" but rather under
> "org" (that is, org/apache/ant/... etc.)
>
> So the real underlying problem is the mechanism I tried for the ant
> dependency is not working to specify the ant version to use for the
> maven running.  I think that's coming from the maven-antrun-plugin.
> This plugin has these pom entries:
>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant-launcher</artifactId>
> <version>1.6.5</version>
> <scope>runtime</scope>
> </dependency>
> −
>    <dependency>
> <groupId>ant</groupId>
> <artifactId>ant</artifactId>
> <version>1.6.5</version>
> </dependency>
>
> Is there a way to get maven-ant-plugin to use ant 1.7.0 level?
>
> -Marshall
>
>
> ---------------------------------------------------------------------
> 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


Re: specifying version of Ant to use for maven-ant-run

Posted by Marshall Schor <ms...@schor.com>.
Wayne Fay wrote:
> <version>1.7.0</> is merely a strong suggestion to Maven.
> <version>[1.7.0]</> will fail the build if it is unable to acquire
> this artifact
>   
Further investigation shows these dependency statements added ant to the 
"compile" <scope> - I think this has nothing to do with what ant-run 
uses.  I tried adding <scope>runtime</scope> but that didn't work either.

> As for the missing 1.7.0 jar files, please ask the Ant team to upload
> them, or move them to a shared sync directory etc (depends on how they
> have set this up).
>   
Further investigation shows the jars for 1.7. 0 *are* in the 
http://repo1.maven.org/maven2/ but not under "ant" but rather under 
"org" (that is, org/apache/ant/... etc.)

So the real underlying problem is the mechanism I tried for the ant 
dependency is not working to specify the ant version to use for the 
maven running.  I think that's coming from the maven-antrun-plugin.  
This plugin has these pom entries:

<dependency>
<groupId>ant</groupId>
<artifactId>ant-launcher</artifactId>
<version>1.6.5</version>
<scope>runtime</scope>
</dependency>
−
    <dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
</dependency>

Is there a way to get maven-ant-plugin to use ant 1.7.0 level?

-Marshall


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


Re: specifying version of Ant to use for maven-ant-run

Posted by Wayne Fay <wa...@gmail.com>.
<version>1.7.0</> is merely a strong suggestion to Maven.
<version>[1.7.0]</> will fail the build if it is unable to acquire
this artifact.

As for the missing 1.7.0 jar files, please ask the Ant team to upload
them, or move them to a shared sync directory etc (depends on how they
have set this up).

Wayne

On 2/26/08, Marshall Schor <ms...@schor.com> wrote:
> We need to have the maven ant run plugin to run ant at version 1.7.0.
>
> How should this be specified?
>
> We tried putting in the POM:
>
>      <plugin>
>        <artifactId>maven-antrun-plugin</artifactId>
>        <dependencies>
>            <!-- Ant -->
>            <dependency>
>                <groupId>org.apache.ant</groupId>
>                <artifactId>ant</artifactId>
>                <version>1.7.0</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.ant</groupId>
>                <artifactId>ant-launcher</artifactId>
>                <version>1.7.0</version>
>            </dependency>
>          </dependencies>
>          ...
>
> But we get maven downloading ant 1.6.5:  see the --debug trace snippet
> from a mvn run where ant was not in the local repository.  It seems to
> ask for ant 1.7.0.  We're using repo1.maven.org/maven2   as the
> repository - I looked there and the entry for
> http://repo1.maven.org/maven2/ant/ant/1.7.0/ is there but only has a POM
> - no "jar" files.  and there is no entry for the ant-launcher at 1.7.0
> there.
>
> Is there another repository we should be using to get this?
>
> I'm surprised that this is being "resolved" using version 1.6.5, which
> is below the 1.7.0 asked for - can someone explain that?
>
> [DEBUG]
> org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1:runtime
> (selected for runtime)
> [DEBUG] Retrieving parent-POM: org.apache.ant:ant-parent::1.7.0 for
> project: org.apache.ant:ant:jar:1.7.0 from the repository.
> [DEBUG]   org.apache.ant:ant:jar:1.7.0:compile (selected for compile)
> [DEBUG]     org.apache.ant:ant-launcher:jar:1.7.0:compile (selected for
> compile)
> [DEBUG] Skipping disabled repository snapshots
> [DEBUG] Trying repository central
> Downloading: http://repo1.maven.org/maven2/ant/ant/1.6.5/ant-1.6.5.pom
> 764b downloaded
> [DEBUG]   Artifact resolved
> [DEBUG] Retrieving parent-POM: org.apache:apache::4 for project:
> ant:ant:jar:1.6.5 from the repository.
> [DEBUG]   ant:ant:jar:1.6.5:runtime (selected for
> runtime)
>
>
> Thanks.  -Marshall
>
> ---------------------------------------------------------------------
> 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