You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Raphaël Piéroni <ra...@gmail.com> on 2009/05/07 16:20:07 UTC

Re: Issues with archetype:create-from-project

Hi Matt,

Sorry for the late reply

Yes, please create the jiras

Raphaël

2009/4/29 mraible <ma...@raibledesigns.com>

>
> I've been using archetype:create-from-project to create archetypes and have
> noticed some issues:
>
> 1. The generated archetype has a version of 1.0-SNAPSHOT. I want the
> archetype's version to be the same as my project.
>
> 2. When I have an empty property (e.g. <jdbc.password></jdbc.password>),
> it's removed from the resulting pom.xml.
>
> 3. When generating a multi-module archetype, the package names in my
> hibernate.cfg.xml are replaced with ${package}. This doesn't happen when
> generating a single-module archetype.
>
> 4. Package expansion doesn't happen for files in a package hierarchy under
> src/main/resources.
>
> 5. I'm unable to set a description for the generated archetype.
>
> 6. Replacing of package names with ${package} seems to work different b/w
> multi-module and single-module projects. In a multi-module project,
> "org.appfuse.webapp" gets replaced with "${package}.webapp". In a
> single-module project, "org.appfuse.webapp" gets replaced with
> "${package}".
>
> 7. TLD files are not scanned for packages to replace.
>
> 8. The web.xml file is not scanned for packages to replace.
>
> I've been able to workaround most of these issues by using Ant to
> manipulate
> the project after it's generated (before installing). Should I enter these
> as issues in JIRA?
>
> Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/Issues-with-archetype%3Acreate-from-project-tp23286970p23286970.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Issues with archetype:create-from-project

Posted by Bernard Lupin <be...@yahoo.fr>.
Hi Matt,
I encounter quite all of your issues. However, I've solved some of them with
tricks :

1. I have an archetype.properties file within my project, containing these
properties :
archetype.groupId=com.company.project
archetype.artifactId=project-archetype-example
archetype.version=1.0-SNAPSHOT

Then I run the create-from-project with a
"-Darchetype.properties=archetype.properties" option. This way, I can manage
the archetype version.

2. I use a dummy variable to solve this problem, eg
<jdbc.password>${empty}</jdbc.password>

3, 4, 7., 8.
As soon as possible, I use ${project.artifactId} and ${project.groupId} in
my poms and config files (with filtering enabled). Thus, no matter if my
artifactId/groupId/package are replaced or not by the archetype plugin.

5.
You're right, and I'm still wondering how to put a description for my
archetype : It's annoying because the archetype:generate goal shows a list
of available archetypes with a description in parentheses, but I can't
manage this description in my project, I have to change it in the
.../target/generated-sources/archetype/pom.xml.

6. You're right, there are a lot of differences between mono and multi
module projects

So if somebody has a workaround for 5., it would be great for me too...

Bernard


Raphaël wrote:
> 
> Hi Matt,
> 
> Sorry for the late reply
> 
> Yes, please create the jiras
> 
> Raphaël
> 
> 2009/4/29 mraible <ma...@raibledesigns.com>
> 
>>
>> I've been using archetype:create-from-project to create archetypes and
>> have
>> noticed some issues:
>>
>> 1. The generated archetype has a version of 1.0-SNAPSHOT. I want the
>> archetype's version to be the same as my project.
>>
>> 2. When I have an empty property (e.g. <jdbc.password></jdbc.password>),
>> it's removed from the resulting pom.xml.
>>
>> 3. When generating a multi-module archetype, the package names in my
>> hibernate.cfg.xml are replaced with ${package}. This doesn't happen when
>> generating a single-module archetype.
>>
>> 4. Package expansion doesn't happen for files in a package hierarchy
>> under
>> src/main/resources.
>>
>> 5. I'm unable to set a description for the generated archetype.
>>
>> 6. Replacing of package names with ${package} seems to work different b/w
>> multi-module and single-module projects. In a multi-module project,
>> "org.appfuse.webapp" gets replaced with "${package}.webapp". In a
>> single-module project, "org.appfuse.webapp" gets replaced with
>> "${package}".
>>
>> 7. TLD files are not scanned for packages to replace.
>>
>> 8. The web.xml file is not scanned for packages to replace.
>>
>> I've been able to workaround most of these issues by using Ant to
>> manipulate
>> the project after it's generated (before installing). Should I enter
>> these
>> as issues in JIRA?
>>
>> Thanks,
>>
>> Matt
>> --
>> View this message in context:
>> http://www.nabble.com/Issues-with-archetype%3Acreate-from-project-tp23286970p23286970.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Issues-with-archetype%3Acreate-from-project-tp23286970p27933277.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Issues with archetype:create-from-project

Posted by mid491 <mi...@hotmail.com>.
"> 2. When I have an empty property (e.g. ), > it's removed from the
resulting pom.xml."


Hi, still not working with multi-modules (2.0-alpha-6)

-- 
View this message in context: http://maven.40175.n5.nabble.com/Issues-with-archetype-create-from-project-tp122518p2265030.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org