ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matèrne, Jan (RZF, SG 481) <jan.mate...@fv.nrw.de>
Subject AW: Maven Ant Plugin question
Date Fri, 28 Mar 2014 05:32:40 GMT
Don't be confused by Ants output: the start of <get> does not mean that Ant wants to
open the connection:
      [get] Getting:
http://192.168.1.124:8081/nexus/content/groups/public//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] To: /home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
-->      [get] Not modified - so not downloaded

These files are present on the local HDD and Ant wont do a download.


      [get] Getting:
https://repository.cloudera.com/artifactory/cloudera-repos//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] To: /home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
-->      [get] Error opening connection java.io.FileNotFoundException:

Here there are some problems with the URI. 
Try that in your browser ...



cheers
Jan

-----Ursprüngliche Nachricht-----
Von: hwpstorage [mailto:hwpstorage@gmail.com] 
Gesendet: Donnerstag, 27. März 2014 16:02
An: Ant Users List
Betreff: Re: Maven Ant Plugin question

Thanks for the help.

I manually change the maven-build.xml file
usetimestamp="false"
to
usetimestamp="true"

but running ant still goes to every Maven repository to download the jar.
e.g.
      [get] Getting:
http://192.168.1.124:8081/nexus/content/groups/public//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] To: /home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Not modified - so not downloaded
      [get] Getting:
https://repository.cloudera.com/artifactory/cloudera-repos//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] To: /home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Error opening connection java.io.FileNotFoundException:
https://repository.cloudera.com/artifactory/cloudera-repos//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Error opening connection java.io.FileNotFoundException:
https://repository.cloudera.com/artifactory/cloudera-repos//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Error opening connection java.io.FileNotFoundException:
https://repository.cloudera.com/artifactory/cloudera-repos//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Can't get
https://repository.cloudera.com/artifactory/cloudera-repos//javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jarto
/home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Getting:
http://maven.twttr.com/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] To: /home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Error opening connection java.io.FileNotFoundException:
http://maven.twttr.com/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Error opening connection java.io.FileNotFoundException:
http://maven.twttr.com/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Error opening connection java.io.FileNotFoundException:
http://maven.twttr.com/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Can't get
http://maven.twttr.com/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jarto
/home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Getting:
http://repo.maven.apache.org/maven2/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar
      [get] To: /home/usera/.m2/repository/javassist/javassist/
3.12.1.GA/javassist-3.12.1.GA.jar
      [get] Not modified - so not downloaded



On Thu, Mar 27, 2014 at 3:07 AM, Jan Matèrne (jhm) <apache@materne.de>wrote:

