Maven archetype question
Hi, I have two questions regarding maven archetype. My project has a maven archetype for generating skeleton for a Java service. In addition to it, it has archetype for generating DAO skeleton, and a maven plugin for code generation. These are too many steps for the end developer. I am trying to reduce the steps from 3 to 1 if possible. Question 1: Is it possible to call the second archetype from the first archetype? Or will I have to accomplish this using a shell script? Question 2: Is it possible to call the maven plugin from maven archetype? The idea is to run maven plugin (which does job of code generation) as part of archetype:generate command. Effectively the plugin-generated code should end up in the generated project skeleton. Thanks for your help. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-archetype-question-tp5805447.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
Simple Archetype Question
Hi All. Can an archetype create more than one project? Ta. -Chris ** CAUTION - This message is intended for the addressee named above. It may contain privileged or confidential information. If you are not the intended recipient of this message you must: - Not use, copy, distribute or disclose it to anyone other than the addressee; - Notify the sender via return email; and - Delete the message (and any related attachments) from your computer immediately. Internet emails are not necessarily secure. Australian Associated Motors Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do not accept responsibility for changes made to this message after it was sent. Unless otherwise stated, views expressed within this email are the author's own and do not represent those of AAMI. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Archetype Question
Good day to you, Michael See [1] for more information. Cheers, Franz [1] http://www.nabble.com/archetype-descriptor-schema--tf2181358.html#a6061573 Michael Schlotfeldt-4 wrote: Found out there is a filtered and a encoding attribute on the resource tag. Had to read through the source code though. Michael Schlotfeldt wrote: Easy questions (hopefully): 1. When creating a custom archetype how do you list resources to *not *replace variables from? Or in other words not modify instances of ${blah}. It would be nice to not only be able to escape individual instances in a file but also files completely for things like images. 2. Why the different tags? Or in other words why not just have resources? What does testResources do differently? You still need to write the entire relative path. 3. Why must all resources be list in archetype.xml? What is the purpose? When would you not list a file? Thank you for all the help. Also there is an error on: http://maven.apache.org/guides/mini/guide-creating-archetypes.html About half way down tags are listed with hyphens instead of capitals between words (eg. test-resources instead of testResources). Once again, thanks! - Michael - 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/Archetype-Question-tf2682275s177.html#a7517228 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: Archetype Question
Good day to you, Wendy, I haven't looked at arhceytpe's code for quite some time now. But if archetype filters those resources using ${} and @@ delimeters, you can do the workaround in [1]. Cheers, Franz [1] http://jira.codehaus.org/browse/MRESOURCES-29 Wendy Smoak-3 wrote: On 11/21/06, Michael Schlotfeldt [EMAIL PROTECTED] wrote: Found out there is a filtered and a encoding attribute on the resource tag. Had to read through the source code though. This still doesn't address the problem of filtering some, but not all, expressions in a file, right? Has anyone found a way to escape expressions in Velocity, so it will pass them through? -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Archetype-Question-tf2682275s177.html#a7517251 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: Archetype Question
On 11/22/06, Wendy Smoak [EMAIL PROTECTED] wrote: Has anyone found a way to escape expressions in Velocity, so it will pass them through? One possibility is to define the property start sequence as velocity macro: #set( $ps = ${ ) ... and later in the file this should remain ${ps}property.remaining.in.file} unescaped The problem with the regular velocity escaping mechanism is that it treats properties that are defined differently from properties that are not defined. This feature makes it unusable in my opinion. Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Archetype Question
I found a method that /half-way /seems to work. If you put a \ in-front of an expression it is not processed. But the problem is that the \ is not removed after processing of the document. I would suggest a modification be made to the archetype plugin that removes one \ before any ${blah} after processing. Thoughts and other ideas? I know only a little about the archetype plugin and velocity so there may be better options. -Michael Wendy Smoak wrote: On 11/21/06, Michael Schlotfeldt [EMAIL PROTECTED] wrote: Found out there is a filtered and a encoding attribute on the resource tag. Had to read through the source code though. This still doesn't address the problem of filtering some, but not all, expressions in a file, right? Has anyone found a way to escape expressions in Velocity, so it will pass them through? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Archetype Question
Found out there is a filtered and a encoding attribute on the resource tag. Had to read through the source code though. Michael Schlotfeldt wrote: Easy questions (hopefully): 1. When creating a custom archetype how do you list resources to *not *replace variables from? Or in other words not modify instances of ${blah}. It would be nice to not only be able to escape individual instances in a file but also files completely for things like images. 2. Why the different tags? Or in other words why not just have resources? What does testResources do differently? You still need to write the entire relative path. 3. Why must all resources be list in archetype.xml? What is the purpose? When would you not list a file? Thank you for all the help. Also there is an error on: http://maven.apache.org/guides/mini/guide-creating-archetypes.html About half way down tags are listed with hyphens instead of capitals between words (eg. test-resources instead of testResources). Once again, thanks! - Michael - 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]
Re: Archetype Question
On 11/21/06, Michael Schlotfeldt [EMAIL PROTECTED] wrote: Found out there is a filtered and a encoding attribute on the resource tag. Had to read through the source code though. This still doesn't address the problem of filtering some, but not all, expressions in a file, right? Has anyone found a way to escape expressions in Velocity, so it will pass them through? -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Archetype question
Hi, My colleague and I are working on some archetypes and have run into a problem. I'm hoping someone can help me out with this. In our projects, we need a file that is named the same as the project. This would mean that Maven would have to rename certain files that are defined in the archetype when creating the project. Sort of like in the POM, we somehow want to define a certain pattern for Maven to copy, eg: '${artifactId}.txt' (or some pre-defined pattern) should be copied to the project as 'xxx.txt', when Maven-archetype is run with the '-DartifactId=xxx'. Does Maven support something like this? And should we use it? Please elaborate. Thanks, Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Archetype question
Hi, My colleague and I are working on some archetypes and have run into a problem. I'm hoping someone can help me out with this. In our projects, we need a file that is named the same as the project. This would mean that Maven would have to rename certain files that are defined in the archetype when creating the project. Sort of like in the POM, we somehow want to define a certain pattern for Maven to copy, eg: '${artifactId}.txt' (or some pre-defined pattern) should be copied to the project as 'xxx.txt', when Maven-archetype is run with the '-DartifactId=xxx'. Does Maven support something like this? And should we use it? Please elaborate. Thanks, Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie archetype question
Assuming you want to create a webapp with 1. package : com.mymaven.example.web 2.war name: MavenWebAppEx Use the following command to have the maven-archetype-webapp create the webapp for you: mvn archetype:create -DgroupId=com.mymaven.example.web-DartifactId=MavenWebAppEx -Dpackagename= com.mymaven.example.web -DarchetypeArtifactId=maven-archetype-webapp hope that helps, Javed On 6/13/06, Wayne Fay [EMAIL PROTECTED] wrote: If you drill down in the Central (ibiblio) repo and the Snapshot repo, you will find a number of Archetypes, including j2ee-simple, webapp, portlet etc. http://www.ibiblio.org/maven2/org/apache/maven/archetypes/ Give them all a try and see what kind of directories, poms, etc are created by each one -- perhaps you will find what you were originally looking for... But manually creating directories and modifying poms is the way I personally create most of my projects. Wayne On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, That's the kind of feedback I was looking for, yes. For some reason, I had it in my head that you shouldn't touch the directory structure once the archetype did it's work, but as I think about it, the pom that both archetypes create is almost the same. Thinking along those lines, adding the directories manually begins to make sense. Thanks much for your responses, Mike On 6/10/06, ben short [EMAIL PROTECTED] wrote: Mike, I have used maven for a couple of webapps, usally I use the webapp archetype to generate the pom and initial structure then I create the java directory manually. Once you have created them maven will compile the jva source as normal, and the class files get moved to the correct place in the produced war. I dont know of a archtype that does this for you, but that dosent mean there isn't one. Also I have created a project that has a webapp module and a java module. For this I used the quick start archetype to create the jar module, and the webapp to create the webapp module. I then moved the out directory's produced under a project directory and created the project pom manually. I hope this is of some help... Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin -- Mike Lundin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie archetype question
Javed, That's what I tried originally, but when I do that the folders that would normally appear for Java sources are not created. The directory structure becomes: MavenWebAppEx src main resources webapp WEB-INF I still need to manually add the java source folders. I was thinking there was a way to run multiple archetypes in the same directory, but I have yet to get that to work (I end up getting subprojects with dependencies). Thanks much, Mike On 6/13/06, javed mandary [EMAIL PROTECTED] wrote: Assuming you want to create a webapp with 1. package : com.mymaven.example.web 2.war name: MavenWebAppEx Use the following command to have the maven-archetype-webapp create the webapp for you: mvn archetype:create -DgroupId=com.mymaven.example.web-DartifactId=MavenWebAppEx -Dpackagename= com.mymaven.example.web -DarchetypeArtifactId=maven-archetype-webapp hope that helps, Javed On 6/13/06, Wayne Fay [EMAIL PROTECTED] wrote: If you drill down in the Central (ibiblio) repo and the Snapshot repo, you will find a number of Archetypes, including j2ee-simple, webapp, portlet etc. http://www.ibiblio.org/maven2/org/apache/maven/archetypes/ Give them all a try and see what kind of directories, poms, etc are created by each one -- perhaps you will find what you were originally looking for... But manually creating directories and modifying poms is the way I personally create most of my projects. Wayne On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, That's the kind of feedback I was looking for, yes. For some reason, I had it in my head that you shouldn't touch the directory structure once the archetype did it's work, but as I think about it, the pom that both archetypes create is almost the same. Thinking along those lines, adding the directories manually begins to make sense. Thanks much for your responses, Mike On 6/10/06, ben short [EMAIL PROTECTED] wrote: Mike, I have used maven for a couple of webapps, usally I use the webapp archetype to generate the pom and initial structure then I create the java directory manually. Once you have created them maven will compile the jva source as normal, and the class files get moved to the correct place in the produced war. I dont know of a archtype that does this for you, but that dosent mean there isn't one. Also I have created a project that has a webapp module and a java module. For this I used the quick start archetype to create the jar module, and the webapp to create the webapp module. I then moved the out directory's produced under a project directory and created the project pom manually. I hope this is of some help... Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin -- Mike Lundin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mike Lundin
Re: Newbie archetype question
Ah i understand your point then you need to create the java folder under main manually , i think this should be a bug for the web archetype plugin . cheers, Javed On 6/13/06, Mike Lundin [EMAIL PROTECTED] wrote: Javed, That's what I tried originally, but when I do that the folders that would normally appear for Java sources are not created. The directory structure becomes: MavenWebAppEx src main resources webapp WEB-INF I still need to manually add the java source folders. I was thinking there was a way to run multiple archetypes in the same directory, but I have yet to get that to work (I end up getting subprojects with dependencies). Thanks much, Mike On 6/13/06, javed mandary [EMAIL PROTECTED] wrote: Assuming you want to create a webapp with 1. package : com.mymaven.example.web 2.war name: MavenWebAppEx Use the following command to have the maven-archetype-webapp create the webapp for you: mvn archetype:create -DgroupId=com.mymaven.example.web-DartifactId=MavenWebAppEx -Dpackagename= com.mymaven.example.web -DarchetypeArtifactId=maven-archetype-webapp hope that helps, Javed On 6/13/06, Wayne Fay [EMAIL PROTECTED] wrote: If you drill down in the Central (ibiblio) repo and the Snapshot repo, you will find a number of Archetypes, including j2ee-simple, webapp, portlet etc. http://www.ibiblio.org/maven2/org/apache/maven/archetypes/ Give them all a try and see what kind of directories, poms, etc are created by each one -- perhaps you will find what you were originally looking for... But manually creating directories and modifying poms is the way I personally create most of my projects. Wayne On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, That's the kind of feedback I was looking for, yes. For some reason, I had it in my head that you shouldn't touch the directory structure once the archetype did it's work, but as I think about it, the pom that both archetypes create is almost the same. Thinking along those lines, adding the directories manually begins to make sense. Thanks much for your responses, Mike On 6/10/06, ben short [EMAIL PROTECTED] wrote: Mike, I have used maven for a couple of webapps, usally I use the webapp archetype to generate the pom and initial structure then I create the java directory manually. Once you have created them maven will compile the jva source as normal, and the class files get moved to the correct place in the produced war. I dont know of a archtype that does this for you, but that dosent mean there isn't one. Also I have created a project that has a webapp module and a java module. For this I used the quick start archetype to create the jar module, and the webapp to create the webapp module. I then moved the out directory's produced under a project directory and created the project pom manually. I hope this is of some help... Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin -- Mike Lundin - To unsubscribe,
Re: Newbie archetype question
If you drill down in the Central (ibiblio) repo and the Snapshot repo, you will find a number of Archetypes, including j2ee-simple, webapp, portlet etc. http://www.ibiblio.org/maven2/org/apache/maven/archetypes/ Give them all a try and see what kind of directories, poms, etc are created by each one -- perhaps you will find what you were originally looking for... But manually creating directories and modifying poms is the way I personally create most of my projects. Wayne On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, That's the kind of feedback I was looking for, yes. For some reason, I had it in my head that you shouldn't touch the directory structure once the archetype did it's work, but as I think about it, the pom that both archetypes create is almost the same. Thinking along those lines, adding the directories manually begins to make sense. Thanks much for your responses, Mike On 6/10/06, ben short [EMAIL PROTECTED] wrote: Mike, I have used maven for a couple of webapps, usally I use the webapp archetype to generate the pom and initial structure then I create the java directory manually. Once you have created them maven will compile the jva source as normal, and the class files get moved to the correct place in the produced war. I dont know of a archtype that does this for you, but that dosent mean there isn't one. Also I have created a project that has a webapp module and a java module. For this I used the quick start archetype to create the jar module, and the webapp to create the webapp module. I then moved the out directory's produced under a project directory and created the project pom manually. I hope this is of some help... Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin -- Mike Lundin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie archetype question
Mike, I have used maven for a couple of webapps, usally I use the webapp archetype to generate the pom and initial structure then I create the java directory manually. Once you have created them maven will compile the jva source as normal, and the class files get moved to the correct place in the produced war. I dont know of a archtype that does this for you, but that dosent mean there isn't one. Also I have created a project that has a webapp module and a java module. For this I used the quick start archetype to create the jar module, and the webapp to create the webapp module. I then moved the out directory's produced under a project directory and created the project pom manually. I hope this is of some help... Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie archetype question
Ben, That's the kind of feedback I was looking for, yes. For some reason, I had it in my head that you shouldn't touch the directory structure once the archetype did it's work, but as I think about it, the pom that both archetypes create is almost the same. Thinking along those lines, adding the directories manually begins to make sense. Thanks much for your responses, Mike On 6/10/06, ben short [EMAIL PROTECTED] wrote: Mike, I have used maven for a couple of webapps, usally I use the webapp archetype to generate the pom and initial structure then I create the java directory manually. Once you have created them maven will compile the jva source as normal, and the class files get moved to the correct place in the produced war. I dont know of a archtype that does this for you, but that dosent mean there isn't one. Also I have created a project that has a webapp module and a java module. For this I used the quick start archetype to create the jar module, and the webapp to create the webapp module. I then moved the out directory's produced under a project directory and created the project pom manually. I hope this is of some help... Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin -- Mike Lundin
Newbie archetype question
I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike
Re: Newbie archetype question
Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie archetype question
Ben, I was assuming that there was an archetype out there that would generate that structure for me. Is that not the case? Mike On 6/9/06, ben short [EMAIL PROTECTED] wrote: Mike, You can just create the directorys you need from the link .. http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Or you can create a seperate project that has the java source and add it as a dependacy of your webapp. Ben On 6/10/06, Mike Lundin [EMAIL PROTECTED] wrote: I'm working on creating a new webapp project using maven and the archetype:create with the maven-archetype-webapp archetype. I may not understand things correctly, but I don't see some directories that I would assume would be in there. There is nothing for Java src files or anything like that in there. Should those be in there, or is the preferred method to created multiple maven projects and make them all dependencies on each other? I tried creating archetypes within archetypes (by changing package to pom), but that seem to disregard the archetype I sent in and only ever used the quickStart archetype. Any help on this would be greatly appreciated -- and feel free to point me to a URL that has more information. I've looked through the resources I know and am not finding anything definitive. Thanks much, Mike -- Mike Lundin
Re: inheriting from plugins (Answer to archetype question)
Hi, Archetypes are templates for projects that are often used. Standard Maven 2 directory structure; common files and folders; and some resources will be created for you. An example is the maven-archetype-webapp which can be used to create a skeleton project for a web application. It will create your starting pom, the WEB-INF folder, a deployment descriptor and some sample JSPs which you could edit later. Here's a full description of archetypes for your reference: http://maven.apache.org/guides/introduction/introduction-to-archetypes.html By the way, it would be nice if you changed the subject of the email you replied to because your question was not related. :-) Hope this helps. Regards, John Oles wrote: Why archetypes is needed at all? What can I do with ones :-\ Creating an archetype is a pretty straight forward process. An archetype is a very simple plugin, that contains the project prototype you wish to create. An archetype is made up of:. - 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]