Re: maven-ant-tasks-2.0.7: How to package an artifact?
Stefan Prange wrote: yes there is. Our operations team defined this convention. Their deploy script looks for ear files that are named after this pattern. But the timestamp part after the appname.ear_ is completely arbitrary. It's meant to be a version marker to distinguish different EAR files. The deploy script always picks the EAR file with the most recent file date (i.e. the date which can be updated by using touch.) Sounds way easier to get the operations team from changing their mask from appname.ear_* to appname-*.ear. It sounds silly to forego a lot of useful functionality because a filename is the wrong way around. Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: How to package an artifact?
Graham Leggett wrote: On Thu, September 27, 2007 8:09 pm, Stefan Prange wrote: 2. I want my EAR file named after a predefined pattern. It shall be name like appname.ear_timestamp, e.g. appname.ear_20070927. I tried to achieve this with Maven before (with build/finalname) but with no success. ANT allows me to name the resulting EAR file whatever I like. Is there a reason you want this particular pattern? Hi Graham, yes there is. Our operations team defined this convention. Their deploy script looks for ear files that are named after this pattern. But the timestamp part after the appname.ear_ is completely arbitrary. It's meant to be a version marker to distinguish different EAR files. The deploy script always picks the EAR file with the most recent file date (i.e. the date which can be updated by using touch.) I just created a separate Maven EAR module and also used the build-number-plugin which Tim Kettler recommended. The build-number-plugin now creates an EAR file name like appname.ear_20070928.ear, i.e. it still appends a surplus .ear suffix. But since the version marker part of the EAR file's name is arbitrary, I can live with this. Thanks every one for helping me. Bye, Stefan -- View this message in context: http://www.nabble.com/maven-ant-tasks-2.0.7%3A-Hot-to-package-an-artifact--tf4527753s177.html#a12939367 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: How to package an artifact?
On Thu, September 27, 2007 8:09 pm, Stefan Prange wrote: there are two reasons. 1. I didn't want to create a new java project only to package an EAR file. Well, this reason is not quite cogent, I suppose. When using Maven one should engage with Maven's multi module approach. We relented and converted our ant based ejb+ear, to a maven ejb module, and a maven ear module. It was way simpler than trying to do it all in one go. It was also siginificantly quicker for developers too, as building the ejb doesn't involve the time wasting phase of building the ear file. 2. I want my EAR file named after a predefined pattern. It shall be name like appname.ear_timestamp, e.g. appname.ear_20070927. I tried to achieve this with Maven before (with build/finalname) but with no success. ANT allows me to name the resulting EAR file whatever I like. Is there a reason you want this particular pattern? What following the maven defaults buys you is that you get a whole lot of downstream functionality for free. We relented and let maven call our ear file my-project-ear-4.3.2.ear, and we had to tweak some code in our app accordingly to support this. We make releases of our code using the maven-release-plugin, which handles the tagging, the building and deploying to our internal maven repository for us, for free. If we had done the ear step with ant, then we would have been forced to do the tagging, building and deploying ourselves by hand, and we would have had to train each developer on the team how to support our proprietry methods themselves, a real headache. Instead in our case, each member of the team takes it in turn to act as release manager (to spread the knowledge), and they follow a relatively simple recipe to prepare and perform the release, not caring about the details - the details are maven's job. In our case, on a very complex system involving 5 multi module projects, about 20 artifacts (jars, ejbs, ears), and an Eclipse RCP application, can be formally released and made available in our repo beginning to end in 30 minutes. Thinking about this one of the key differences in using ant and maven is this: When using ant, the developer asks how do I do X?. When using maven, the developer asks how does maven do X. Maven already knows how to do stuff, but on condition you follow the conventions. Following the conventions in maven is in the vast majority of cases less work for you in the long run. Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven-ant-tasks-2.0.7: Hot to package an artifact?
Hi all, I'm building an artifact with a mixture of ANT and Maven. The artifact has the packaging type war but I need to have it wrapped also in an EAR file. Instead of creating a second EAR-Maven-Module I decided to have only one module with an additional ANT build.xml file. The ANT file should let Maven build the WAR and after that do the EAR wrapping. Now my question is: How can I use the maven-ant-tasks-2.0.7 to package the war, i.e. to say the equivalent of mvn package ? I tried the artifact:install .. task of the maven-ant-tasks-2.0.7 but this task doesn't process the maven build phases that precede the phase install. This means that it does not compile and package my artifact before it tries to install it to the local repo. Unfortunately, there is neither a artifact:compile .. nor a artifact:package .. task in the maven-ant-tasks-2.0.7. Here is my preliminary solution: I had to call mvn clean package via the command line i.e. via the exec ANT task. !-- This doesn't process all build phases before install. So the artifact doesn't get compiled and packaged :-( artifact:install file=${outWar} pom refid=pom.webapp / /artifact:install -- exec executable=cmd arg value=/c/ arg value=mvn/ arg value=clean/ arg value=package/ /exec Any suggestions for a better solution? Bye, Stefan -- View this message in context: http://www.nabble.com/maven-ant-tasks-2.0.7%3A-Hot-to-package-an-artifact--tf4527753s177.html#a12919154 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: Hot to package an artifact?
Hi, Stefan Prange schrieb: Hi all, I'm building an artifact with a mixture of ANT and Maven. The artifact has the packaging type war but I need to have it wrapped also in an EAR file. Instead of creating a second EAR-Maven-Module I decided to have only one module with an additional ANT build.xml file. The ANT file should let Maven build the WAR and after that do the EAR wrapping. Now my question is: How can I use the maven-ant-tasks-2.0.7 to package the war, i.e. to say the equivalent of mvn package ? You can't. The maven ant tasks enable you to use the maven dependency management features from ant, nothing more. I tried the artifact:install .. task of the maven-ant-tasks-2.0.7 but this task doesn't process the maven build phases that precede the phase install. This means that it does not compile and package my artifact before it tries to install it to the local repo. The install task is roughly equivalent to the maven install:install-file mojo. It will just install the given artifact to your local repository. Unfortunately, there is neither a artifact:compile .. nor a artifact:package .. task in the maven-ant-tasks-2.0.7. Why should there be? You have the standard ant tasks to do that. If you want to use ant to build your war, do that, but don't expect maven to magically do all the work for you. You will have to write your ant build files like for any other ant based project. Here is my preliminary solution: I had to call mvn clean package via the command line i.e. via the exec ANT task. !-- This doesn't process all build phases before install. So the artifact doesn't get compiled and packaged :-( artifact:install file=${outWar} pom refid=pom.webapp / /artifact:install -- exec executable=cmd arg value=/c/ arg value=mvn/ arg value=clean/ arg value=package/ /exec Any suggestions for a better solution? Yes. Decide on the build tool you want to use. If it's ant, write your build.xml and possibly use the maven ant tasks to do the dependency management for you. If you decide you want to use maven, set up your project the maven way and create distinct modules for the war and the ear. Bye, Stefan -Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: Hot to package an artifact?
On Thu, September 27, 2007 1:15 pm, Stefan Prange wrote: I'm building an artifact with a mixture of ANT and Maven. The artifact has the packaging type war but I need to have it wrapped also in an EAR file. Instead of creating a second EAR-Maven-Module I decided to have only one module with an additional ANT build.xml file. The ANT file should let Maven build the WAR and after that do the EAR wrapping. Is there a reason for this decision? The simplest way to handle ears and wars is to have the war as an artifact, and the ear as an artifact, and just let maven do everything for you. What does building the ear yourself buy you? Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: Hot to package an artifact?
While converting an existing project to use maven I ran into this issue. I needed to be able to provide a set of ant tasks that existed in the ant only version of the project. My solution was to create a general purpose ant macrodef that could be used to ensure a project module was up to date, run mvn install if needed, provide access to project related data such as classpath and artifact file paths. You can see this build.xml here: http://developer.ja-sig.org/source/browse/~raw,r=42472/jasigsvn/up2/trunk/build.xml Search for the maven-artifact-macro to see the raw macrodef and then below it you can see declarations of the macrodef for the specific modules in the project. The targets up at the top of the build make use of the specific macrodefs to ensure artifacts are built and up to date before doing there work. I'd me more than happy to answer questions about this approach which has been working very well for us to provide both maven goals and ant tasks. -Eric Graham Leggett wrote: On Thu, September 27, 2007 1:15 pm, Stefan Prange wrote: I'm building an artifact with a mixture of ANT and Maven. The artifact has the packaging type war but I need to have it wrapped also in an EAR file. Instead of creating a second EAR-Maven-Module I decided to have only one module with an additional ANT build.xml file. The ANT file should let Maven build the WAR and after that do the EAR wrapping. Is there a reason for this decision? The simplest way to handle ears and wars is to have the war as an artifact, and the ear as an artifact, and just let maven do everything for you. What does building the ear yourself buy you? Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: maven-ant-tasks-2.0.7: How to package an artifact?
Graham Leggett wrote: On Thu, September 27, 2007 1:15 pm, Stefan Prange wrote: Is there a reason for this decision? The simplest way to handle ears and wars is to have the war as an artifact, and the ear as an artifact, and just let maven do everything for you. What does building the ear yourself buy you? Hi Graham, there are two reasons. 1. I didn't want to create a new java project only to package an EAR file. Well, this reason is not quite cogent, I suppose. When using Maven one should engage with Maven's multi module approach. 2. I want my EAR file named after a predefined pattern. It shall be name like appname.ear_timestamp, e.g. appname.ear_20070927. I tried to achieve this with Maven before (with build/finalname) but with no success. ANT allows me to name the resulting EAR file whatever I like. So if someone knows a trick for solving the 2nd problem, I'd prefer a separate EAR module. Bye, Stefan -- View this message in context: http://www.nabble.com/maven-ant-tasks-2.0.7%3A-Hot-to-package-an-artifact--tf4527753s177.html#a12927151 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: How to package an artifact?
Tim Kettler wrote: How can I use the maven-ant-tasks-2.0.7 to package the war, i.e. to say the equivalent of mvn package ? You can't. The maven ant tasks enable you to use the maven dependency management features from ant, nothing more. Hi Tim, thanks for clarifying the purpose of the maven ant tasks. Seeing the task artifact:install made me hope for things like artifact:compile or artifact:package. That was a misunderstanding. Bye, Stefan -- View this message in context: http://www.nabble.com/maven-ant-tasks-2.0.7%3A-Hot-to-package-an-artifact--tf4527753s177.html#a12927205 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7: How to package an artifact?
Stefan Prange schrieb: Graham Leggett wrote: On Thu, September 27, 2007 1:15 pm, Stefan Prange wrote: Is there a reason for this decision? The simplest way to handle ears and wars is to have the war as an artifact, and the ear as an artifact, and just let maven do everything for you. What does building the ear yourself buy you? Hi Graham, there are two reasons. 1. I didn't want to create a new java project only to package an EAR file. Well, this reason is not quite cogent, I suppose. When using Maven one should engage with Maven's multi module approach. 2. I want my EAR file named after a predefined pattern. It shall be name like appname.ear_timestamp, e.g. appname.ear_20070927. I tried to achieve this with Maven before (with build/finalname) but with no success. ANT allows me to name the resulting EAR file whatever I like. So if someone knows a trick for solving the 2nd problem, I'd prefer a separate EAR module. What is you problem with build/finalname? Generating the timestamp? Have a look at the buildnumber-plugin [1]. Bye, Stefan -Tim [1] http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven Ant Tasks 2.0.7
Hi Hilco, Profiles are not supported yet in Maven Ant Tasks: if you need to define a repository, it has to be done in build.xml or pom.xml. And FYI, running ant -v adds information on which repositories are used. HTH regards, Hervé Le mercredi 5 septembre 2007, Hilco Wijbenga a écrit : Hi Hervé, I've created a set of files that show the problem. I hope I didn't miss any details below. :-) My settings.xml (~/.m2/settings.xml) has the following: settings xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd; profilesprofile activationactiveByDefaulttrue/activeByDefault/activation repositoriesrepository idMyRepo/id urlfile:///home/hwijbenga/maven-test/repository/url layoutdefault/layout /repository/repositories /profile/profiles /settings Furthermore, my project is as follows: my_project/lib/maven-ant-tasks-2.0.7.jar my_project/build.xml my_project/pom.xml repository/ my_parent_pom/pom.xml The following sequence of commands shows the problems (I haven't listed the output). in my_parent_pom: mvn deploy rm ~/.m2/repository/com/example (To make sure your local repository if empty.) in my_project: ant (This will fail.) mvn package (This will download the parent POM and succeed.) ant (This will now succeed.) The parent POM contains: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.example/groupId artifactIdpom/artifactId packagingpom/packaging version1.0/version nameParent POM/name distributionManagement repository idmyRepo/id urlfile:///home/hwijbenga/maven-test/repository/url /repository /distributionManagement /project The project POM: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion parent groupIdcom.example/groupId artifactIdpom/artifactId version1.0/version /parent groupIdcom.example/groupId artifactIdmy_project/artifactId packagingjar/packaging version0.1-SNAPSHOT/version nameMy Project/name /project And, finally, the build.xml: ?xml version=1.0 encoding=UTF-8? project xmlns:artifact=urn:maven-artifact-ant default=build target name=build typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpath pathelement location=lib/maven-ant-tasks-2.0.7.jar/ /classpath /typedef artifact:pom id=maven.project file=pom.xml/ artifact:dependencies verbose=true filesetId=maven-ant-tasks.dependency.fileset pom refid=maven.project/ artifact:remoteRepository id=remote url=file:///home/hwijbenga/maven-test/repository / /artifact:dependencies /target /project Cheers, Hilco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven Ant Tasks 2.0.7
Hi Hilco, Le mercredi 29 août 2007, Hilco Wijbenga a écrit : Hi all, I ran into something strange while using the Maven Ant Tasks (2.0.7). My Ant build now includes a POM which refers to a parent POM. If I have the parent POM available in my local repository everything works fine. If not, then the build fails because it can't download the parent POM. (If I use Maven instead of Maven Ant Tasks then it works regardless.) My settings.xml contains the remote repository's location and my build.xml contains: ?xml version=1.0 encoding=UTF-8? project xmlns:artifact=urn:maven-artifact-ant default=build target name=build typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpath pathelement location=lib/maven-ant-tasks-2.0.7.jar/ /classpath /typedef artifact:pom id=maven.project file=pom.xml/ artifact:dependencies verbose=true filesetId=maven-ant-tasks.dependency.fileset pom refid=maven.project/ artifact:remoteRepository id=remote url=http://maven.example.com/repository/ /artifact:dependencies /target /project Firstly, removing artifact:remoteRepository from build.xml fails the build. Apparently, settings.xml is ignored? Can you precise how you declared this repository in your settings.xml? Is it in a profile? Or is it a mirrorOf declaration? Or ...? If you run ant with -v option, you'll see more precisely what is done. Secondly, why doesn't it download the parent POM? It's in the same repository as the JARs and those *are* downloaded (provided I've installed the parent POM locally). Did you try not to use pom reference? Like: artifact:dependencies verbose=true filesetId=maven-ant-tasks.dependency.fileset pom file=pom.xml/ If you can create a testcase (with file:// remote repositories), it will be easier to help you. Hervé Cheers, Hilco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven Ant Tasks 2.0.7
Hi all, I ran into something strange while using the Maven Ant Tasks (2.0.7). My Ant build now includes a POM which refers to a parent POM. If I have the parent POM available in my local repository everything works fine. If not, then the build fails because it can't download the parent POM. (If I use Maven instead of Maven Ant Tasks then it works regardless.) My settings.xml contains the remote repository's location and my build.xml contains: ?xml version=1.0 encoding=UTF-8? project xmlns:artifact=urn:maven-artifact-ant default=build target name=build typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpath pathelement location=lib/maven-ant-tasks-2.0.7.jar/ /classpath /typedef artifact:pom id=maven.project file=pom.xml/ artifact:dependencies verbose=true filesetId=maven-ant-tasks.dependency.fileset pom refid=maven.project/ artifact:remoteRepository id=remote url=http://maven.example.com/repository/ /artifact:dependencies /target /project Firstly, removing artifact:remoteRepository from build.xml fails the build. Apparently, settings.xml is ignored? Secondly, why doesn't it download the parent POM? It's in the same repository as the JARs and those *are* downloaded (provided I've installed the parent POM locally). Cheers, Hilco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7 settings file read hangs at install-provider
Hi Hervé, That's great (bad) news! :) I'll check it out as soon as possible, which is likely to be the day after tomorrow when I get back to the office. Once I can determine that this fix is working, I'll respond to the issue. Thanks a lot for your help! Mykel On 8/10/07, Hervé BOUTEMY [EMAIL PROTECTED] wrote: Hi Mykel, Ok, I studied your case more deeply: you've just found a bug! :) For remote repositories defined in pom.xml, settings file is taken into account but not for remote repositories defined in build.xml... I filed a Jira issue, with a testcase and fix: http://jira.codehaus.org/browse/MANTTASKS-85 You'll find the modified tasks at http://codehaus.org/~hboutemy/maven-ant-tasks-2.0.7-MANTTASKS-85.jar Can you check that it fixes your problem? Then it should be released in 2.0.8. Hervé Le vendredi 10 août 2007, Mykel Alvis a écrit : Hervé, Sorry it took so long to get back to you about this. I've been out of the office and had trouble accessing the systems in question. Attached is my settings.xml that is used by 40+ developers daily with this. We do have a local firewall, but it definitely works with maven since we override central with our internal proximity instance. What appears to be the case is that the settings.xml isn't getting read prior to the attempt to acquire the provider, so it's trying (http://repo1.maven.org/maven2/) instead of (http://sirdsite/proximity/), but that's just a guess. Thanks again for your help, Mykel On 8/7/07, Hervé BOUTEMY [EMAIL PROTECTED] wrote: ok, settings.xml has been read, but the task is hanging when trying to download wagon-provider-api from central http://repo1.maven.org/maven2 Do you have direct internet access, or through a proxy? If through a proxy, how was it configured in settings.xml? Did you try your configuration with full Maven instead of Ant tasks? Le mardi 7 août 2007, Mykel Alvis a écrit : Hi Hervé, OK. I lied. It timed out after several minutes. I don't know why it would delay the 10 minutes it took before, but must recently it timed out in less than 4. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- My friends tell me I have an intimacy problem. But they don't really know me. -- Garry Shandling Anyone who has the power to make you believe absurdities has the power to make you commit injustices. -- Voltaire
Re: maven-ant-tasks-2.0.7 settings file read hangs at install-provider
Hi Mykel, Ok, I studied your case more deeply: you've just found a bug! :) For remote repositories defined in pom.xml, settings file is taken into account but not for remote repositories defined in build.xml... I filed a Jira issue, with a testcase and fix: http://jira.codehaus.org/browse/MANTTASKS-85 You'll find the modified tasks at http://codehaus.org/~hboutemy/maven-ant-tasks-2.0.7-MANTTASKS-85.jar Can you check that it fixes your problem? Then it should be released in 2.0.8. Hervé Le vendredi 10 août 2007, Mykel Alvis a écrit : Hervé, Sorry it took so long to get back to you about this. I've been out of the office and had trouble accessing the systems in question. Attached is my settings.xml that is used by 40+ developers daily with this. We do have a local firewall, but it definitely works with maven since we override central with our internal proximity instance. What appears to be the case is that the settings.xml isn't getting read prior to the attempt to acquire the provider, so it's trying (http://repo1.maven.org/maven2/) instead of (http://sirdsite/proximity/), but that's just a guess. Thanks again for your help, Mykel On 8/7/07, Hervé BOUTEMY [EMAIL PROTECTED] wrote: ok, settings.xml has been read, but the task is hanging when trying to download wagon-provider-api from central http://repo1.maven.org/maven2 Do you have direct internet access, or through a proxy? If through a proxy, how was it configured in settings.xml? Did you try your configuration with full Maven instead of Ant tasks? Le mardi 7 août 2007, Mykel Alvis a écrit : Hi Hervé, OK. I lied. It timed out after several minutes. I don't know why it would delay the 10 minutes it took before, but must recently it timed out in less than 4. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven-ant-tasks-2.0.7 settings file read hangs at install-provider
Hi all, I'm trying to make an example ant project for one of our teams who currently uses ant to do their builds. Relevant sections of build.xml target name=init tstamp format property=build.date pattern=[EMAIL PROTECTED] / /tstamp mkdir dir=${target.dir} / mkdir dir=${ target.classes} / mkdir dir=${target.gensrc} / mkdir dir=${target.dist} / mkdir dir=${lib} / /target target name=maven-setup depends=init description=Setup maven ant tasks, required for dependency resolution get src=${maven.ant.task.url} dest=${lib}/${ maven.ant.task.jar} usetimestamp=true / path id=maven-ant-tasks.classpath path=lib/${maven.ant.task.jar} / typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpathref= maven-ant-tasks.classpath / artifact:remoteRepository id=remote.public url=${url.public} / echo message=Installing Provider/ artifact:install-provider artifactId=wagon-webdav version= 1.0-beta-2 / echo message=Provider Installed/ /target build.properties - custom = true # Jarfile name of the maven ant tasks. Occasionally updates maven.ant.task.jar=maven-ant-tasks-2.0.7.jar # Local file location of maven ant tasks jar maven.ant.task.url=http://sirdsite/installs/maven-ant-tasks/${maven.ant.task.jar} # repo username for scp repository.username=localbuild # localtion of local private key repository.privatekey=${user.home}/.ssh/id_dsa url.public=http://sirdsite/proximity/repository/public url.codehaus=http://sirdsite/proximity/repository/codehaus # URL of remote snapshot. remote.snapshot.url=scp://sirdsite/var/www/html/m2repos remote.release.url=scp://sirdsite/var/www/html/m2repos/dst/release target.dir=target target.gensrc=target/generated-sources target.dist=target/dist target.classes=target/classes lib=lib src=src/main/java artifactOne=artifact1.jar artifactTwo=artifact2.jar When I execute this command, it seems to hang at reading my long-ish settings.xml [EMAIL PROTECTED] ExampleAntMavenProject]$ ant -v Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.5 in: /usr/java/jdk1.5.0_12/jre Detected OS: Linux parsing buildfile /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml with URI = file:///home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml Project base dir set to: /home/mykel/workspace-tutorial/ExampleAntMavenProject [property] Loading /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.properties Build sequence for target(s) `all' is [init, maven-setup, resolve-dependencies, compile, package, install, all] Complete build sequence is [init, maven-setup, resolve-dependencies, compile, package, install, all, deploy-subordinate, deploy-release, clean, deploy-snapshot, ] init: maven-setup: [get] Getting: http://sirdsite/installs/maven-ant-tasks/maven-ant-tasks-2.0.7.jar [get] To: /home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar [get] Not modified - so not downloaded parsing buildfile jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml with URI = jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml [echo] Installing Provider [artifact:install-provider] Using remote repositories: - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled [artifact:install-provider] Loading Maven settings file: /home/mykel/.m2/settings.xml and we wait. I cut the settings.xml down to just the bare minimum (the mirror setting for our proximity setup which keeps all the proxy/firewall issues away). No discernible effect. The wagon-provider is already installed in my local repo from various maven builds, so the need to d/l it seems off-kilter but this is an ant project so I dunno what's really supposed to happen here. Am I doing something wrong? MANTTASKS-6http://jira.codehaus.org/browse/MANTTASKS-6reports some element of this fixed, although that seems to be unrelated to an inability to read from my local settings file. I posted this same log as a comment to the fixed issue. -- My friends tell me I have an intimacy problem. But they don't really know me. -- Garry Shandling Anyone who has the power to make you believe absurdities has the power to make you commit injustices. -- Voltaire
Re: maven-ant-tasks-2.0.7 settings file read hangs at install-provider
Hi Mykel, There is something weird happenning: I don't understand why reading a file would hang. FYI, it's working perfectly in a number of places. We'll have to find what is so special in your case. Can you get a thread dump when ant freezes? On Linux, it's: kill -SIGQUIT pid Hervé Le mardi 7 août 2007, Mykel Alvis a écrit : Hi all, I'm trying to make an example ant project for one of our teams who currently uses ant to do their builds. Relevant sections of build.xml target name=init tstamp format property=build.date pattern=[EMAIL PROTECTED] / /tstamp mkdir dir=${target.dir} / mkdir dir=${ target.classes} / mkdir dir=${target.gensrc} / mkdir dir=${target.dist} / mkdir dir=${lib} / /target target name=maven-setup depends=init description=Setup maven ant tasks, required for dependency resolution get src=${maven.ant.task.url} dest=${lib}/${ maven.ant.task.jar} usetimestamp=true / path id=maven-ant-tasks.classpath path=lib/${maven.ant.task.jar} / typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpathref= maven-ant-tasks.classpath / artifact:remoteRepository id=remote.public url=${url.public} / echo message=Installing Provider/ artifact:install-provider artifactId=wagon-webdav version= 1.0-beta-2 / echo message=Provider Installed/ /target build.properties - custom = true # Jarfile name of the maven ant tasks. Occasionally updates maven.ant.task.jar=maven-ant-tasks-2.0.7.jar # Local file location of maven ant tasks jar maven.ant.task.url=http://sirdsite/installs/maven-ant-tasks/${maven.ant.tas k.jar} # repo username for scp repository.username=localbuild # localtion of local private key repository.privatekey=${user.home}/.ssh/id_dsa url.public=http://sirdsite/proximity/repository/public url.codehaus=http://sirdsite/proximity/repository/codehaus # URL of remote snapshot. remote.snapshot.url=scp://sirdsite/var/www/html/m2repos remote.release.url=scp://sirdsite/var/www/html/m2repos/dst/release target.dir=target target.gensrc=target/generated-sources target.dist=target/dist target.classes=target/classes lib=lib src=src/main/java artifactOne=artifact1.jar artifactTwo=artifact2.jar When I execute this command, it seems to hang at reading my long-ish settings.xml [EMAIL PROTECTED] ExampleAntMavenProject]$ ant -v Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.5 in: /usr/java/jdk1.5.0_12/jre Detected OS: Linux parsing buildfile /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml with URI = file:///home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml Project base dir set to: /home/mykel/workspace-tutorial/ExampleAntMavenProject [property] Loading /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.properties Build sequence for target(s) `all' is [init, maven-setup, resolve-dependencies, compile, package, install, all] Complete build sequence is [init, maven-setup, resolve-dependencies, compile, package, install, all, deploy-subordinate, deploy-release, clean, deploy-snapshot, ] init: maven-setup: [get] Getting: http://sirdsite/installs/maven-ant-tasks/maven-ant-tasks-2.0.7.jar [get] To: /home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar [get] Not modified - so not downloaded parsing buildfile jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml with URI = jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml [echo] Installing Provider [artifact:install-provider] Using remote repositories: - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled [artifact:install-provider] Loading Maven settings file: /home/mykel/.m2/settings.xml and we wait. I cut the settings.xml down to just the bare minimum (the mirror setting for our proximity setup which keeps all the proxy/firewall issues away). No discernible effect. The wagon-provider is already installed in my local repo from various maven builds, so the need to d/l it seems off-kilter but this is an ant project so I dunno what's really supposed to happen here. Am I doing something wrong? MANTTASKS-6http://jira.codehaus.org/browse/MANTTASKS-6reports some element of this fixed, although that seems to be unrelated to an inability to read from my local settings file. I posted this same log as a comment to the fixed issue. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-ant-tasks-2.0.7 settings file read hangs at install-provider
( DefaultArtifactResolver.java:185) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve( DefaultArtifactResolver.java:73) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively (DefaultArtifactResolver.java:294) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively (DefaultArtifactResolver.java:272) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively (DefaultArtifactResolver.java:243) at org.apache.maven.artifact.ant.InstallWagonProviderTask.doExecute( InstallWagonProviderTask.java:111) at org.apache.maven.artifact.ant.AbstractArtifactTask.execute( AbstractArtifactTask.java:522) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java :275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java :1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets( DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) VM Thread prio=1 tid=0x09834950 nid=0x6135 runnable VM Periodic Task Thread prio=1 tid=0xb2102108 nid=0x613b waiting on condition --- End of thread dump What else can I do to help? Mykel On 8/7/07, Hervé BOUTEMY [EMAIL PROTECTED] wrote: Hi Mykel, There is something weird happenning: I don't understand why reading a file would hang. FYI, it's working perfectly in a number of places. We'll have to find what is so special in your case. Can you get a thread dump when ant freezes? On Linux, it's: kill -SIGQUIT pid Hervé Le mardi 7 août 2007, Mykel Alvis a écrit : Hi all, I'm trying to make an example ant project for one of our teams who currently uses ant to do their builds. Relevant sections of build.xml target name=init tstamp format property=build.date pattern=[EMAIL PROTECTED] / /tstamp mkdir dir=${target.dir} / mkdir dir=${ target.classes} / mkdir dir=${target.gensrc} / mkdir dir=${target.dist} / mkdir dir=${lib} / /target target name=maven-setup depends=init description=Setup maven ant tasks, required for dependency resolution get src=${maven.ant.task.url} dest=${lib}/${ maven.ant.task.jar} usetimestamp=true / path id=maven-ant-tasks.classpath path=lib/${maven.ant.task.jar} / typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpathref= maven-ant-tasks.classpath / artifact:remoteRepository id=remote.public url=${url.public } / echo message=Installing Provider/ artifact:install-provider artifactId=wagon-webdav version= 1.0-beta-2 / echo message=Provider Installed/ /target build.properties - custom = true # Jarfile name of the maven ant tasks. Occasionally updates maven.ant.task.jar=maven-ant-tasks-2.0.7.jar # Local file location of maven ant tasks jar maven.ant.task.url=http://sirdsite/installs/maven-ant-tasks/${maven.ant.tas k.jar} # repo username for scp repository.username=localbuild # localtion of local private key repository.privatekey=${user.home}/.ssh/id_dsa url.public=http://sirdsite/proximity/repository/public url.codehaus=http://sirdsite/proximity/repository/codehaus # URL of remote snapshot. remote.snapshot.url=scp://sirdsite/var/www/html/m2repos remote.release.url=scp://sirdsite/var/www/html/m2repos/dst/release target.dir=target target.gensrc=target/generated-sources target.dist=target/dist target.classes=target/classes lib=lib src=src/main/java artifactOne=artifact1.jar artifactTwo=artifact2.jar When I execute this command, it seems to hang at reading my long-ish settings.xml [EMAIL PROTECTED] ExampleAntMavenProject]$ ant -v Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.5 in: /usr/java/jdk1.5.0_12/jre Detected OS: Linux parsing buildfile /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml with URI = file:///home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml Project base dir set to: /home/mykel/workspace-tutorial/ExampleAntMavenProject [property] Loading /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.properties Build sequence for target(s
Re: maven-ant-tasks-2.0.7 settings file read hangs at install-provider
) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData( LightweightHttpWagon.java:83) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile( DefaultWagonManager.java:462) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact (DefaultWagonManager.java:347) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact (DefaultWagonManager.java:302) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve( DefaultArtifactResolver.java:185) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve( DefaultArtifactResolver.java:73) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitiv ely (DefaultArtifactResolver.java:294) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitiv ely (DefaultArtifactResolver.java:272) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitiv ely (DefaultArtifactResolver.java:243) at org.apache.maven.artifact.ant.InstallWagonProviderTask.doExecute( InstallWagonProviderTask.java:111) at org.apache.maven.artifact.ant.AbstractArtifactTask.execute( AbstractArtifactTask.java:522) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java :275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java :1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets( DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) VM Thread prio=1 tid=0x09834950 nid=0x6135 runnable VM Periodic Task Thread prio=1 tid=0xb2102108 nid=0x613b waiting on condition --- End of thread dump What else can I do to help? Mykel On 8/7/07, Hervé BOUTEMY [EMAIL PROTECTED] wrote: Hi Mykel, There is something weird happenning: I don't understand why reading a file would hang. FYI, it's working perfectly in a number of places. We'll have to find what is so special in your case. Can you get a thread dump when ant freezes? On Linux, it's: kill -SIGQUIT pid Hervé Le mardi 7 août 2007, Mykel Alvis a écrit : Hi all, I'm trying to make an example ant project for one of our teams who currently uses ant to do their builds. Relevant sections of build.xml target name=init tstamp format property=build.date pattern=[EMAIL PROTECTED] / /tstamp mkdir dir=${target.dir} / mkdir dir=${ target.classes} / mkdir dir=${target.gensrc} / mkdir dir=${target.dist} / mkdir dir=${lib} / /target target name=maven-setup depends=init description=Setup maven ant tasks, required for dependency resolution get src=${maven.ant.task.url} dest=${lib}/${ maven.ant.task.jar} usetimestamp=true / path id=maven-ant-tasks.classpath path=lib/${maven.ant.task.jar} / typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpathref= maven-ant-tasks.classpath / artifact:remoteRepository id=remote.public url=${url.public } / echo message=Installing Provider/ artifact:install-provider artifactId=wagon-webdav version= 1.0-beta-2 / echo message=Provider Installed/ /target build.properties - custom = true # Jarfile name of the maven ant tasks. Occasionally updates maven.ant.task.jar=maven-ant-tasks-2.0.7.jar # Local file location of maven ant tasks jar maven.ant.task.url=http://sirdsite/installs/maven-ant-tasks/${maven.ant.t as k.jar} # repo username for scp repository.username=localbuild # localtion of local private key repository.privatekey=${user.home}/.ssh/id_dsa url.public=http://sirdsite/proximity/repository/public url.codehaus=http://sirdsite/proximity/repository/codehaus # URL of remote snapshot. remote.snapshot.url=scp://sirdsite/var/www/html/m2repos remote.release.url=scp://sirdsite/var/www/html/m2repos/dst/release target.dir=target target.gensrc=target/generated-sources target.dist=target/dist target.classes=target/classes lib=lib src=src/main/java artifactOne=artifact1
Re: [ANN] Maven Ant Tasks 2.0.7 Released
Problemet med settings.xml ser no ut til å vere fiksa i Maven Ant Tasks 2.0.7 - frå releasenotes: [MANTTASKS-6 http://jira.codehaus.org/browse/MANTTASKS-6] - ant artifact doesn't read settings.xml Frode 2007/7/6, Jason van Zyl [EMAIL PROTECTED]: The Apache Maven team would like to announce the availability of the Maven Ant Tasks 2.0.7. You can find the binaries here: http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-ant- tasks-2.0.7.jar You can find the release notes here: http://jira.codehaus.org/secure/ReleaseNote.jspa? projectId=11533styleName=Htmlversion=13521 Thanks, Jason -- Jason van Zyl Founder and PMC Chair, Apache Maven jason at sonatype dot com -- -- Mvh Frode
[ANN] Maven Ant Tasks 2.0.7 Released
The Apache Maven team would like to announce the availability of the Maven Ant Tasks 2.0.7. You can find the binaries here: http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-ant- tasks-2.0.7.jar You can find the release notes here: http://jira.codehaus.org/secure/ReleaseNote.jspa? projectId=11533styleName=Htmlversion=13521 Thanks, Jason -- Jason van Zyl Founder and PMC Chair, Apache Maven jason at sonatype dot com -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Maven Ant Tasks 2.0.7 Released
This is cool - very nice! I'm using ant for an existing project that doesn't fit the Maven 2 lifecycle, directory structure, one artifact per pom, and versioning coventions. But I still would like to use the Maven repository and dependencies. Antlib for maven looks like exactly what I need to use these features from inside the ant build. I had not seen this before. Is there a link to Antlib for Maven on the Maven documentation page? The FAQ[1] has a topic about Ant but doesn't mention Antlib for Maven[2]. It also doesn't mention how to build plugins with ant[3]. The latter is at least listed on the index-by-category page[4]. [1] http://maven.apache.org/general.html [2] http://maven.apache.org/ant-tasks.html [3] http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html [4] http://maven.apache.org/guides/index.html On 7/6/2007 9:20 AM, Jason van Zyl wrote: The Apache Maven team would like to announce the availability of the Maven Ant Tasks 2.0.7. You can find the binaries here: http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-ant-tasks-2.0.7.jar You can find the release notes here: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11533styleName=Htmlversion=13521 Thanks, Jason -- Jason van Zyl Founder and PMC Chair, Apache Maven jason at sonatype dot com -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]