modify goal
Hello, I would like to modify a goal. I run with defaultGoalpackage/defaultGoal the packaging and I would like to run also every time versions:display-dependency-updates How can I add the versions:display-dependency-updates goal to my package default goal? Thanks Phil
Properties Files
Hello, I have a properties files. I have a multi modules project with 1 parent pom and approx 19 child modules. Where should i be putting the properties files which can be consumed by all the child modules. Thanks -- Aalok Singhvi
Re: Extra resource directory for site
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/17/2015 05:00 PM, Elliot Metsger wrote: I've used the Codehaus Build Helper Maven Plugin in the past: http://www.mojohaus.org/build-helper-maven-plugin/usage.html I don't see any goal suited for adding site resources. Can you share an example, please? - -dirk -BEGIN PGP SIGNATURE- Version: GnuPG v2 iEYEARECAAYFAlXSzhsACgkQASL+9Yb0srfjQACgxQfNHGJuOvcFzrnkUbESziL9 xEUAnis4HleGEPHG2bvK1iIPVCUIG0/X =xdbH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: modify goal
Hi, Generally speaking you need to add an execution section for the plugin. See the documentation here https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html (look for execution ) Though this particular goal is generally very slow and it did'nt really make sense to add it to the lifecycle. This should be more an on-demand task, or a task done by Integration server, in this case using versions:display-dependency-updates should be enough. On Tue, Aug 18, 2015 at 12:41 PM, Philipp Kraus philipp.kr...@tu-clausthal.de wrote: Hello, I would like to modify a goal. I run with defaultGoalpackage/defaultGoal the packaging and I would like to run also every time versions:display-dependency-updates How can I add the versions:display-dependency-updates goal to my package default goal? Thanks Phil -- Adrien Rivard
Re: Extra resource directory for site
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is it possible to specify a resources directory for the site in addition to src/site/resources? I did not find anything in the docs of the site plugin. It used also the (documented) directory of parameter generatedSiteDirectory, i.e. target/generated-site by default. Thanks Jörg, your tip pointed me into the right direction. While the generatedSiteDirectory did not work for me (resources were just not picked up), the siteOutputDirectory works. - -dirk -BEGIN PGP SIGNATURE- Version: GnuPG v2 iEYEARECAAYFAlXTI5MACgkQASL+9Yb0srf2nQCghLtuzu7rF66sj5jzKnPPQjI9 LzIAoL+9R4qinSPpsq67rpB1mCZlxDwU =Z3SP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Velocity-based report with project artifacts
Hi Martin, Martin Gainty wrote: so if you knew how to accomplish this how come you posted that you did not know how to access project artifacts? as said, your mail triggered my memory and I just wanted to share the result, since I've seen various requests for a generated download page. I would advise to please be careful with other peoples time..especially when they are not charging you. That's why I asked on the user's list. If you're not interested or have no time, then don't answer. However, I am thankful you did. It helped me to do the task. Cheers, Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Properties Files
Converting projects to Maven is not always a direct process. You might want to check out the document below. It talks about a systematic approach to converting projects to Maven, based on the artifacts that are created. http://www.webagesolutions.com/knowledgebase/kb001-Converting-To-Maven.html http://www.webagesolutions.com/knowledgebase/kb001-Converting-To-Maven.html Cheers, Greg Trasuk On Aug 18, 2015, at 10:02 AM, aalok singhvi aaloksing...@gmail.com wrote: It's a migration of an ant project. It's java project. Presently ant gets build properties file on compile time. On Aug 18, 2015 9:56 AM, Ron Wheeler rwhee...@artifact-software.com wrote: What are you building? What language and technology stack? What are the properties files used for - run-time? If so, where do you want them to end up when you install your app? How are you installing it? Ron On 18/08/2015 7:02 AM, aalok singhvi wrote: Hello, I have a properties files. I have a multi modules project with 1 parent pom and approx 19 child modules. Where should i be putting the properties files which can be consumed by all the child modules. Thanks -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Velocity-based report with project artifacts
so if you knew how to accomplish this how come you posted that you did not know how to access project artifacts? I would advise to please be careful with other peoples time..especially when they are not charging you. Regards, Martin __ To: users@maven.apache.org From: joerg.schai...@swisspost.com Subject: RE: Velocity-based report with project artifacts Date: Tue, 18 Aug 2015 15:33:27 +0200 Hi Martin, sometime a simple Velocity template is enough. SNippet from my generic about page: % == * Generated Artifacts #set($url=${project.properties.get('site.download')} + ${project.groupId.replaceAll('\.', '/')} + /) #set($name=$project.artifact.file.name) * {{{${url}${name}}${name}}} #foreach($artifact in $project.attachedArtifacts) #set($name=${artifact.file.name}) * {{{${url}${name}}${name}}} #end % == Thanks for the hint though, I forgot that you can access the complete project instance. Cheers, Jörg Martin Gainty wrote: http://stackoverflow.com/questions/10454181/how-to-determine-what-artifacts-are-built-from-a-maven-reactor-plan-ie-includi author suggests to code your own mojo: /** * @goal list-artifacts * @phase verify */ public class ListArtifactsMojo extends AbstractMojo { /** * @parameter default-value=${project} * @required * @readonly */ MavenProject project; public void execute() throws MojoExecutionException, MojoFailureException { CollectionArtifact artifacts = new ArrayListArtifact(); //create empty array artifacts.addAll(project.getAttachedArtifacts()); //add attached Artifacts //List them out for (Artifact artifact : artifacts) { System.out.println(Artifact: + artifact); } } //end execute } //end ListArtifactsMojo i leave contents of plugin.xml as fun exercise: https://maven.apache.org/ref/3.2.1/maven-plugin-api/plugin.html Martin ... To: users@maven.apache.org From: joerg.schai...@swisspost.com Subject: Velocity-based report with project artifacts Date: Fri, 14 Aug 2015 09:05:13 +0200 Hi, for a report page I'd like to use a velocity template to list all artifacts generated by the current project e.g. - artifact-1.0.jar - artifact-1.0-config.zip Accessing artifactId and version is clear, but the extension of the main artifact is already a problem. Not to speak of all attached artifacts. Is this information available accessing the $project.* hierarchy? Can anyone tell? Cheers, Jörg - 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: Properties Files
What is their purpose now if you are not using Ant? If these are properties for the build, they should be inside the parent POM as properties. Ron On 18/08/2015 10:02 AM, aalok singhvi wrote: It's a migration of an ant project. It's java project. Presently ant gets build properties file on compile time. On Aug 18, 2015 9:56 AM, Ron Wheeler rwhee...@artifact-software.com wrote: What are you building? What language and technology stack? What are the properties files used for - run-time? If so, where do you want them to end up when you install your app? How are you installing it? Ron On 18/08/2015 7:02 AM, aalok singhvi wrote: Hello, I have a properties files. I have a multi modules project with 1 parent pom and approx 19 child modules. Where should i be putting the properties files which can be consumed by all the child modules. Thanks -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Properties Files
It's a migration of an ant project. It's java project. Presently ant gets build properties file on compile time. On Aug 18, 2015 9:56 AM, Ron Wheeler rwhee...@artifact-software.com wrote: What are you building? What language and technology stack? What are the properties files used for - run-time? If so, where do you want them to end up when you install your app? How are you installing it? Ron On 18/08/2015 7:02 AM, aalok singhvi wrote: Hello, I have a properties files. I have a multi modules project with 1 parent pom and approx 19 child modules. Where should i be putting the properties files which can be consumed by all the child modules. Thanks -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Properties Files
Hi, For build time use, the simplest way is to put directly properties in pom.xml (parent or childs depending on how/where it is used). See https://maven.apache.org/guides/introduction/introduction-to-the-pom.html , last part. If you have lots of them it could eventually be externalized with the use of a specific plugin, but I would'nt recommend that at first. Most probably you will end up with differents properties for ant vs maven build anyway. See http://www.mojohaus.org/properties-maven-plugin/usage.html On Tue, Aug 18, 2015 at 4:02 PM, aalok singhvi aaloksing...@gmail.com wrote: It's a migration of an ant project. It's java project. Presently ant gets build properties file on compile time. On Aug 18, 2015 9:56 AM, Ron Wheeler rwhee...@artifact-software.com wrote: What are you building? What language and technology stack? What are the properties files used for - run-time? If so, where do you want them to end up when you install your app? How are you installing it? Ron On 18/08/2015 7:02 AM, aalok singhvi wrote: Hello, I have a properties files. I have a multi modules project with 1 parent pom and approx 19 child modules. Where should i be putting the properties files which can be consumed by all the child modules. Thanks -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Adrien Rivard
RE: Velocity-based report with project artifacts
Hi Martin, sometime a simple Velocity template is enough. SNippet from my generic about page: % == * Generated Artifacts #set($url=${project.properties.get('site.download')} + ${project.groupId.replaceAll('\.', '/')} + /) #set($name=$project.artifact.file.name) * {{{${url}${name}}${name}}} #foreach($artifact in $project.attachedArtifacts) #set($name=${artifact.file.name}) * {{{${url}${name}}${name}}} #end % == Thanks for the hint though, I forgot that you can access the complete project instance. Cheers, Jörg Martin Gainty wrote: http://stackoverflow.com/questions/10454181/how-to-determine-what-artifacts-are-built-from-a-maven-reactor-plan-ie-includi author suggests to code your own mojo: /** * @goal list-artifacts * @phase verify */ public class ListArtifactsMojo extends AbstractMojo { /** * @parameter default-value=${project} * @required * @readonly */ MavenProject project; public void execute() throws MojoExecutionException, MojoFailureException { CollectionArtifact artifacts = new ArrayListArtifact(); //create empty array artifacts.addAll(project.getAttachedArtifacts()); //add attached Artifacts //List them out for (Artifact artifact : artifacts) { System.out.println(Artifact: + artifact); } } //end execute } //end ListArtifactsMojo i leave contents of plugin.xml as fun exercise: https://maven.apache.org/ref/3.2.1/maven-plugin-api/plugin.html Martin ... To: users@maven.apache.org From: joerg.schai...@swisspost.com Subject: Velocity-based report with project artifacts Date: Fri, 14 Aug 2015 09:05:13 +0200 Hi, for a report page I'd like to use a velocity template to list all artifacts generated by the current project e.g. - artifact-1.0.jar - artifact-1.0-config.zip Accessing artifactId and version is clear, but the extension of the main artifact is already a problem. Not to speak of all attached artifacts. Is this information available accessing the $project.* hierarchy? Can anyone tell? Cheers, Jörg - 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: Properties Files
What are you building? What language and technology stack? What are the properties files used for - run-time? If so, where do you want them to end up when you install your app? How are you installing it? Ron On 18/08/2015 7:02 AM, aalok singhvi wrote: Hello, I have a properties files. I have a multi modules project with 1 parent pom and approx 19 child modules. Where should i be putting the properties files which can be consumed by all the child modules. Thanks -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org