Re: How to generate hash digests with Maven Assembly
Another approach to archive this is invoke Ant checksum task [1] through the Maven AntRun plug-in. This is much flexible way, because you can run it anywhere using antrun:run goal . Thanks, [1] - http://ant.apache.org/manual/CoreTasks/checksum.html [2] - http://maven.apache.org/plugins/maven-antrun-plugin/ On Tue, Nov 10, 2009 at 10:21 PM, Jamie Whitehouse wrote: > You can use the build helper plugin to attach additional artifacts to be > installed and deployed. This will mean that hashes will be created for > you. > > See > http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo. > html > > -Original Message- > From: Steve Brannstrom [mailto:steveb...@gmail.com] > Sent: Tuesday, November 10, 2009 4:19 AM > To: Maven Users List > Subject: Re: How to generate hash digests with Maven Assembly > > Thanks for the reply. But we have .zip and .tar.gz archives and AFAIK > not possible to deploy them to a repository, hence I don't think this > approach will wok for us. It is great if we can generate those digests > with Assembly plug-in or with any other way using maven. > > Thanks, > > On 11/10/09, Anders Hammar wrote: >> One way is if you use a repository manager (Nexus for instance), it >> will be generated for you when deploying. >> >> /Anders >> >> On Tue, Nov 10, 2009 at 09:52, Steve Brannstrom > wrote: >> >>> Hi friends , >>> >>> We use Maven Assembly plug-in to create the binary and source >>> archives in .zip, .tar.gz formats . We also want to generate hash >>> digests such as md5, sha1 for those archives . Is there any way to >>> achieve this using Maven Assembly plug-in ? If not please provide a > >>> pointer to achieve this using Maven ? >>> >>> >>> Thanks , >>> >>> -Steve >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>> >> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > > --- > CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain > confidential and proprietary information of Alcatel-Lucent and/or its > affiliated entities. Access by the intended recipient only is authorized. Any > liability arising from any party acting, or refraining from acting, on any > information contained in this e-mail is hereby excluded. If you are not the > intended recipient, please notify the sender immediately, destroy the > original transmission and its attachments and do not disclose the contents to > any other person, use it for any purpose, or store or copy the information in > any medium. Copyright in this e-mail and any attachments belongs to > Alcatel-Lucent and/or its affiliated entities. > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://people.apache.org/~sagara - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Filtering different test cases according to the profile
any pointer for this ? On Thu, May 14, 2009 at 10:52 PM, Sagara Gunathunga wrote: > Hi all, > In my project I want to run some Test cases only with Java 1.4 , in > Java 5 I don't want to run these specific set of test cases , AFAIK I > can create two Maven profile for java 1.4 and Java 5 along with > maven-compiler-plugin , but I'm not sure how can filter different test > cases according to each profile , generally it will run all the test > cases available on project test directory . Can any one provide any > clue .? > > > Thanks , > > > > Sagara Gunathunga > > Blog - ssagara.blogspot.com > Web - http://sagaras.awardspace.com/ > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Filtering different test cases according to the profile
Hi all, In my project I want to run some Test cases only with Java 1.4 , in Java 5 I don't want to run these specific set of test cases , AFAIK I can create two Maven profile for java 1.4 and Java 5 along with maven-compiler-plugin , but I'm not sure how can filter different test cases according to each profile , generally it will run all the test cases available on project test directory . Can any one provide any clue .? Thanks , Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Using archetype:generate with internal repository
Hi Shahzad, Do you have archetype-catalog.xml file on your internal repository ? ,it is required to have a archetype-catalog.xml file to get Archetype information for Maven Archetype Plug-in. please see the [1] [1] - http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-catalog.html Thanks , On Tue, Mar 17, 2009 at 12:07 AM, Qureshi,Shahzad [Ontario] wrote: > Hi all, > > I am having difficulty using archetype:generate plugin where I want it > to use an archetype stored in our internal repository. I was able to do > so using archetype:create plugin. I've a settings.xml in .m2 directory > and that's where archetype:create reads the internal repository > information but archetype:generate doesn't seem to do that. > > I tried using -DarchetypeRepository but I probably am not entering the > internal repository url properly. This is what I am typing and I am > getting Build Error because it can't find my archetype > > mvn archetype:generate -DarchetypeArtifactId=default-archetype > -DarchetypeGroupId=default-archetype -DarchetypeVersion=1.0 > -DarchetypeRepository=http://serveraddress/Intranet/maven-repo > > http://serveraddress/Intranet/maven-repo is where archetype-default > archetype is residing > > Any ideas? > > thanks > > Shahzad Qureshi > Systems Analyst/Programmer > Applications Directorate, CIOB > Environment Canada > shahzad.qure...@ec.gc.ca > > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Downloading resource files with Maven
Hi all , I want to download some resource files from a remote location during my Maven build before execute test phase , is there any plug-in or any way to achieve this ...? I couldn't find way to do this with Maven Resources plug in, but in Ant Get Task [1] provide this feature. [1] - http://ant.apache.org/manual/CoreTasks/get.html Thanks , -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to assign a name for new archetype instead of "unnamed"
Hi, Anyone have any ideas on how to do this .? On 3/6/09, Sagara Gunathunga wrote: > Hi all , > I have created a my own archetype , then add the archetype to my > local catalog using " mvn archetype:update-local-catalog" command , it > worked fine , when i call "mvn archetype:generate > -DarchetypeRepository=local" it will show a list of archetype and my > archetype also there ,but my archetype is listed as "unnamed" ( > please refer following list) . How can i set a name for my archetype > so that it will display that name instead of "unnamed" ..? > > > > Choose archetype: > 1: local -> myquickstart (Unnamed - org.my:myquickstart:jar:1.0.0) > 2: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web > application with Hibernate, Spring and JSF) > 3: internal -> appfuse-basic-spring (AppFuse archetype for creating a > web application with Hibernate, Spring and Spring > MVC) > > > > Thanks , > > > -- > Sagara Gunathunga > > Blog - ssagara.blogspot.com > Web - http://sagaras.awardspace.com/ > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to assign a name for new archetype instead of "unnamed"
Hi all , I have created a my own archetype , then add the archetype to my local catalog using " mvn archetype:update-local-catalog" command , it worked fine , when i call "mvn archetype:generate -DarchetypeRepository=local" it will show a list of archetype and my archetype also there ,but my archetype is listed as "unnamed" ( please refer following list) . How can i set a name for my archetype so that it will display that name instead of "unnamed" ..? Choose archetype: 1: local -> myquickstart (Unnamed - org.my:myquickstart:jar:1.0.0) 2: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 3: internal -> appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) Thanks , -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-antrun-plugin
Hi Ketan, you need to define your Build.xml file under the the configuration as follows. Hello World ANT "run" is a target defined in Build.xml file that will execute by maven-antrun-plugin , hope this will help you Thanks , On Thu, Feb 26, 2009 at 11:47 AM, Ketan Khairnar wrote: > Hi All, > I am new to maven and some of the tasks are better written in ant compared > to maven and hence I needed to use maven-antrun-plugin. > > Ant-run plugin shows following lines on command line > > [INFO] [antrun:run] > [INFO] Executing tasks > [INFO] Executed tasks > > > But Its not executing tasks defined in the build xml which is in the same > directory of pom.xml. > > Here is the plugin snippet from pom xml of the project > > > >maven-antrun-plugin >1.3 > > >compile > > > refid="maven.compile.classpath" /> > refid="maven.runtime.classpath" /> > refid="maven.test.classpath" /> > refid="maven.plugin.classpath" /> > > > >message="test classpath: > ${test_classpath}" /> >message="plugin classpath: > ${plugin_classpath}" /> > > > > >run > > > > > > > Deault plugin version was 1.1. I changed it to newer version but still it > didnt work > > any help/pointers? > > regards, > Ketan > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to execute Java task within a Archetype
Hi Adam, Thanks again , I want to run a HTTP server within the generate goal and then genarate some HTTPClient codes , these client codes depend on the running HTTP server ,and not possible to package within the archetype as templates. I don't think hack the source code is a good choice here , because other people cant use my archetype with official Maven2 distro , so it seems like post process the custom task in to the new project's scope is the only solution here . I will try to achieve this as a plug-in . Thanks , On Wed, Feb 25, 2009 at 2:23 PM, Adam Leggett wrote: > >> how can enforce Maven to execute custom task with " "mvn >> archetype:generate "..? >> > > generate is a goal of the archetype plug-in; AFAIK, you will need to > either hack the source code of the archetype plug-in itself to execute > some additional steps as part of the goal execution or post process the > generated project as indicated in my previous response. > > What exactly is your requirement here? What does your additional step > need to do? > > -- > Adam Leggett > BuildFactory Principal Architect > UPCO > Office: 0113 20 10 600 > Direct Line: 0113 20 10 631 > Mobile: 07801 269056 > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to execute Java task within a Archetype
HI all, Adam , thanks for your comments , it seems like maven-antrun-plugin could use for this , but still I don't have exact idea how can I use it with my scenario, here I describe what I have done and what I expect to do in details I create a Maven project to create a archetype called "myquickstart" according to [1] , this is the archetype.xml file for that. myquickstart src/main/java/SimpleService.java src/test/java/AppTest.java src/main/webapp/WEB-INF/web.xml and this is the POM file for "myquickstart" project. 4.0.0 my myquickstart 1.0.0 running "mvn install " build and install myquickstart archetype in to my local repo, then I can use "mvn archetype:generate -DarchetypeGroupId=my -DarchetypeArtifactId=myquickstart -DarchetypeVersion=1.0.0 " to create a sample project successfully . But this will copy source and resources files from archetype to new project directory as I described in archetype.xml , what I expect to do is , in addition to these things run a java method automatically when I use "mvn archetype:generate " command as above to create new projects using myquickstart archetype. I'm not sure where I have to define Ant task ...? is it possible to define such custom task within my archetype.xml file ...? otherwise how can enforce Maven to execute custom task with " "mvn archetype:generate "..? Thanks , On Tue, Feb 24, 2009 at 10:59 PM, Adam Leggett wrote: > There are a number of ways to do this. A shell script is one option that > springs to mind. > For a simple 'pure' Maven approach that doesnt require you to write much > code you could try something like this > > A pom (make sure you rename it to bootstrap.xml or some such) - > > > 4.0.0 > com.acme > project-gen > pom > 1.0-SNAPSHOT > > ${genArtifactId} > > >maven-antrun-plugin > > >process-resources > > run > > > > > > > > > > >maven-archetype-plugin > > >generate-resources > > create > > >${genGroupId} >${genArtifactId} > > > > > > > > > Combined with the following command line: > > mvn clean process-resources -DgenArtifactId=test-project > -DgenGroupId=com.acme -f bootstrap.xml > > Should create you a basic quickstart project in a relative folder named > [genArtifactId] > > You will need to invoke your Java 'method' via the antrun plugin. > > On Tue, 2009-02-24 at 14:49 +0100, Nick Stolwijk wrote: >> First, the create goal has been deprecated, you can better use the >> generate goal. >> >> Second, the documentation[1] says that it runs the "generate-sources" >> before executing, so maybe it is possible to add your own plugin >> there. Unfortunately, I don't know how it can be done and I can't find >> any documentation or examples. Can someone more knowledgeable share >> his insights? >> >> [1] http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo.html >> >> Hth, >> >> Nick Stolwijk >> ~Java Developer~ >> >> Iprofs BV. >> Claus Sluterweg 125 >> 2012 WS Haarlem >> www.iprofs.nl >> >> >> >> On Tue, Feb 24, 2009 at 10:47 AM, Sagara Gunathunga >> wrote: >> > Hi all >> > >> > AFAIK when execute "archetype:create" command , the archetype copy the >> > folder structure with resources according to the archetype's >> > archetype.xml file . I want to execute a custom Java method in >> > addition to above default behaviour along with "archetype:create" >> > command . Is there any way to achieve this ? if so please update >> > me with some references . >> > >> > >> > >> > Thanks , >> > >> > >> > Sagara Gunathunga >> > >> > Blog - http://ssagara.blogspot.com >> > Web - http://sagaras.awardspace.com/ >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> > For additional commands, e-mail: users-h...@maven.apache.org >> > >> > >> >> -
How to execute Java task within a Archetype
Hi all AFAIK when execute "archetype:create" command , the archetype copy the folder structure with resources according to the archetype's archetype.xml file . I want to execute a custom Java method in addition to above default behaviour along with "archetype:create" command . Is there any way to achieve this ? if so please update me with some references . Thanks , Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
problem ruining new archetype
Hi, For one of our framework , I need to create a specific archetype so that it will simplify the creation processes of new project , I try to follow procedure describe in [1] with the a sample archetype project . It worked fine and installed new archetype in to my local M2 repo also . but when I try to use that archetype it gave some errors . [1] http://maven.apache.org/guides/mini/guide-creating-archetypes.html I try for this mvn archetype:create -DarchetypeGroupId=my -DarchetypeArtifactId=quickstart -DarchetypeVersion=1.0.0 -DgroupId=my.groupid -DartifactId=my-artifactId then got following error . [INFO] Failed to resolve artifact. GroupId: my ArtifactId: quickstart Version: 1.0.0 Reason: Unable to locate resource in repository It seems new archetype is not installed properly , so I installed it several times with the command provided with error message ( mvn install:install-file ) and I notice new archetype available on my local repo with correct folder format too. Do I have upload new archetype in to any remote M2 repo in order to use it ? we don't have any internal remote M2 repo , so is there any way to solve this only using my local repo ? Any suggestions? Thanks , -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/
problems with Maven archetype
rden of creating a new application based with ADF) 26: internal -> data-app (A new Databinder application with sources and resources.) 27: internal -> jini-service-archetype (Archetype for Jini service project creation) 28: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype) 29: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype) 30: internal -> softeu-archetype-jsf (JSF+Facelets Archetype) 31: internal -> jpa-maven-archetype (JPA application) 32: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype) 33: internal -> confluence-plugin-archetype (Atlassian Confluence plugin archetype) 34: internal -> maven-archetype-har (Hibernate Archive) 35: internal -> maven-archetype-sar (JBoss Service Archive) 36: internal -> wicket-archetype-quickstart (A simple Apache Wicket project) Choose a number: (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36): Thanks , Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]