Re: Any interest in a maven-properties-plugin?
It is going through the tedious process of being accepted as a plugin. Vote for it here: http://jira.codehaus.org/browse/MOJO-535 The source can also be found in JIRA. ertnutler wrote: i'm interested in using this plugin, but i can't checkout the source or browse the repository from the project home page. has it been removed? -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a7011829 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: Any interest in a maven-properties-plugin?
I've created a JIRA for this: http://jira.codehaus.org/browse/MOJO-535 Please vote if you feel this is helpful. Wayne Fay wrote: I think there is certainly some interest in this kind of plugin. In particular, the write-project-properties functionality might be useful to build up properties files used by Spring etc. However, it should be named properties-maven-plugin, as it does not originate from the Maven Dev team. Wayne On 10/16/06, Zarar Siddiqi [EMAIL PROTECTED] wrote: I've written a plugin that serves as a good utility in handling properties. Given the many questions on this mailing list about handling properties for different environments and I/O'ing them from files, I think this would help in alleviating this problem. It has three goals (for now): 1. read-project-properties: Given a set of property files in name=value format, it reads them and stores them as project properties. This would be nice for those of us that store environment specific information in different property files. 2. write-project-properties: Writes project properties to a given file. Helpful when some properties need to be available at runtime (e.g.: Spring's PropertyPlaceholderConfigurer) 3. write-active-profile-properties: Writes the properties of any active profiles to a file. The above three are the use cases that I've encountered. I'm sure there are many more. If there is any interest in such a plugin, do respond to this and I will make a site for it and start the process of submitting a plugin to org.codehaus.mojo. Thank you. -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a6840727 Sent from the Maven - Users mailing list archive at Nabble.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] -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a6863565 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: Transitive dependencies in war-plugin.
If you are using the maven-war-plugin, you can use the warSourceExcludes elements to exclude jars from your war. They will still appear in the work directory (where the war is assembled) but once your war is bundled up, they won't be there. You should also look at dependentWarExcludes. http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html Here's some usage: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0.1/version configuration warSourceExcludes WEB-INF/lib/antlr-2*,WEB-INF/lib/avalon*/warSourceExcludes warName${app.name}/warName containerConfigXML${war.dir}/context.xml/containerConfigXML webXml${war.dir}/WEB-INF/web.xml/webXml /configuration /plugin Zarar Dmystery wrote: IS there a way to turn off transitive dependencies while packaging a war file? I want my ejb-client in the war-packaging but it brings along all the ejb-client dependencies. I've searched enough on this forum but cant find a solution. My webapp pom has a dependency as follows.. dependencies dependency groupIdcom-server/groupId artifactIdcom-server-ejb/artifactId version1/version typeejb-client/type /dependency /dependencies Has anyone solved this isssue? -- View this message in context: http://www.nabble.com/Transitive-dependencies-in-war-plugin.-tf2452739.html#a6838263 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: Transitive dependencies in war-plugin.
How is that relevant to the problem? It's defined in a property file which I read in through a plugin and then store them as project properties. A different propertly file is read for different environments (development, production etc). Mick Knutson-4 wrote: Where did you define ${app.name} at? On 10/16/06, Zarar Siddiqi [EMAIL PROTECTED] wrote: If you are using the maven-war-plugin, you can use the warSourceExcludes elements to exclude jars from your war. They will still appear in the work directory (where the war is assembled) but once your war is bundled up, they won't be there. You should also look at dependentWarExcludes. http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html Here's some usage: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0.1/version configuration warSourceExcludes WEB-INF/lib/antlr-2*,WEB-INF/lib/avalon*/warSourceExcludes warName${app.name}/warName containerConfigXML${war.dir }/context.xml/containerConfigXML webXml${war.dir}/WEB-INF/web.xml/webXml /configuration /plugin Zarar Dmystery wrote: IS there a way to turn off transitive dependencies while packaging a war file? I want my ejb-client in the war-packaging but it brings along all the ejb-client dependencies. I've searched enough on this forum but cant find a solution. My webapp pom has a dependency as follows.. dependencies dependency groupIdcom-server/groupId artifactIdcom-server-ejb/artifactId version1/version typeejb-client/type /dependency /dependencies Has anyone solved this isssue? -- View this message in context: http://www.nabble.com/Transitive-dependencies-in-war-plugin.-tf2452739.html#a6838263 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson -- View this message in context: http://www.nabble.com/Transitive-dependencies-in-war-plugin.-tf2452739.html#a6838444 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Any interest in a maven-properties-plugin?
I've written a plugin that serves as a good utility in handling properties. Given the many questions on this mailing list about handling properties for different environments and I/O'ing them from files, I think this would help in alleviating this problem. It has three goals (for now): 1. read-project-properties: Given a set of property files in name=value format, it reads them and stores them as project properties. This would be nice for those of us that store environment specific information in different property files. 2. write-project-properties: Writes project properties to a given file. Helpful when some properties need to be available at runtime (e.g.: Spring's PropertyPlaceholderConfigurer) 3. write-active-profile-properties: Writes the properties of any active profiles to a file. The above three are the use cases that I've encountered. I'm sure there are many more. If there is any interest in such a plugin, do respond to this and I will make a site for it and start the process of submitting a plugin to org.codehaus.mojo. Thank you. -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a6840727 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: Any interest in a maven-properties-plugin?
Here's a site for the plugin: http://individual.utoronto.ca/zarar/properties-maven-plugin/site/ Zarar Siddiqi wrote: I've written a plugin that serves as a good utility in handling properties. Given the many questions on this mailing list about handling properties for different environments and I/O'ing them from files, I think this would help in alleviating this problem. It has three goals (for now): 1. read-project-properties: Given a set of property files in name=value format, it reads them and stores them as project properties. This would be nice for those of us that store environment specific information in different property files. 2. write-project-properties: Writes project properties to a given file. Helpful when some properties need to be available at runtime (e.g.: Spring's PropertyPlaceholderConfigurer) 3. write-active-profile-properties: Writes the properties of any active profiles to a file. The above three are the use cases that I've encountered. I'm sure there are many more. If there is any interest in such a plugin, do respond to this and I will make a site for it and start the process of submitting a plugin to org.codehaus.mojo. Thank you. -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a6842863 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: Any interest in a maven-properties-plugin?
Once you invoke the plugin on dev.properties, any properties in the file will become part of the build. So if the property file contained: var1=value1 var2=value2 It would be the equivalent of you declaring the following in your pom.xml or settings.xml: properties var1value1/var1 var2value2/var2 /properties So you can either: A) specify one property file which contains all your properties OR B) declare them manually in your pom.xml or settings.xml Note that you don't have to do both A and B, just one of them. I like the simplicity of A and the power to have multiple property files is also nice. Mick Knutson-4 wrote: I have a question about this plugin is this going to allow me to pull a file from the local machine: filec:/etc/config/dev.properties/file Then put those parameters into scope of the build. Similiar to settings.xml properties project.paramProject-Parameter/project.param On 10/16/06, Zarar Siddiqi [EMAIL PROTECTED] wrote: Here's a site for the plugin: http://individual.utoronto.ca/zarar/properties-maven-plugin/site/ Zarar Siddiqi wrote: I've written a plugin that serves as a good utility in handling properties. Given the many questions on this mailing list about handling properties for different environments and I/O'ing them from files, I think this would help in alleviating this problem. It has three goals (for now): 1. read-project-properties: Given a set of property files in name=value format, it reads them and stores them as project properties. This would be nice for those of us that store environment specific information in different property files. 2. write-project-properties: Writes project properties to a given file. Helpful when some properties need to be available at runtime (e.g.: Spring's PropertyPlaceholderConfigurer) 3. write-active-profile-properties: Writes the properties of any active profiles to a file. The above three are the use cases that I've encountered. I'm sure there are many more. If there is any interest in such a plugin, do respond to this and I will make a site for it and start the process of submitting a plugin to org.codehaus.mojo. Thank you. -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a6842863 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson -- View this message in context: http://www.nabble.com/Any-interest-in-a-maven-properties-plugin--tf2454363.html#a6844195 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: [m2] Compiling JSPs
What about the case where the web.xml and any .tld files are generated (via XDoclet). In that case the web.xml wouldn't be in the src/main/webapps folder but somewhere in target/gen. The jsp plugin expects a nice little directory structure where the web.xml, JSP's and .tld are rooted under the same tree which is not the case here. Any ideas how to get around this? Matt Raible-3 wrote: I was able to successfully get this plugin to work - thanks to Jeff Genender (the plugin's author). I did find that I needed to add the following two dependencies to my project. !-- Needed for jspc plugin (pre-compiling of JSPs) -- dependency groupIdjavax.servlet/groupId artifactIdjsp-api/artifactId version2.0/version scopeprovided/scope /dependency !-- Needed for jspc plugin (pre-compiling of JSPs) -- dependency groupIdtomcat/groupId artifactIdjasper-runtime/artifactId version5.5.12/version scopeprovided/scope /dependency In addition, I had to change many dependencies from having scoperuntime/scope to nothing (meaning scopecompile/scope). This was required for all libraries that had tag libraries included in them. Example code can be seen in: https://equinox.dev.java.net/source/browse/*checkout*/equinox/pom.xml Hope this helps, Matt On 2/19/06, Stephen Duncan [EMAIL PROTECTED] wrote: Oh, and respond back with what you learn on it; I was hoping to start playing with it soon... -Stephen On 2/19/06, Stephen Duncan [EMAIL PROTECTED] wrote: Matt, I haven't tried it, but there's a jspc plugin on the mojo.codehaus.org site: http://mojo.codehaus.org/jspc-maven-plugin/usage.html that seems to do what you're asking. -Stephen On 2/19/06, Matt Raible [EMAIL PROTECTED] wrote: Is there a plugin that does compilation of JSPs and adding entries into web.xml? Here's how to do it for Maven 1, but I'd like to do it with Maven 2: http://www.savoirtech.com/roller/page/jgenender/20041011 Here's how I've done it in Ant. target name=compile-jsp depends=jsp-2 if=precompile.jsp property name=jsp.src value=${build.dir}/web/jsp/src/ mkdir dir=${jsp.src}/ taskdef classname=org.apache.jasper.JspC name=jasper classpathref=jspc.classpath/ jasper verbose=0 package=org.appfuse.jsp uriroot=${webapp.target} webXmlFragment=${jsp.src}/jsp-servlets.xml outputDir=${jsp.src} / javac srcdir=${jsp.src} destdir=${build.dir}/web/classes debug=${compile.debug} deprecation=${compile.deprecation} optimize=${compile.optimize} classpathref=jspc.classpath/ loadfile property=jsp.mappings srcfile=${jsp.src}/jsp-servlets.xml/ replace file=${webapp.target}/WEB-INF/web.xml value=${jsp.mappings} token=lt;!-- precompiled jsp mappings --gt;/ /target Also, is there a plugin that can generate an archetype from an existing project? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-m2--Compiling-JSPs-tf1149163.html#a6788409 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: How to get external properties values to maven
I had the same issue and wrote a simple plugin to actually read the file and make it part of a profile's properties using the Profile.setProperties(..) method. You can either do that or transfer the contents of the property file to your pom.xml using the syntax: properties myNameRaghurajan/myName /properties Zarar Siddiqi On 9/29/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All I'm trying to get some value from external properties file how can i get it For eg, I have one external property like ext.properties inthat i have property defined ad myName=Raghurajan Now i need to have this value in manifest file so i included as follows plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ear-plugin/artifactId configuration archive manifestEntries Personname${myname}/Personname /manifestEntries manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin But when manifest is created i just see Personname ${myname} its not susituted i with the actual value... is there something wron i'm doing here ?? i have filtering as true for this property file in my resource section still its not working Can anyone advise please Thanks, Raghurajan Gurunathan - This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiproject Rector
Only one way to find out: try it out. I'm going to guess dependency but the bigger question might be why you are even using 1.0.2? On 9/30/06, Neeraj Bisht [EMAIL PROTECTED] wrote: hi all i am unable to get answer of my Question regarding maven 1.0.2 i want to know that while building the multiple project through reactor in maven 1.0.2 , is build on the bases of dependency based on each othere or its build in the sorted order Regards Neeraj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading properties for different enviroments
Any ideas on how to accomplish this? torghal wrote: We have 3 different kind of enviroments to deploy applications: - development - acceptation - production We would like to use 3 different propertie files, one for each enviroment: - development.properties - acceptation.properties - production.properties These propertie files contain enviroment specific properties (e.g. context-root under which the application is deployed). We addapted the maven.xml so we can use a commandline parameter to switch between the different propertie files: preGoal name=build:start attainGoal name=select:properties/ /preGoal goal name=select:properties ant:echoLoading properties/ant:echo ant:echoOmgeving: ${enviroment}/ant:echo j:switch on=${enviroment} j:case value=production ant:property file=${basedir}/../production.properties / /j:case j:case value=acceptation ant:property file=${basedir}/../acceptation.properties / /j:case j:default ant:property file=${basedir}/../development.properties / /j:default /j:switch /goal This loads the properties correctly, ant:echoServer is: ${server.name}/ant:echo will echo the server name as defined according to the commandline parameter. The properties loaded this way can however not be used by other plugins: - in the project.xml we have: dependency groupId${pom.groupId}/groupId artifactIdmmis_imjv_beheer_war/artifactId version${pom.currentVersion}/version typewar/type properties ear.appxml.war.context-root${webapp.context.beheer}/ear.appxml.war.contex t-root ear.bundletrue/ear.bundle /properties /dependency - in the project.properties file we have: webapp.context.beheer=/${server.name}/imjv-beheer - in the development.properties file we definied: server.name=development When we run the ear:install goal we see in the application.xml that the context-root is /imjv-beheer instead of /developement/imj-beheer It likes like the properties in the development.properties file where not loaded for the ear-plugin. Is there a way to pre-load the properties in the development.properties file or is there another way to solve the switching enviroments problem. Many thanks, Tonny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Loading-properties-for-different-enviroments-tf373481.html#a6566611 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dependency of test classes across sub-modules
I have a scenario where a test class from one child module depends on a test class from another child module, say ModuleA and ModuleB. After some searching, I discovered this: http://maven.apache.org/guides/mini/guide-attached-tests.html But for ModuleB to even compile its tests, it needs the tests from ModuleA and ModuleA is not JAR'ed up yet (using test-jar), hence ModuleB cannot see it. So, if I put the following in ModuleB's pom.xml, I'll get an error saying ModuleA is not installed yet. dependency groupIdModuleA/groupId artifactIdModuleA/artifactId version1.0-SNAPSHOT/version typetest-jar/type /dependency The question is how do I install the test-jar on the fly so that it gets created AND ModuleB gets to see it when I type maven test on my parent module's pom.xml. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Archetype/packageName/directory structure
Did you ever get this working? I'm getting this error: I'm trying to create/copy the directory structure form archetype-resources\business\core\src\main\java to business\core\src\main\java I've followed the directions here: http://maven.apache.org/guides/mini/guide-creating-archetypes.html But once I run the archetype:create command, all I get is my new project directory with a single pom.xml in it. Any ideas? bryan hansen wrote: I am creating a custom archetype and am not seeing a way to have folders carried throught the archetype. I have a source file in the resources directory such as: src/main/resources/archetype-resources/src/main/java/App.java When I run this through the archetype:create command it will place this file under the package directory correctly. src/main/java/com/mycompany/App.java I want to have some folders that get carried through though such as: src/main/resources/archetype-resources/src/main/java/service/AppService.java so that when I run the archetype:create command it will be placed in a folder like this: src/main/java/com/mycompany/service/AppService.java The way it is working now by putting it under the resources directory it is building out a directory structure and duplicating the package name underneath it. src/main/java/service/com/mycompany/AppService.java Is it possible with the archetype to have it create the directory structure and carry it through like I described? Thanks, Bryan __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-m2--Archetype-packageName-directory-structure-tf1561315.html#a6209664 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]