RE: Unwanted jars getting copied
Thanks Hilco for the reply. We are using war plugin also; plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration webXmlconf/web.xml/webXml webappDirectorytarget/work/outbound/webappDirectory /configuration /plugin But it does not copy all the required jars into war so additionally we are using below dependency. Thanks, Amol -Original Message- From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com] Sent: Monday, February 28, 2011 10:39 PM To: Maven Users List Cc: Fuke, Amol Subject: Re: Unwanted jars getting copied On 28 February 2011 06:53, Fuke, Amol amol.fuke...@nielsen.com wrote: I am using below snippet to copy dependant jars from lib to war. But this also copying some unwanted jars like rt.jar and tools.jar. Is there any way I exclude them from getting copied into my war. plugin artifactIdmaven-dependency-plugin/artifactId executions execution phaseinstall/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/lib/outputDirectory /configuration /execution /executions /plugin Why don't you simply use the Maven WAR Plugin?
M2 how to switch to wagon-ssh 1.0-beta-6
In maven2 How do I upgrade to wagon-ssh 1.0-beta-6 I added the following to my pom.xml dependency groupIdorg.apache.maven.wagon/groupId artifactIdwagon-ssh/artifactId version1.0-beta-7/version /dependency It downloads beta-6 but the build still uses beta-2 What am I missing? --joe
Re: M2 how to switch to wagon-ssh 1.0-beta-6
Try in build extensions extension groupIdorg.apache.maven.wagon/groupId artifactIdwagon-ssh/artifactId version1.0-beta-7/version /extension /extensions ... HTH, -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy 2011/3/1 Joseph Argiro joseph.arg...@idt.net: In maven2 How do I upgrade to wagon-ssh 1.0-beta-6 I added the following to my pom.xml dependency groupIdorg.apache.maven.wagon/groupId artifactIdwagon-ssh/artifactId version1.0-beta-7/version /dependency It downloads beta-6 but the build still uses beta-2 What am I missing? --joe - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to gain the new class every time?
Hi, thaks for your reply! On Tue, Mar 1, 2011 at 11:24 AM, MK Tan mktan...@gmail.com wrote: The simple answer is you can't. This is because you are deleting a file but those remaining files have not been modified. It is always a good idea to have a clean build once you delete a source file. So that obsolete class is not polluted you build. On Tue, Mar 1, 2011 at 11:15 AM, jy hu huj...@gmail.com wrote: Hi everyone, I met a problem in maven. for example , there is a project including 7 java files. I will gain 7 class files after executing the Mvn compile in cmd. and then I deleted or removed a java file of all, the rest 6 java files had not been changed in the project. I executed Mvn compile again, ' Nothing to compile - all classes are up to date' was gaven. 7 class files which came from the first time were in Class folder. I would have 6 new class files of course If executing the Mvn clean before running the Mvn compile. So my question is how can I gain the new class every time without Mvn clean. Does any hint? many thanks! -- ** *Warm wishes,* *Jaina(hu jun ying)* -- ** *Warm wishes,* *Jaina(hu jun ying)*
Customizing Maven Archetype Descriptor
Hi All, I have implemented a custom archetype and I have configured to accept a new property testParam via requiredProperty as well. I have several templates and my requirement is to create a new project with *ONLY* one of these templates depending on the value user passes for testParam. Has any one done this before? Can we do this using Maven? Can we customize fileSet element in the Archetype descriptor(archetype-metadata.xml) to get this done? Highly appreciate any reference on this. Thanks and Regards, Harshana -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
Stop escaping html tags when generating surefire xml report
Hi all, Currently we are using JUnit Maven surefire plugin to generate html report. But we want to insert screenshot link in the error message just like the following: com.thoughtworks.selenium.SeleniumException: Timed out after 12ms SCREENSHOT http://maven.40175.n5.nabble.com/file/n3404665/screenshot1.JPG screenshot1.JPG But currently we are getting something like: com.thoughtworks.selenium.SeleniumException: Timed out after 12ms C:/image.png SCREENSHOT http://maven.40175.n5.nabble.com/file/n3404665/screenshot2.JPG screenshot2.JPG Which shows that the html tags were escaped before generating the html report, and then I looked back the TEST-*.xml files and found that the html tags were escaped in the xml file too. So, does anyone have any idea on the following questions? 1. When and who escaped the html tags on generating the xml report? 2. Does the xml be escaped again when it is generated to html report? 3. Is there a solution to make some configurations to disable the escaping? It seems that TestNG can config the escaping output option just like the following: xmlfileset dir=${basedir} includes=testng.xml/ sysproperty key=org.uncommons.reportng.escape-output value=false/ -- View this message in context: http://maven.40175.n5.nabble.com/Stop-escaping-html-tags-when-generating-surefire-xml-report-tp3404665p3404665.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
RE: Unwanted jars getting copied
Hi Hilco , Removed the target/work/outbound. Thanks for that. Also is there any way we can replace hard coding with variable names? I have below code and I want server path with variables. target delete includeEmptyDirs=true dir=C:/Tomcat6/webapps/outbound / copy file=${project.build.directory}/outbound-1.0-SNAPSHOT.war tofile=C:/Tomcat6/webapps/outbound.war / /target Thanks, Amol -Original Message- From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com] Sent: Tuesday, March 01, 2011 11:12 AM To: Fuke, Amol Cc: Maven Users List Subject: Re: Unwanted jars getting copied On 1 March 2011 05:29, Fuke, Amol amol.fuke...@nielsen.com wrote: Thanks Hilco for the reply. We are using war plugin also; plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration webXmlconf/web.xml/webXml webappDirectorytarget/work/outbound/webappDirectory /configuration /plugin But it does not copy all the required jars into war so additionally we are using below dependency. That seems highly unlikely unless you're not listing those required JARs as dependencies? P.S. Unless you have a specific reason to use target/work/outbound, I would suggest you go with the default. Less to maintain means less work. :-)
Re: c++ native-maven-plugin redundant linking at second run problem
Both compile and link are hooked into maven compile phase. Normally the native compile should get by very quickly since no code changes. The link phase still have to rebuild. Currently there is no work around. Thank you, Dan. What about NAR plugin - does this issue exist in there? I didn't won't to use NAR first because of its complexity but unfortunately this issue (build time) is critical for me so I'd consider NAR if it may help. Regards, Sergey. -- View this message in context: http://maven.40175.n5.nabble.com/c-native-maven-plugin-redundant-linking-at-second-run-problem-tp3403291p3404794.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
Re: Stop escaping html tags when generating surefire xml report
I have't looked into the exact details of this, but generally if you want to embed HTML inside XML you have two choices; escaping or CDATA (with escaping of ]]) Escaping or cdata *has* to be used here to get well formed xml. There might be some reason for continuing the escaping all the way into html (injection comes to mind), but I am unsure if this is intentional or not. Kristian Den 01.03.2011 10:40, skrev zpan: Hi all, Currently we are using JUnit Maven surefire plugin to generate html report. But we want to insert screenshot link in the error message just like the following: com.thoughtworks.selenium.SeleniumException: Timed out after 12ms SCREENSHOT http://maven.40175.n5.nabble.com/file/n3404665/screenshot1.JPG screenshot1.JPG But currently we are getting something like: com.thoughtworks.selenium.SeleniumException: Timed out after 12ms C:/image.png SCREENSHOT http://maven.40175.n5.nabble.com/file/n3404665/screenshot2.JPG screenshot2.JPG Which shows that the html tags were escaped before generating the html report, and then I looked back the TEST-*.xml files and found that the html tags were escaped in the xml file too. So, does anyone have any idea on the following questions? 1. When and who escaped the html tags on generating the xml report? 2. Does the xml be escaped again when it is generated to html report? 3. Is there a solution to make some configurations to disable the escaping? It seems that TestNG can config the escaping output option just like the following: xmlfileset dir=${basedir} includes=testng.xml/ sysproperty key=org.uncommons.reportng.escape-output value=false/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Resources Plugin: escapeWindowsPaths depending on the file type?
Hi I'm using the latest and greatest Resources Plugin 2.5 Now I'm having a problem with Windows pathes: I have for instance a property x with the path C:\foo\bar and want to filter some files with it. In my properties file I want it to be C:\\foo\\bar, but in my batch file I want it to be C:\foo\bar. How do I do that using escapeWindowsPaths? As far as I know, I can't configure the Resources plugin twice in my build, since the resources can't be configured in the pluginconfiguration. Thanks for any help! Best regards, Eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Project structure help
Thanks for everyone's advice. The CM, Team Lead and I are going to go over some options next week. I'll update the group and will probably have some more question when we decide on the best options. -- Greg Akins http://twitter.com/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: c++ native-maven-plugin redundant linking at second run problem
Hi NAR also links in the compile phase as it uses cpp-tasks to handle uniform compilation and linking. Regards Mark On Mar 1, 2011, at 12:22 PM, sintetik wrote: Both compile and link are hooked into maven compile phase. Normally the native compile should get by very quickly since no code changes. The link phase still have to rebuild. Currently there is no work around. Thank you, Dan. What about NAR plugin - does this issue exist in there? I didn't won't to use NAR first because of its complexity but unfortunately this issue (build time) is critical for me so I'd consider NAR if it may help. Regards, Sergey. -- View this message in context: http://maven.40175.n5.nabble.com/c-native-maven-plugin-redundant-linking-at-second-run-problem-tp3403291p3404794.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: Unwanted jars getting copied
On 1 March 2011 10:24, Fuke, Amol amol.fuke...@nielsen.com wrote: Also is there any way we can replace hard coding with variable names? I have below code and I want server path with variables. target delete includeEmptyDirs=true dir=C:/Tomcat6/webapps/outbound / copy file=${project.build.directory}/outbound-1.0-SNAPSHOT.war tofile=C:/Tomcat6/webapps/outbound.war / /target Use properties? I'm not sure this is the right approach, you're showing us only tiny snippets of your environment. It might help if you could describe (at a high level) what you're trying to accomplish. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: c++ native-maven-plugin redundant linking at second run problem
Thank you Mark, NAR also links in the compile phase as it uses cpp-tasks to handle uniform compilation and linking. I guess it means linking will be repeated anyhow even if code didn't change? I had a thought that it's theoretically possible to resolve my problem (redundant linking) by creating 2 projects (for every cpp module), one of them doing compilation and producing obj files and second one just depending on the first one and performing linking. This looks somehow ugly though, so I'm thinking about possibility to virtualize this process inside the plugin itself. Please let me know whether you think if it's possible or any other considerations. Thanks, Sergey. -- View this message in context: http://maven.40175.n5.nabble.com/c-native-maven-plugin-redundant-linking-at-second-run-problem-tp3403291p3405441.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
Re: c++ native-maven-plugin redundant linking at second run problem
Another thought is to take a look at NAR and native-plugin to see if you can find a solution not to relinking when there is no change in source and provide patch -Dan On Tue, Mar 1, 2011 at 10:07 AM, sintetik sintet...@gmail.com wrote: Thank you Mark, NAR also links in the compile phase as it uses cpp-tasks to handle uniform compilation and linking. I guess it means linking will be repeated anyhow even if code didn't change? I had a thought that it's theoretically possible to resolve my problem (redundant linking) by creating 2 projects (for every cpp module), one of them doing compilation and producing obj files and second one just depending on the first one and performing linking. This looks somehow ugly though, so I'm thinking about possibility to virtualize this process inside the plugin itself. Please let me know whether you think if it's possible or any other considerations. Thanks, Sergey. -- View this message in context: http://maven.40175.n5.nabble.com/c-native-maven-plugin-redundant-linking-at-second-run-problem-tp3403291p3405441.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: Has the behavior of -U option changed?
I have re-tested with the pre-release version of 3.0.3 and find the -U behavior to be the same as 3.0.2. Specifically, when I expect it to download the latest jar from Artifactory, all it downloads is metadata: Downloading: .../0.7-SNAPSHOT/maven-metadata.xml Downloaded: .../0.7-SNAPSHOT/maven-metadata.xml (315 B at 0.5 KB/sec) Downloading: .../0.7-SNAPSHOT/maven-metadata.xml Downloaded: .../0.7-SNAPSHOT/maven-metadata.xml (315 B at 1.1 KB/sec) Regarding settings.xml, I am using the same as I did for mvn2. Thanks... -- View this message in context: http://maven.40175.n5.nabble.com/Has-the-behavior-of-U-option-changed-tp3374270p3405528.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
Re: Has the behavior of -U option changed?
wytten wrote: Specifically, when I expect it to download the latest jar from Artifactory, all it downloads is metadata: Unless the metadata indicates the existence of a newer snapshot, there is nothing to download. Benjamin - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Has the behavior of -U option changed?
Thanks for the reply. I know for a fact that a newer snapshot was uploaded to Artifactory. I imagine then that this issue could be specific to Artifactory. We are currently at version 2.2.2 of that product but coincidentally plan to upgrade soon. -- View this message in context: http://maven.40175.n5.nabble.com/Has-the-behavior-of-U-option-changed-tp3374270p3405604.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
Re: Has the behavior of -U option changed?
I looked at the metadata in question, and the lastUpdated value is in the future (due to the fact that the Artifactory repository is in a different timezone). Could this be the problem? -- View this message in context: http://maven.40175.n5.nabble.com/Has-the-behavior-of-U-option-changed-tp3374270p3405615.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
Re: Has the behavior of -U option changed?
wytten wrote: I know for a fact that a newer snapshot was uploaded to Artifactory. To troubleshoot, you could check the maven-metadata-*.xml in your local repository for the artifact in question. Maven picks the file with the newest lastUpdated value. The value is a UTC timestamp. Especially in case of repository managers, it's also worth to compare what the local metadata looks like after mvn deploy and what the remote metadata from the server says afterwards. Benjamin - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Build Site for parent module, but skip the children?
I have a large multi-module project that I wish to build a site for using Maven's site functionality. The trick is that I'd like to avoid building the sub-module sites as well. Building the individuals sites for each sub-module takes a while (even with the dependency report disabled) and it's information that I don't need (the parent site is sufficient for my needs). I haven't found a good way of doing this. I specify my site plugin configuration in the parent pom. While my first inclination was to use inheritfalse/inherit on the plugin config, this just meant that each sub-module had the default site configuration as opposed to not building a site at all. The only other idea I've had is to run mvn -am -pl . site to just run the site goal through the parent module. The problem here is that it's not clear how I'd make this work inside my Hudson/Jenkins CI build process, which is already running mvn clean install. I still need to build and install all my submodules, even if I only deploy the site for the parent. Any ideas? Thanks, Brian
Re: Build Site for parent module, but skip the children?
mvn -N site-deploy On Tue, Mar 1, 2011 at 4:50 PM, Brian Ferris bdfer...@gmail.com wrote: I have a large multi-module project that I wish to build a site for using Maven's site functionality. The trick is that I'd like to avoid building the sub-module sites as well. Building the individuals sites for each sub-module takes a while (even with the dependency report disabled) and it's information that I don't need (the parent site is sufficient for my needs). I haven't found a good way of doing this. I specify my site plugin configuration in the parent pom. While my first inclination was to use inheritfalse/inherit on the plugin config, this just meant that each sub-module had the default site configuration as opposed to not building a site at all. The only other idea I've had is to run mvn -am -pl . site to just run the site goal through the parent module. The problem here is that it's not clear how I'd make this work inside my Hudson/Jenkins CI build process, which is already running mvn clean install. I still need to build and install all my submodules, even if I only deploy the site for the parent. Any ideas? Thanks, Brian - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven and tomcat deploying
Is there some tool or plugin to deploy/undeploy a newly built war to tomcat or would I need to build a custom ant script that wraps the maven build process? What is the proper way to do this? Thanks! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven and tomcat deploying
Greetings, On Tue, Mar 1, 2011 at 10:48 PM, Mark static.void@gmail.com wrote: Is there some tool or plugin to deploy/undeploy a newly built war to tomcat or would I need to build a custom ant script that wraps the maven build process? What is the proper way to do this? The short answer is: it depends on how you want to deploy. Probably the following two will be useful: http://cargo.codehaus.org/Maven2+plugin http://mojo.codehaus.org/tomcat-maven-plugin/ -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven and tomcat deploying
Is there some tool or plugin to deploy/undeploy a newly built war to tomcat or would I need to build a custom ant script that wraps the maven build process? I think, if you search for maven tomcat deploy war at Google or Yahoo or Bing etc, you'll find what you seek... Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven and tomcat deploying
I am mobile so not sure if it is still supporrted, bur the war plugin used to have a deploy goal that allowed you to deploy the war to s running container. Jason On Mar 1, 2011, at 8:19 PM, Wayne Fay wayne...@gmail.com wrote: Is there some tool or plugin to deploy/undeploy a newly built war to tomcat or would I need to build a custom ant script that wraps the maven build process? I think, if you search for maven tomcat deploy war at Google or Yahoo or Bing etc, you'll find what you seek... Wayne - 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: Build Site for parent module, but skip the children?
Related question: Is there a way of doing the exact opposite, ie exclude the parent site? I have a top level project that only serves as an aggregator and want to deploy the module sites *only*? -Lukas Brian Fox wrote: mvn -N site-deploy On Tue, Mar 1, 2011 at 4:50 PM, Brian Ferrisbdfer...@gmail.com wrote: I have a large multi-module project that I wish to build a site for using Maven's site functionality. The trick is that I'd like to avoid building the sub-module sites as well. Building the individuals sites for each sub-module takes a while (even with the dependency report disabled) and it's information that I don't need (the parent site is sufficient for my needs). I haven't found a good way of doing this. I specify my site plugin configuration in the parent pom. While my first inclination was to use inheritfalse/inherit on the plugin config, this just meant that each sub-module had the default site configuration as opposed to not building a site at all. The only other idea I've had is to run mvn -am -pl . site to just run the site goal through the parent module. The problem here is that it's not clear how I'd make this work inside my Hudson/Jenkins CI build process, which is already running mvn clean install. I still need to build and install all my submodules, even if I only deploy the site for the parent. Any ideas? Thanks, Brian - 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