antlion-users Mailing List for Antlion
Status: Inactive
Brought to you by:
groboclown
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
(3) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(18) |
Nov
(13) |
Dec
(10) |
2006 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Groboclown <gro...@gm...> - 2006-04-06 22:27:52
|
You're seeing the expected behavior. If you want to force a failure if a library can't be found, then change your policy to: <a:library-policy id=3D"maven-policy"> <a:urlrepository cachedir=3D"c:\\tmp" remote=3D"http://www.ibiblio.org/maven" format=3D"blabla/jars/blabla-1.0.jar"/> <must-find /> </a:library-policy> This will force a build failure if the required Jars are not present. Let me know if this helps. -Matt On 4/6/06, Davy Toch <Dav...@be...> wrote: > Consider the following ANT build file with a target using Antlion: > > <?xml version=3D'1.0'?> > <project basedir=3D"." default=3D"test" > xmlns:a=3D"antlib:net.sf.antlion"> > > <target name=3D"test"> > <a:library-policy id=3D"maven-policy"> > <a:urlrepository cachedir=3D"c:\\tmp" > remote=3D"http://www.ibiblio.org/maven" > format=3D"blabla/jars/blabla-1.0.jar"/> > </a:library-policy> > > <a:libraryDef policyRef=3D"maven-policy"> > <a:library> > <a:lib-entry groupid=3D"blabla" > artifactid=3D"blabla" version=3D"1.0" type=3D"jar"/> > </a:library> > </a:libraryDef> > </target> > > </project> > > Apparently the above target doesn't fail (with antlion 0.5.0b1 it logs > an error message but then the build succeeds, with antlion 0.9.0 > no error message is logged and the build succeeds as well). > > Do I need to set an attribute somewhere in order to make the build fail > or is this a bug? > > USING ANTLION 0.5.0b1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Buildfile: build.xml > > test: > [a:libraryDef] Getting: > http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar > [a:libraryDef] To: C:\tmp\blabla\jars\blabla-1.0.jar > [a:libraryDef] Error opening connection java.io.FileNotFoundException: > http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar > [a:libraryDef] Error opening connection java.io.FileNotFoundException: > http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar > [a:libraryDef] Error opening connection java.io.FileNotFoundException: > http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar > [a:libraryDef] Can't get > http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar to > C:\tmp\blabla\jars\blabla-1.0.jar > > BUILD SUCCESSFUL > Total time: 1 second > > USING ANTLION 0.9.0 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Buildfile: build.xml > > test: > [a:libraryDef] Adding 0 processors from policy [LibraryPolicy: maven-poli= cy] > > BUILD SUCCESSFUL > Total time: 11 seconds > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Antlion-users mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/antlion-users > -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life |
From: Davy T. <Dav...@be...> - 2006-04-06 17:47:55
|
Consider the following ANT build file with a target using Antlion: <?xml version='1.0'?> <project basedir="." default="test" xmlns:a="antlib:net.sf.antlion"> <target name="test"> <a:library-policy id="maven-policy"> <a:urlrepository cachedir="c:\\tmp" remote="http://www.ibiblio.org/maven" format="blabla/jars/blabla-1.0.jar"/> </a:library-policy> <a:libraryDef policyRef="maven-policy"> <a:library> <a:lib-entry groupid="blabla" artifactid="blabla" version="1.0" type="jar"/> </a:library> </a:libraryDef> </target> </project> Apparently the above target doesn't fail (with antlion 0.5.0b1 it logs an error message but then the build succeeds, with antlion 0.9.0 no error message is logged and the build succeeds as well). Do I need to set an attribute somewhere in order to make the build fail or is this a bug? USING ANTLION 0.5.0b1 ===================== Buildfile: build.xml test: [a:libraryDef] Getting: http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar [a:libraryDef] To: C:\tmp\blabla\jars\blabla-1.0.jar [a:libraryDef] Error opening connection java.io.FileNotFoundException: http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar [a:libraryDef] Error opening connection java.io.FileNotFoundException: http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar [a:libraryDef] Error opening connection java.io.FileNotFoundException: http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar [a:libraryDef] Can't get http://www.ibiblio.org/maven/blabla/jars/blabla-1.0.jar to C:\tmp\blabla\jars\blabla-1.0.jar BUILD SUCCESSFUL Total time: 1 second USING ANTLION 0.9.0 =================== Buildfile: build.xml test: [a:libraryDef] Adding 0 processors from policy [LibraryPolicy: maven-policy] BUILD SUCCESSFUL Total time: 11 seconds |
From: Groboclown <gro...@gm...> - 2006-02-12 05:50:15
|
On 2/9/06, Joe Banafato <jo...@ta...> wrote: > It seems like much of > the policy and library definition is flexible enough to go either in > build.xml, artifacts.xml, or an external file via an import. If you're planning on having a large project, where you have multiple builds using the same policy, and some builds dependent upon the output of another build, then I'd recommend going with one file containing the policy, and each build having an artifacts.xml and a build.xml. However, since it sounds like you're working with just one project, I'd suggest starting out simple. Put it all in one file so you don't need to flip through multiple files to see what's going on. > So I've decided that I have 2 artifacts: the jar for my API, and the war > from the web app that uses the jar. My libraries are all available in > the maven repos, so I'd like to use that. I'm not clear as to where I > define the dependencies on the libraries and how those libraries are > resolved. Any advice? A good way to declare an artifact's dependencies on a library is to put the library declaration directly in the artifact: <artifact id=3D"api.jar" location=3D"dist/my-api.jar" target=3D"jar" policyRef=3D"policy"> <depends> <!-- include your library dependencies here --> </depends> </artifact> <artifact id=3D"my.war" location=3D"dist/my.war" target=3D"war" policyRef= =3D"policy"> <src dir=3D"web"> <includes name=3D"**" /> </src> <depends> <artifact refid=3D"api.jar" /> </depends> </artifact> The libraries are resolved by using the policy definition - the library attributes get arranged into the repository filename by the processors and the repository format strings. > Regards, > Joe If you need more help let me know. -Matt |
From: Joe B. <jo...@ta...> - 2006-02-09 16:17:35
|
I'm working through the docs and having some moderate success. However, my big area of confusion is "what goes where?" It seems like much of the policy and library definition is flexible enough to go either in build.xml, artifacts.xml, or an external file via an import. What are your suggestions? Here's a small scenerio I'm working on: I have a set of source files in /src and about six popular third-party libraries (jakarta-commons stuff) that are needed to compile. I'd like to produce a jar in /dist. I have a web application and content in /web. It needs to include the my jar. I want to put a war in /dist. (Additionally, I have another web application that is very similar, and eventually I'd like to bundle both in an ear, but that's not an immediate concern.) So I've decided that I have 2 artifacts: the jar for my API, and the war from the web app that uses the jar. My libraries are all available in the maven repos, so I'd like to use that. I'm not clear as to where I define the dependencies on the libraries and how those libraries are resolved. Any advice? Regards, Joe |
From: Groboclown <gro...@gm...> - 2006-01-12 01:13:51
|
I hadn't put much thought into this one. I'll look into adding an optional parameter to declare if the dependencies of artifacts should be inspected too. Thanks for pointing this out! -Matt On 1/11/06, Adriaan Peens-Hough <IT...@pu...> wrote: > hi > > consider the following scenario: > <artifact id=3D"util.jar" target=3D"jar:util" location=3D"build/util-${ve= rsion}.jar"> > <src dir=3D"src/util"> > <include name=3D"**" /> > </src> > </artifact> > > <artifact id=3D"demo.jar" target=3D"jar:demo" policyref=3D"lib.policy.glo= bal" location=3D"build/demo-${version}.jar"> > <src dir=3D"src/demo"> > <include name=3D"**" /> > </src> > <depends name=3D"run" manifest-classpath=3D"mfcp.demo.jar"> > <artifact refid=3D"util.jar" /> > </depends> > </artifact> > > <run-subproject><artifact refid=3D"demo.jar" /></run-subproject> > > currently, demo.jar will only be rebuilt if anything in the "src/demo" fo= lder has a later timestamp than demo.jar. but wouldn't it be nice if it cou= ld also do out-of-date checks on all artifacts that it depends on? in that = case, if anything changed in "src/util", util.jar would be rebuilt then dem= o.jar also. > > > regards > > adriaan peens-hough > |
From: Adriaan Peens-H. <IT...@pu...> - 2006-01-11 07:02:03
|
hi consider the following scenario: <artifact id=3D"util.jar" target=3D"jar:util" location=3D"build/util-${vers= ion}.jar"> <src dir=3D"src/util"> <include name=3D"**" /> </src> </artifact> <artifact id=3D"demo.jar" target=3D"jar:demo" policyref=3D"lib.policy.globa= l" location=3D"build/demo-${version}.jar"> <src dir=3D"src/demo"> <include name=3D"**" /> </src> <depends name=3D"run" manifest-classpath=3D"mfcp.demo.jar"> <artifact refid=3D"util.jar" /> </depends> </artifact> <run-subproject><artifact refid=3D"demo.jar" /></run-subproject> currently, demo.jar will only be rebuilt if anything in the "src/demo" = folder has a later timestamp than demo.jar. but wouldn't it be nice if it = could also do out-of-date checks on all artifacts that it depends on? in = that case, if anything changed in "src/util", util.jar would be rebuilt = then demo.jar also. regards adriaan peens-hough |
From: Groboclown <gro...@gm...> - 2005-12-14 17:52:30
|
On 12/13/05, Groboclown <gro...@gm...> wrote: > No, not a common problem. A subclass could be created to handle this > kind of thing though. I'll look into a way to handle this > generically, but for the meanwhile a custom URL Repository should > handle your needs. I've been refactoring the URLFinder to fix the new bug you found, WIlliam (thanks for opening the ticket by the way), and I discovered an easier way to do this that the URL repository already supports. You can create a new validator (net.sf.antlion.utils.v1.FileValidation) that checks the top bytes of the just-downloaded file to see if it was a bad download or not. If it looks like a bad download (ala the error message from p4win), then have the validator return false. -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life |
From: William S. <Wil...@pr...> - 2005-12-14 07:40:56
|
> Now I see! I haven't thought about that. I'll investigate putting > the fix into the abstract cache class. Would you mind opening a bug > on this? Done, issue #1380211 /william -----Original Message----- From: Groboclown [mailto:gro...@gm...]=20 Sent: den 14 december 2005 03:43 To: William Sporrong Cc: ant...@li... Subject: Re: [Antlion-users] Why files are not found in cache? and why slow? > It seems like the URLRepository only looks at the first format when > checking the cache and falls back to the remote repo if it's not found. Now I see! I haven't thought about that. I'll investigate putting the fix into the abstract cache class. Would you mind opening a bug on this? --Matt On 12/13/05, William Sporrong <Wil...@pr...> wrote: > > Are you sure that the expected files are in your cache directory > > before running this? > Yes > > It seems like the URLRepository only looks at the first format when > checking the cache and falls back to the remote repo if it's not found. > I have not checked the source code but after adding an explicit > cacheFormat it works fast as expected. I would prefer it the cache could > have exactly the same structure as the remote repository. > > /william > > -----Original Message----- > From: Groboclown [mailto:gro...@gm...] > Sent: den 12 december 2005 20:48 > To: William Sporrong > Cc: ant...@li... > Subject: Re: [Antlion-users] Why files are not found in cache? and why > slow? > > If online=3D"false" and you're seeing that error message, it means = that > Antlion cannot find the corresponding file in the cache, and turning > online to "true" will not fix that. > > Are you sure that the expected files are in your cache directory > before running this? At the moment, there isn't any good way to > discover the name of the cached file Antlion is searching for. If you > have access to the source and enjoy re-compiling, then you can alter > net.sf.antlion.libraries.v3.finders.URLFinder, by inserting this line > before the "if (useRemote) line in the discoverFile method: > > logStep("Entry [" + formatMatch + "] being cached as [" + > cacheFile + "]"); > > and turn on Antlion repository tracing by adding to the ant execution: > -Dantlion.enable-tracing=3Dtrue > > Let me know what you find out. > > On 12/9/05, William Sporrong <Wil...@pr...> wrote: > > Hello, > > I have a urllibrary set up with about 30 libraries and 40 lib files in > > total. The first time I ran it took a couple of minutes and all the > libs > > where fetched to the cache. The strange thing is that the next time I > > run it it took about half a minute. This seems a bit slow considering > > all the libs are in the cache? If I add the attribute = online=3D"false" > it > > only takes a few seconds but then it complains about all the files > that > > don't match the first format pattern: File > > [ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar] could not be > > retrieved, repository offline. Any ideas? Do I have to specify the > > cachepattern to make it work? > > > > <library-policy id=3D"default.policy"> > > <urlrepository remote=3D"http://xxx" > > cachedir=3D"${user.home}/.vendor/" > online=3D"false"> > > <basicAuth username=3D"xxx" password=3D"xxx" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact]-[version].[type]" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact].[type]" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact]-bin.[type]" /> > > <format > > = text=3D"[group]/[artifact]/[version]/[artifact]-[version]-bin.[type]" /> > > <!-- src.zip, doc.zip --> > > <format text=3D"[group]/[artifact]/[version]/[type].zip" /> > > </urlrepository> > > <defaults /> > > <must-find /> > > <property format=3D"prop.lib.[artifact]" /> > > </library-policy> > > <libraryDef policyref=3D"default.policy"> > > ... > > > > Thanks, > > William |
From: Groboclown <gro...@gm...> - 2005-12-14 02:48:18
|
On 12/13/05, William Sporrong <Wil...@pr...> wrote: > Thanks for the answer > > > That seems to work for the moment, but this more so looks like a > > problem with p4web returning a 200 status on a resource not found. > Yes I know. I just can't change the P4 web repository. I know. I've had other issues with it, like being able to restrict its view to a client spec, rather than the depot. > > For this specific example, you could always check if the document is > > less than say 1k, and contains the text " - no such file(s)." > Yes that would probably be a better solution. But I guess it's not a comm= on problem. No, not a common problem. A subclass could be created to handle this kind of thing though. I'll look into a way to handle this generically, but for the meanwhile a custom URL Repository should handle your needs. > > > You shouldn't throw a BuildException or otherwise here, because that > > would prevent the repository from looking at an alternate format > > string (if any). > Yes but I want it to look at a different format string. I use four format= and the server always returns a 200. If you want to continue looking for a different format, then you return null from the discoverFile method. Throwing a BuildException or other Exception will terminate the Ant execution with a failure. > > /william > |
From: Groboclown <gro...@gm...> - 2005-12-14 02:43:17
|
> It seems like the URLRepository only looks at the first format when > checking the cache and falls back to the remote repo if it's not found. Now I see! I haven't thought about that. I'll investigate putting the fix into the abstract cache class. Would you mind opening a bug on this? --Matt On 12/13/05, William Sporrong <Wil...@pr...> wrote: > > Are you sure that the expected files are in your cache directory > > before running this? > Yes > > It seems like the URLRepository only looks at the first format when > checking the cache and falls back to the remote repo if it's not found. > I have not checked the source code but after adding an explicit > cacheFormat it works fast as expected. I would prefer it the cache could > have exactly the same structure as the remote repository. > > /william > > -----Original Message----- > From: Groboclown [mailto:gro...@gm...] > Sent: den 12 december 2005 20:48 > To: William Sporrong > Cc: ant...@li... > Subject: Re: [Antlion-users] Why files are not found in cache? and why > slow? > > If online=3D"false" and you're seeing that error message, it means that > Antlion cannot find the corresponding file in the cache, and turning > online to "true" will not fix that. > > Are you sure that the expected files are in your cache directory > before running this? At the moment, there isn't any good way to > discover the name of the cached file Antlion is searching for. If you > have access to the source and enjoy re-compiling, then you can alter > net.sf.antlion.libraries.v3.finders.URLFinder, by inserting this line > before the "if (useRemote) line in the discoverFile method: > > logStep("Entry [" + formatMatch + "] being cached as [" + > cacheFile + "]"); > > and turn on Antlion repository tracing by adding to the ant execution: > -Dantlion.enable-tracing=3Dtrue > > Let me know what you find out. > > On 12/9/05, William Sporrong <Wil...@pr...> wrote: > > Hello, > > I have a urllibrary set up with about 30 libraries and 40 lib files in > > total. The first time I ran it took a couple of minutes and all the > libs > > where fetched to the cache. The strange thing is that the next time I > > run it it took about half a minute. This seems a bit slow considering > > all the libs are in the cache? If I add the attribute online=3D"false" > it > > only takes a few seconds but then it complains about all the files > that > > don't match the first format pattern: File > > [ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar] could not be > > retrieved, repository offline. Any ideas? Do I have to specify the > > cachepattern to make it work? > > > > <library-policy id=3D"default.policy"> > > <urlrepository remote=3D"http://xxx" > > cachedir=3D"${user.home}/.vendor/" > online=3D"false"> > > <basicAuth username=3D"xxx" password=3D"xxx" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact]-[version].[type]" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact].[type]" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact]-bin.[type]" /> > > <format > > text=3D"[group]/[artifact]/[version]/[artifact]-[version]-bin.[type]" /= > > > <!-- src.zip, doc.zip --> > > <format text=3D"[group]/[artifact]/[version]/[type].zip" /> > > </urlrepository> > > <defaults /> > > <must-find /> > > <property format=3D"prop.lib.[artifact]" /> > > </library-policy> > > <libraryDef policyref=3D"default.policy"> > > ... > > > > Thanks, > > William |
From: William S. <Wil...@pr...> - 2005-12-13 12:01:58
|
> Are you sure that the expected files are in your cache directory > before running this? =20 Yes It seems like the URLRepository only looks at the first format when checking the cache and falls back to the remote repo if it's not found. I have not checked the source code but after adding an explicit cacheFormat it works fast as expected. I would prefer it the cache could have exactly the same structure as the remote repository. /william -----Original Message----- From: Groboclown [mailto:gro...@gm...]=20 Sent: den 12 december 2005 20:48 To: William Sporrong Cc: ant...@li... Subject: Re: [Antlion-users] Why files are not found in cache? and why slow? If online=3D"false" and you're seeing that error message, it means that Antlion cannot find the corresponding file in the cache, and turning online to "true" will not fix that. Are you sure that the expected files are in your cache directory before running this? At the moment, there isn't any good way to discover the name of the cached file Antlion is searching for. If you have access to the source and enjoy re-compiling, then you can alter net.sf.antlion.libraries.v3.finders.URLFinder, by inserting this line before the "if (useRemote) line in the discoverFile method: logStep("Entry [" + formatMatch + "] being cached as [" + cacheFile + "]"); and turn on Antlion repository tracing by adding to the ant execution: -Dantlion.enable-tracing=3Dtrue Let me know what you find out. On 12/9/05, William Sporrong <Wil...@pr...> wrote: > Hello, > I have a urllibrary set up with about 30 libraries and 40 lib files in > total. The first time I ran it took a couple of minutes and all the libs > where fetched to the cache. The strange thing is that the next time I > run it it took about half a minute. This seems a bit slow considering > all the libs are in the cache? If I add the attribute online=3D"false" it > only takes a few seconds but then it complains about all the files that > don't match the first format pattern: File > [ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar] could not be > retrieved, repository offline. Any ideas? Do I have to specify the > cachepattern to make it work? > > <library-policy id=3D"default.policy"> > <urlrepository remote=3D"http://xxx" > cachedir=3D"${user.home}/.vendor/" online=3D"false"> > <basicAuth username=3D"xxx" password=3D"xxx" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact]-[version].[type]" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact].[type]" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact]-bin.[type]" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact]-[version]-bin.[type]" = /> > <!-- src.zip, doc.zip --> > <format text=3D"[group]/[artifact]/[version]/[type].zip" = /> > </urlrepository> > <defaults /> > <must-find /> > <property format=3D"prop.lib.[artifact]" /> > </library-policy> > <libraryDef policyref=3D"default.policy"> > ... > > Thanks, > William > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&opclick > _______________________________________________ > Antlion-users mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/antlion-users > -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life |
From: Groboclown <gro...@gm...> - 2005-12-12 19:47:54
|
If online=3D"false" and you're seeing that error message, it means that Antlion cannot find the corresponding file in the cache, and turning online to "true" will not fix that. Are you sure that the expected files are in your cache directory before running this? At the moment, there isn't any good way to discover the name of the cached file Antlion is searching for. If you have access to the source and enjoy re-compiling, then you can alter net.sf.antlion.libraries.v3.finders.URLFinder, by inserting this line before the "if (useRemote) line in the discoverFile method: logStep("Entry [" + formatMatch + "] being cached as [" + cacheFile + "]"); and turn on Antlion repository tracing by adding to the ant execution: -Dantlion.enable-tracing=3Dtrue Let me know what you find out. On 12/9/05, William Sporrong <Wil...@pr...> wrote: > Hello, > I have a urllibrary set up with about 30 libraries and 40 lib files in > total. The first time I ran it took a couple of minutes and all the libs > where fetched to the cache. The strange thing is that the next time I > run it it took about half a minute. This seems a bit slow considering > all the libs are in the cache? If I add the attribute online=3D"false" it > only takes a few seconds but then it complains about all the files that > don't match the first format pattern: File > [ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar] could not be > retrieved, repository offline. Any ideas? Do I have to specify the > cachepattern to make it work? > > <library-policy id=3D"default.policy"> > <urlrepository remote=3D"http://xxx" > cachedir=3D"${user.home}/.vendor/" online=3D"false= "> > <basicAuth username=3D"xxx" password=3D"xxx" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact]-[version].[type]" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact].[type]" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact]-bin.[type]" /> > <format > text=3D"[group]/[artifact]/[version]/[artifact]-[version]-bin.[type]" /> > <!-- src.zip, doc.zip --> > <format text=3D"[group]/[artifact]/[version]/[type].zip" /> > </urlrepository> > <defaults /> > <must-find /> > <property format=3D"prop.lib.[artifact]" /> > </library-policy> > <libraryDef policyref=3D"default.policy"> > ... > > Thanks, > William > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&opclick > _______________________________________________ > Antlion-users mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/antlion-users > -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life |
From: Groboclown <gro...@gm...> - 2005-12-12 18:52:09
|
VGhhdCBzZWVtcyB0byB3b3JrIGZvciB0aGUgbW9tZW50LCBidXQgdGhpcyBtb3JlIHNvIGxvb2tz IGxpa2UgYQpwcm9ibGVtIHdpdGggcDR3ZWIgcmV0dXJuaW5nIGEgMjAwIHN0YXR1cyBvbiBhIHJl c291cmNlIG5vdCBmb3VuZC4KCkZvciB0aGlzIHNwZWNpZmljIGV4YW1wbGUsIHlvdSBjb3VsZCBh bHdheXMgY2hlY2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aXBGaWxlID0gbmV3IFpp cEZpbGUob3V0cHV0KTsKPgo+ICAgICAgICAgICAgICAgICB6aXBGaWxlLmNsb3NlKCk7Cj4KPiAg ICAgICAgICAgICB9Cj4KPgo+Cj4gQW5kIHRoZW4gY2hhbmdlZCB0aGUgImNhdGNoIEJ1aWxkRXhj ZXB0aW9uIiB0byAiY2F0Y2ggRXhjZXB0aW9uIi4gSXQncyBub3QKPiB0aGF0IG5pY2WFIFdoYXQg ZG8geW91IHRoaW5rPyBBbnkgb3RoZXIgc3VnZ2VzdGlvbnM/Cj4KPgo+Cj4gL3dpbGxpYW0KPgo+ CgoKLS0KLU1hdHQKIlNvIHdoYXRldmVyIHlvdSBkbywgZG9uJ3QgYmUgYm9yZWQsIHRoaXMgaXMK YWJzb2x1dGVseSB0aGUgbW9zdCBleGNpdGluZyB0aW1lIHdlIGNvdWxkIGhhdmUKcG9zc2libHkg aG9wZWQgdG8gYmUgYWxpdmUuIEFuZCB0aGluZ3MgYXJlIGp1c3QKc3RhcnRpbmcuIiAgLS0gV2Fr aW5nIExpZmUK |
From: William S. <Wil...@pr...> - 2005-12-09 15:39:19
|
Hello, I have a urllibrary set up with about 30 libraries and 40 lib files in total. The first time I ran it took a couple of minutes and all the libs where fetched to the cache. The strange thing is that the next time I run it it took about half a minute. This seems a bit slow considering all the libs are in the cache? If I add the attribute online=3D"false" = it only takes a few seconds but then it complains about all the files that don't match the first format pattern: File [ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar] could not be retrieved, repository offline. Any ideas? Do I have to specify the cachepattern to make it work? <library-policy id=3D"default.policy"> <urlrepository remote=3D"http://xxx" cachedir=3D"${user.home}/.vendor/" = online=3D"false"> <basicAuth username=3D"xxx" password=3D"xxx" /> <format text=3D"[group]/[artifact]/[version]/[artifact]-[version].[type]" /> <format text=3D"[group]/[artifact]/[version]/[artifact].[type]" /> <format text=3D"[group]/[artifact]/[version]/[artifact]-bin.[type]" /> <format text=3D"[group]/[artifact]/[version]/[artifact]-[version]-bin.[type]" /> <!-- src.zip, doc.zip --> <format text=3D"[group]/[artifact]/[version]/[type].zip" /> </urlrepository> <defaults /> <must-find /> <property format=3D"prop.lib.[artifact]" /> </library-policy> <libraryDef policyref=3D"default.policy"> ...=20 Thanks, William |
From: William S. <Wil...@pr...> - 2005-12-08 15:50:48
|
Hello, Just switched to Perforce and tried to setup up a urlrepository that links to a Perforce web interface (P4Web). The problem I found was that the webserver returned a custom error message when files where not found. Something like "<body>xxx was not found</body>'. The URLDownloader thought it was the file and copied it to the cache. =20 To handle that little problem I recompiled URLDownloader with the following addition in downloadURL: =20 ... g.execute(); =20 // Check that file is a zip archive. This will prevent server html // responses beeing saved as libs. if (input.getPath().endsWith(".jar") || input.getPath().endsWith(".zip")) { ZipFile zipFile =3D new ZipFile(output); =20 zipFile.close(); } =20 And then changed the "catch BuildException" to "catch Exception". It's not that nice... What do you think? Any other suggestions? =20 /william =20 |
From: Groboclown <gro...@gm...> - 2005-12-02 00:47:17
|
Antlion 0.8.0 is about to go out the door. A few things I had planned for this release didn't make it: * Add a new virtual file system repository (patch by Alban Peignier). * Add a new processor which will generate aliases for attributes based on a formatted string. Similar to a dynamic attribute, but will set the value to a formatted string, rather than to an Ant property whose property name is the formatted string. I've already gone over my internal desire for a monthly release schedule by a day or two, and I just didn't have the time for these. However, the current list of changes is already pretty long, so I hope that getting this out in the wild early will help get more eyes and fingers on it to hunt out the bugs. I've been rather quiet on this list regarding future direction of the tool, but now that I've got in almost all of the base functionality I've been wanting, I'll start pushing this discussion out to the people who use the tool. There are currently a number of ideas on the table that I'd like to get feedback on so I can start planning these out for the next release 0.9.0: * Adding a load order attribute for "parent" policies. Is this a good idea, solving some major problems, or does it just complicate the policy building processes further? I'm on the wall on this one, so any feedback is welcome. * Putting template-like information about artifacts inside a policy.=20 This would be like the standard format for an artifact that all projects could share, to reduce redundant information. However, I'm starting to wonder if this will hide too much information, and if something along the lines of a <presetDef> or <macroDef> couldn't just as easily do the same thing. Thanks for the input! -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life |
From: Alban P. <alb...@fr...> - 2005-11-29 17:34:37
|
Hello, Here is a documentation draft for vfs repository: http://wiki.tryphon.org/Antlion_VFSRepository#Documentation_Draft -- Alban Peignier <alb...@fr...> http://people.tryphon.org/~alban |
From: Alban P. <alb...@fr...> - 2005-11-29 07:17:43
|
Hello, On Mon, 2005-11-28 at 16:56 -0600, Groboclown wrote: > I've commited the patch for the regex formatter in the > experiments/optional path. The build there will need to be updated > with the additional classpath requirements. To make the regexp formatter fully usable, the base formatString method should support escaped tokens (like \[ \] \, and \\). It will allow "complex" regexp expressions. > The only other thing I would ask of > you is for some documentation. You don't need to worry about the > formatting, but just some details about how to use the new features. You're right. I'm going to take a moment to write that. > As for your parent-policy first patch, I'd like to discuss this with > you. My initial thought was to use the child first, so that the child > could override the parent. Do you think that the parent should take > presidence over the child policies? > > Perhaps a flexible approach could be made by putting a qualifier > around the parent on whether it's a first or last priority. This, > however, would make the code a bit more complex, and can cause even > more headaches to managing policies. I agree with you. <parent-policy refid="..." order="first"/> could solve the problem and let the user choose its own logic. But it requires a more complex modification, so I chose to start the discussion first. -- Alban Peignier <alb...@fr...> http://people.tryphon.org/~alban |
From: Alban P. <alb...@fr...> - 2005-11-24 10:56:48
|
Hi all, Here are few patches cleaner than the previous draft. patch-regexptokenformatter: There are RegexpTokenFormatter and RegexpTokenFormatterFactory implementation. As discussed, use the Ant Regexp API. patch-vfsrepository: Provides VFSFinder and VFSRepository implementations. addVFSRepository methods have been added. AbstractURLFinder and AbstractURLRepository have been created to share code between URL and VFS implementations. patch-policyparentfirst: We tried to use the parent library-policy to define local urlrepositories which should be used as cache of remote urlrepositories used in all of our library-policies. That looks great but the parent policy repositories are visited after the child repositories :,( This patch reverts the visit order. To be discussed. Regards, -- Alban Peignier <alb...@fr...> http://people.tryphon.org/~alban |
From: Alban P. <alb...@fr...> - 2005-11-18 10:40:51
|
On Thu, 2005-11-17 at 11:34 -0600, Groboclown wrote: > Thanks for the note. This looks like some good stuff. I'd want this > to be put into its own repository, possibly as an add-on to core > Antlion since it does have an additional external dependency. I only modified urlrepository to make easier my first usage test. My base idea is providing a vfsrepository. For the moment, the VFSFinder requires some bad code (protected fields, copy/paste methods, etc). A abstract class for URLFinder and VFSFinder may be required to avoid the problem. Same thing for URLRepository and a future VFSRepository. If it looks ok for you, I can provide a patch proposal. > The String.replaceAll is a JDK 1.4 feature, and Antlion is intended to > run on the same platforms as Ant, so this might have to be rethought a > bit. I do see some advantages to this, though. I think about using ant.util.regexp. I'll modify the patch. > Do you have any issues with me putting your name/email on the source > as a contributor? I don't think so ;o) -- Alban Peignier <alb...@fr...> http://people.tryphon.org/~alban |
From: Groboclown <gro...@gm...> - 2005-11-17 17:34:15
|
Thanks for the note. This looks like some good stuff. I'd want this to be put into its own repository, possibly as an add-on to core Antlion since it does have an additional external dependency. The String.replaceAll is a JDK 1.4 feature, and Antlion is intended to run on the same platforms as Ant, so this might have to be rethought a bit. I do see some advantages to this, though. Do you have any issues with me putting your name/email on the source as a contributor? -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life On 11/16/05, Alban Peignier <alb...@fr...> wrote: > Hi all, > > To make easier our 3rd-party tracking, we developed a vfsrepository > for Antlion. It uses commons-vfs. For more details, see the following > wiki page: http://wiki.tryphon.org/Antlion_VFSRepository > > Current patch and a small sample usage are available here: > http://people.tryphon.org/~alban/antlion/ > > The current patch isn't very smart. It provides a VFSFinder (which badly > overrides URLFinder for the moment) and adds a first regexp support to > the TokenFormatter (which should be implemented the Ant regexp adapter). > > I hope it can be useful for this great tool that Antlion is. > -- > Alban Peignier <alb...@fr...> > http://people.tryphon.org/~alban > |
From: Alban P. <alb...@fr...> - 2005-11-17 00:10:56
|
Hi all, To make easier our 3rd-party tracking, we developed a vfsrepository for Antlion. It uses commons-vfs. For more details, see the following wiki page: http://wiki.tryphon.org/Antlion_VFSRepository Current patch and a small sample usage are available here: http://people.tryphon.org/~alban/antlion/ The current patch isn't very smart. It provides a VFSFinder (which badly overrides URLFinder for the moment) and adds a first regexp support to the TokenFormatter (which should be implemented the Ant regexp adapter). I hope it can be useful for this great tool that Antlion is. -- Alban Peignier <alb...@fr...> http://people.tryphon.org/~alban |
From: Groboclown <gro...@gm...> - 2005-11-15 16:49:46
|
On 11/3/05, Hilco Wijbenga <hil...@el...> wrote: [snip] > We could leave everything as is but add an extra tag like <antlion> or > <process> which would kick off the processing. It would set a property > indicating whether the processing had already happened so it would only > run once (per build) even if invoked multiple times (during the same > build). > > The <policy>, <library>, etcetera tags would set up the data structures > but would not execute anything (so no properties are defined). When the > <antlion> tag is found, only then would the data structures be used to > do all things Antlion normally does immediately. > > It would be up to the build file maintainer to make sure that the > <antlion> tag is in the right places. I can see an opportunity here to implement this technique. I'll see if I can add support for that in version 0.8.0. On 11/14/05, Hilco Wijbenga <hil...@el...> wrote: [snip] > Instead of HTTP I'm now using FTP since there's > already an <ftp> task. There's an interesting idea. Instead of a pure URL getter, allow for an alternative FTP getter, since that better supports listing. It does, however, add the requirement for additional Ant and external jars. [snip] > I guess <run-subproject> doesn't copy existing properties? Tasks like > <antcall> have 'inheritAll' and <param> to "remember" properties. I > guess, that would be very nice for <run-subproject> as well. The initial reason for not allowing this was to "encourage" clean separation in builds. The way I'm starting to see things in Ant is that setting up the sub-project should be the responsibility of the sub-project (ala a specific target for the task), rather than the invoking script. But that's pushing my current opinions onto the tool, which breaks one of the tenants of Antlion. I'll open a feature request on this one. > In general, I'm quite happy with the build now. I should be able to > quite easily add sub projects in the future when appropriate. That's wonderful. If you don't mind, keep me posted on additional ideas and developments you come across. > > Thanks, > Hilco > -- -Matt |
From: Hilco W. <hil...@el...> - 2005-11-14 23:19:52
|
Ok, change of plans. Instead of HTTP I'm now using FTP since there's already an <ftp> task. That works nicely (worst case it displays two lines about downloading 0 files). I added an 'unless' attribute (using property 'skip.ftp') so that the build only runs the <ftp> task once. So far, so good. I also use <run-subproject> to generate subproject artifacts that I need. Here's where things go less then perfect. Everything works, but the <ftp> task runs again (inside the sub project), even though I set the 'skip.ftp'. I guess <run-subproject> doesn't copy existing properties? Tasks like <antcall> have 'inheritAll' and <param> to "remember" properties. I guess, that would be very nice for <run-subproject> as well. In general, I'm quite happy with the build now. I should be able to quite easily add sub projects in the future when appropriate. Thanks, Hilco |
From: Groboclown <gro...@gm...> - 2005-11-14 20:00:41
|
Sorry for the delay in replying to you. I've been heads-down at work and home, and haven't had time for much else. > I tried to use > > <artifact id=3D"${project.name}.jar" ...> > > but this does not work. As far as I can tell the 'id' is not correctly > expanded. Yes, this will generate "interesting" results. If memory serves, the "id" tag is read and stored in the reference map before the initial target (named "", which is all the tasks outside a target) are executed. Here's a test to see what happens: --- start build.xml --- <project name=3D"name" default=3D"main" basedir=3D"."> <path id=3D"${abc}"> <pathelement location=3D"build.xml" /> </path> <target name=3D"main"> <property name=3D"out" refid=3D"$${abc}" /> <echo> $${abc}: ${abc} out: ${out} </echo> </target> </project> --- end build.xml --- (notice that this forces the property "out" to be based on the ID "${abc}", whether or not the property named "abc" is set) If we run: $ ant we see something like: main: [echo] ${abc}: ${abc} [echo] out: /tmp/build.xml If we then run: $ export ANT_OPTS=3D"-Dabc=3D123" $ ant we see something like: main: [echo] ${abc}: 123 [echo] out: /tmp/build.xml (by setting the -D in ANT_OPTS, we force the property "abc" to be a system property, which means it's loaded by default before all other properties) You can even switch this example around so that the contents above are in a file, and <import>ed into another build file. The <import> task runs when the initial target runs, so at this point the property has been set. And then add the "abc" as a property declaration before the <import> and see the same result. So, the "id" attribute is processed WITHOUT parameter substitution, in terms of adding the value to the Ant reference map. -Matt On 11/3/05, Hilco Wijbenga <hil...@el...> wrote: > I tried to use > > <artifact id=3D"${project.name}.jar" ...> > > but this does not work. As far as I can tell the 'id' is not correctly > expanded. > > Is this an Ant thing? Or is it up to Antlion/<artifact> to make sure > that 'id' is expanded? > > Hilco > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Downl= oad > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Antlion-users mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/antlion-users > -- -Matt "So whatever you do, don't be bored, this is absolutely the most exciting time we could have possibly hoped to be alive. And things are just starting." -- Waking Life |