> The problem is the usetimestamp="false" which disables the local check.
> And because its hard written in the (generated) code you can't "overwrite"
> that with a <presetdef>.
>
> I did a test with this buildfile:
> - usetimestamp=false: loads everytime all artifacts (just the mkdir will
> run
> once)
> - usetimestamp=true: only load the 1st time
>
> While I dont think that changing generated code is a good idea (when you
> want to regenerate that later ...) this is the best thing I can suggest ...
> (Another option: tweak Ant itself: overwrite <get> to ignore the
> usetimestamp-setting, ...)
>
>
>
> Jan
>
>
>
> <project>
>
>   <!-- For local tests -->
>   <property name="local.repo" value="test-repo"/>
>   <property name="lib.dir" value="lib"/>
>
>   <!-- The 'generated' code -->
>   <mkdir dir="${local.repo}/commons-io/commons-io/2.4"/>
>   <get
> src="
> http://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.
> jar"
>        dest="${local.repo}/commons-io/commons-io/2.4"
>        usetimestamp="false"
>        ignoreerrors="true"/>
>
>   <mkdir dir="${local.repo}/commons-lang/commons-lang/2.6"/>
>   <get
> src="
> http://repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lan
> g-2.6.jar"
>        dest="${local.repo}/commons-lang/commons-lang/2.6"
>        usetimestamp="false"
>        ignoreerrors="true"/>
>
> </project>
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: hwpstorage [mailto:hwpstorage@gmail.com]
> > Gesendet: Dienstag, 25. März 2014 15:30
> > An: user@ant.apache.org
> > Betreff: Maven Ant Plugin question
>  >
> > Hello,
> >
> > Sorry for the crossing post.
> > I tried to use maven to genterate build.xml for ant.
> > Use command
> >  mvn ant:ant
> > will generate build.xml and maven-build.xml, which can be used by Ant.
> >
> > my problem is
> > everytime runs ant compile
> > it will download everything from every repository.
> >
> > for example, for this jar file parquet-format-1.0.0.jar I got error, it
> > tries every repository.
> >       [get] Getting:
> > http://192.168.2.124:8081/nexus/content/groups/public//com/twitter/parq
> > uet-format/1.0.0/parquet-format-1.0.0.jar
> >       [get] To:
> > /home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar
> >       [get] Getting:
> > https://repository.cloudera.com/artifactory/cloudera-
> > repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
> >       [get] To:
> > /home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar
> >       [get] Error opening connection java.io.FileNotFoundException:
> > https://repository.cloudera.com/artifactory/cloudera-
> > repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
> >       [get] Error opening connection java.io.FileNotFoundException:
> > https://repository.cloudera.com/artifactory/cloudera-
> > repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
> >       [get] Error opening connection java.io.FileNotFoundException:
> > https://repository.cloudera.com/artifactory/cloudera-
> > repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
> >       [get] Can't get
> > https://repository.cloudera.com/artifactory/cloudera-
> > repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jarto
> > /home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar
> >       [get] Getting:
> > http://maven.twttr.com/com/twitter/parquet-format/1.0.0/parquet-format-
> > 1.0.0.jar
> >       [get] To:
> > /home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar
> >       [get] Error opening connection java.io.FileNotFoundException:
> > http://maven.twttr.com/com/twitter/parquet-format/1.0.0/parquet-format-
> > 1.0.0.jar
> >       [get] Error opening connection java.io.FileNotFoundException:
> > http://maven.twttr.com/com/twitter/parquet-format/1.0.0/parquet-format-
> > 1.0.0.jar
> >       [get] Error opening connection java.io.FileNotFoundException:
> > http://maven.twttr.com/com/twitter/parquet-format/1.0.0/parquet-format-
> > 1.0.0.jar
>  >       [get] Can't get
> > http://maven.twttr.com/com/twitter/parquet-format/1.0.0/parquet-format-
> > 1.0.0.jarto
> > /home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar
> >       [get] Getting:
> > http://repo.maven.apache.org/maven2/com/twitter/parquet-
> > format/1.0.0/parquet-format-1.0.0.jar
> >       [get] To:
> > /home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar
> >
> >
> > in File  maven-build.xml, this is generated via commmand mvn ant:ant
> >
> >     <mkdir dir="${maven.repo.local}/com/twitter/parquet-format/1.0.0"/>
> >     <get src="
> > http://192.168.2.124:8081/nexus/content/groups/public//com/twitter/parq
> > uet-format/1.0.0/parquet-format-1.0.0.jar
> > "
> >
> > dest="${maven.repo.local}/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar"
> >          usetimestamp="false"
> >          ignoreerrors="true"/>
> >     <get src="
> > https://repository.cloudera.com/artifactory/cloudera-
> > repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
> > "
> >
> > dest="${maven.repo.local}/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar"
> >          usetimestamp="false"
> >          ignoreerrors="true"/>
> >     <get src="
> > http://maven.twttr.com/com/twitter/parquet-format/1.0.0/parquet-format-
> > 1.0.0.jar
> > "
> >
> > dest="${maven.repo.local}/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar"
> >          usetimestamp="false"
> >          ignoreerrors="true"/>
> >     <get src="
> > http://repo.maven.apache.org/maven2/com/twitter/parquet-
> > format/1.0.0/parquet-format-1.0.0.jar
> > "
> >
> > dest="${maven.repo.local}/com/twitter/parquet-format/1.0.0/parquet-
> > format-1.0.0.jar"
> >          usetimestamp="false"
> >          ignoreerrors="true"/>
> >
> >
> > In the orginal maven pom.xml file
> >                 <dependency>
> >                         <groupId>com.twitter</groupId>
> >                         <artifactId>parquet-format</artifactId>
> >                         <version>1.0.0</version>
> >                 </dependency>
> >
> >
> > Is there any way to change the generate file maven-build.xml in maven?
> > is it possible to skip the jar download if the maven.repo.local local
> > repository already has the jar file?
> >
> > Thanks a lot
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message