RE: How to run a maven goal when there is tests failures?
- One has to write custom goal and attach to the test phase of maven build life cycle. Goal checks if test failure and do the action. http://maven.apache.org/guides/plugin/guide-java-plugin-development.html Regards, Yuvaraj -Original Message- From: Xavier S. [mailto:xavier.seign...@gmail.com] Sent: Tuesday, January 10, 2012 5:45 PM To: Maven Users List Subject: How to run a maven goal when there is tests failures? Hello, I would like to know if there is a way to execute a goal when there is test failures? Since maven stops its execution (fail fast mode) after encountering a test failure, is there any options to launch a goal between that test failure and he stop of maven? Regards, Xavier.
RE: Using Maven with custom libraries which are not in repository.
Prashant, If those libraries are standard and well known then should be available at some maven repository. You can try http://mvnrepository.com to find it out. Generally, you should setup your own repository may be using artifactory and put all dependencies there. Requirement is maven should able to access those jars while build, once artifact is ready it will contain required jars, thus complete deployable. Hope this helps! Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Prashant Neginahal [mailto:prashu.n...@gmail.com] Sent: Thursday, September 29, 2011 12:14 PM To: Maven Users List Subject: Using Maven with custom libraries which are not in repository. Hi All, We are starting new web project. But, it has to be built on some proprietary web framework which is NOT mavenised and comes with its own bunch of libraries. I am thinking of using maven for this application development. But, just wondering how to ensure maven uses this proprietary framework and its libraries which are not there in repository. Can we just dump framework libraries in WEB_INF/lib folder and maven includes the same in its CLASSPATH. Thanks, Prashant - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: XML files are not getting included while compiling the source
All resources should be under src/main/resources. Well, however for any odd case one can use resources plug-in to explicitly copy/exclude resources OR for War packaged project webresources configuration should also do the same. http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology – Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Benson Margulies [mailto:bimargul...@gmail.com] Sent: Thursday, August 25, 2011 5:09 PM To: Maven Users List Subject: Re: XML files are not getting included while compiling the source On Thu, Aug 25, 2011 at 7:37 AM, anamika gupta wrote: > I have many XML files in src/main/java directory and its sub directory. When > I > run "mvn compile", these XML files will not be copied to the > target/classes XML files belong in src/main/resources, not src/main/java. > > -- > View this message in context: > http://maven.40175.n5.nabble.com/XML-files-are-not-getting-included-while-compiling-the-source-tp4734115p4734115.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > - > 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
RE: EAR Creation
Well, this seems to me little bit odd. Anyways, I believe you should have multi-module maven structure project. Where, one of the modules/parent has EAR packaging and depends on other modules (one of them then would have war packaging). For example, 1. You have a Parent POM which defines modules may be like: Module-EAR Module-War 2. POM of Module EAR would have packaging as EAR and defines dependency of Module-War. 3. POM of Module War would have packaging as WAR. Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: anamika gupta [mailto:anam...@hcl.com] Sent: Tuesday, August 23, 2011 10:23 AM To: users@maven.apache.org Subject: EAR Creation Hi, I have to create the ear file of an application which consists a war file of the same application. Can you please tell me what entries to write in pom.xml so that it creates the war file of the module and then package the same war file into the ear file. Any help would be greatly appreciated -- View this message in context: http://maven.40175.n5.nabble.com/EAR-Creation-tp4725469p4725469.html Sent from the Maven - Users mailing list archive at Nabble.com. - 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
RE: Skip Resources for War
Well, need to add ${basedir}/src/main/resources under resources, else it gives NullPointer. I tried again and now its working. No clue why it wasn't working earlier. Thanks Martin. Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Wednesday, July 06, 2011 5:45 PM To: users@maven.apache.org Subject: RE: Skip Resources for War org.apache.maven.plugins maven-war-plugin **/*.* http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html does this not work for you? Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: yuvaraj.vanar...@synechron.com > To: users@maven.apache.org > Date: Wed, 6 Jul 2011 06:46:41 -0500 > Subject: RE: Skip Resources for War > > Yeah. > > > > I tried using: > > > > > > src/main/resources > > false > > > > **/*.* > > > > > > Under build tag. It does avoid copying files into target/classes directory, > however built War file does have them under WEB-INF/classes. > > > > Using: > > > > > > > > ${basedir}/src/main/resources > > > > **/*.* > > > > > > > > > > Inside War plug-in configuration doesn't help either. > > > > Any suggestions? > > > > > > Regards, > > Yuvaraj > > > > Yuvaraj Vanarase, > > Lead Technology - Software > > Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | > http://www.synechron.com > > SYNECHRON - > > - Top 10 Best IT Employers for 4 consecutive years (link). > > - Celebrating 10 Years! > > > > -Original Message- > From: Antonio Petrelli [mailto:antonio.petre...@gmail.com] > Sent: Wednesday, July 06, 2011 3:26 PM > To: Maven Users List > Subject: Re: Skip Resources for War > > > > 2011/7/6 Yuvaraj Vanarase > > > > > I have few XML files under src/main/resources. The project packging is War. > > > I would like to avoid these files getting into War file. I could exclude > > > them from being part of target/classes by using resources & exclude inside > > > build tag. > > > Any clue how to skip them for war? > > > > > > > Resources in src/main/resources will be put in WEB-INF/classes and they can > > be excluded like you did for Jar-packaged projects. > > Did you try it? Didn't it work? > > > > Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Skip Resources for War
Yeah. I tried using: src/main/resources false **/*.* Under build tag. It does avoid copying files into target/classes directory, however built War file does have them under WEB-INF/classes. Using: ${basedir}/src/main/resources **/*.* Inside War plug-in configuration doesn't help either. Any suggestions? Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Antonio Petrelli [mailto:antonio.petre...@gmail.com] Sent: Wednesday, July 06, 2011 3:26 PM To: Maven Users List Subject: Re: Skip Resources for War 2011/7/6 Yuvaraj Vanarase > I have few XML files under src/main/resources. The project packging is War. > I would like to avoid these files getting into War file. I could exclude > them from being part of target/classes by using resources & exclude inside > build tag. > Any clue how to skip them for war? > Resources in src/main/resources will be put in WEB-INF/classes and they can be excluded like you did for Jar-packaged projects. Did you try it? Didn't it work? Antonio
Skip Resources for War
Hi, I have few XML files under src/main/resources. The project packging is War. I would like to avoid these files getting into War file. I could exclude them from being part of target/classes by using resources & exclude inside build tag. Any clue how to skip them for war? Well, copying them into some external resources directory would solve the purpose, however if to be done with present settings. Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link<http://www.synechron.com/news/news_best_employer_sep2010.htm>). - Celebrating 10 Years!
RE: Use the eclipse compiler in a maven component
Use inside POM: org.apache.maven.plugins maven-compiler-plugin 1.6 1.6 128m 512m Set same java version in eclipse for compilation. Also, modify build path of eclipse project to set output directory as 'target'. Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Romain Thouvenin [mailto:romain.thouve...@gmail.com] Sent: Thursday, June 23, 2011 10:12 PM To: users@maven.apache.org Subject: Use the eclipse compiler in a maven component Hello, I am working on a fairly big maven project, and develop in Java with Eclipse. To save compilation time, I would like that maven and eclipse share the same target, which I managed to do. However when I compile with maven, Eclipse lacks some stuff that it puts in the bytecode, so it recompiles everything (from what I understood). To solve this, I thought I would ask maven to use the same compiler as eclipse. After some search on the web, I found out I could add this in the top pom: ... ... org.apache.maven.plugins maven-compiler-plugin eclipse 1.5 1.5 true org.codehaus.plexus plexus-compiler-eclipse 1.8.1 This seems to work, but the build fails fairly quickly with lots of errors, while it succeeds with javac. I'm not sure why, but it seems that there is some conflicts linked to the fact the failing java files are generated files. So I thought I could try to use the eclipse compiler only for the component I am working on (which does not have that kind of generated files). I added the above snippet in the pom of my component, but when the build reaches my component, the following error is raised: No such compiler 'eclipse' I also tried to add the plexus-compiler-eclipse dependency in the dependencies listed in the top pom, but same error. Do you know if what I am trying to do is possible? Any hint of how I can do it? Sorry if the question seems dumb, I am not a maven expert, and I am not the one who designed the whole maven architecture of our project. And sorry for the long message, I wanted to give the whole context... Thanks a lot for your help! Romain - 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
RE: generated artifact name
Thanks Nick. Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology – Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Nick Stolwijk [mailto:nick.stolw...@gmail.com] Sent: Thursday, June 23, 2011 8:43 PM To: Maven Users List Subject: Re: generated artifact name The name in your target directory is defined by the finalName in your build section[1]. [1] http://maven.apache.org/pom.html#Build_Settings Hth, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Thu, Jun 23, 2011 at 5:08 PM, Yuvaraj Vanarase wrote: > Anyone has any clue? > > Regards, > Yuvaraj > > Yuvaraj Vanarase, > Lead Technology - Software > Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 > | http://www.synechron.com > SYNECHRON - > - Top 10 Best IT Employers for 4 consecutive years (link). > - Celebrating 10 Years! > > > -Original Message- > From: Yuvaraj Vanarase [mailto:yuvaraj.vanar...@synechron.com] > Sent: Thursday, June 23, 2011 3:00 PM > To: users@maven.apache.org > Subject: generated artifact name > > Hi, > > Sometimes I observed that jar/ear artifact created under target directory > after maven install/package goal doesn't have version in its name. Well, > while installing it does install to correct directory structure under local > repository. > > E.g. > > abc > com.xyz > 1.0.0 > > Creates abc.ear instead of abc-1.0.0.ear (or jar if jar is the packaging). > > Regards, > Yuvaraj > > Yuvaraj Vanarase, > Lead Technology - Software > Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | > http://www.synechron.com > SYNECHRON - > - Top 10 Best IT Employers for 4 consecutive years > (link<http://www.synechron.com/news/news_best_employer_sep2010.htm>). > - Celebrating 10 Years! > > > - > 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
RE: generated artifact name
Anyone has any clue? Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link). - Celebrating 10 Years! -Original Message- From: Yuvaraj Vanarase [mailto:yuvaraj.vanar...@synechron.com] Sent: Thursday, June 23, 2011 3:00 PM To: users@maven.apache.org Subject: generated artifact name Hi, Sometimes I observed that jar/ear artifact created under target directory after maven install/package goal doesn't have version in its name. Well, while installing it does install to correct directory structure under local repository. E.g. abc com.xyz 1.0.0 Creates abc.ear instead of abc-1.0.0.ear (or jar if jar is the packaging). Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link<http://www.synechron.com/news/news_best_employer_sep2010.htm>). - Celebrating 10 Years! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
generated artifact name
Hi, Sometimes I observed that jar/ear artifact created under target directory after maven install/package goal doesn't have version in its name. Well, while installing it does install to correct directory structure under local repository. E.g. abc com.xyz 1.0.0 Creates abc.ear instead of abc-1.0.0.ear (or jar if jar is the packaging). Regards, Yuvaraj Yuvaraj Vanarase, Lead Technology - Software Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com SYNECHRON - - Top 10 Best IT Employers for 4 consecutive years (link<http://www.synechron.com/news/news_best_employer_sep2010.htm>). - Celebrating 10 Years!
maven release dryRun
Hi, I have observed that using maven release with dryRun is true, I can not suppress the test class execution. Any body has idea how to do it? I am using maven 2.2.1 Regards, Yuvaraj yuvar...@synechron.com | Desk-+91-20.4026 2000 Ext. 2305 | Mobile-+91 9850818870