You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Geir Pettersen (JIRA)" <ji...@codehaus.org> on 2009/10/06 12:19:28 UTC

[jira] Created: (ARCHETYPE-260) Folders under src/main/resources are not renamed according to groupId when creating project from archetype

Folders under src/main/resources are not renamed according to groupId when creating project from archetype
----------------------------------------------------------------------------------------------------------

                 Key: ARCHETYPE-260
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-260
             Project: Maven Archetype
          Issue Type: Bug
            Reporter: Geir Pettersen


We have a template project which we use to create archetypes from using the 'mvn archetype:create-from-project' command. This template project has some configuration files that we stick under src/main/resources/<groupId>/config.xml - if the project's groupId is "org.company.templateApp" the path would be src/main/resources/org/company/templateApp". We do the same for some sample source code which we put under "src/main/java/<groupId>/Hello.java"

When we create a project from this template we see that the Hello.java is moved to a folder corresponding to the new project's groupId. When using groupId "org.company.myapp" maven would for instance  put our Hello.java in "src/main/java/org/company/myapp". This is a feature that we think is great, but it does not work with files that are in the "src/main/resources" -folder. Our config.xml which was located in "src/main/resources/org/company/templateApp/config.xml" is not moved to "src/../resources/o../c../myapp" in the newly created project. 

Our workaround for this issue is to put the xml config files in src/main/java instead. This is a solution that works for us (files are put in expected folders), but it goes against the idea of having separate java and resources folders, or at least it means that developers have to manually move these files after creating a project from the archetype.

Is this a bug? 
or is this a feature not intended for files in src/main/resources? If so, why not?



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (ARCHETYPE-260) Folders under src/main/resources are not renamed according to groupId when creating project from archetype

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed ARCHETYPE-260.
-----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Herve Boutemy

[Archetype Plugin 2.x descriptor|http://maven.apache.org/archetype/archetype-models/archetype-descriptor/archetype-descriptor.html] has packaged attribute to configure as you want

> Folders under src/main/resources are not renamed according to groupId when creating project from archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-260
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-260
>             Project: Maven Archetype
>          Issue Type: Bug
>            Reporter: Geir Pettersen
>            Assignee: Herve Boutemy
>
> We have a template project which we use to create archetypes from using the 'mvn archetype:create-from-project' command. This template project has some configuration files that we stick under src/main/resources/<groupId>/config.xml - if the project's groupId is "org.company.templateApp" the path would be src/main/resources/org/company/templateApp". We do the same for some sample source code which we put under "src/main/java/<groupId>/Hello.java"
> When we create a project from this template we see that the Hello.java is moved to a folder corresponding to the new project's groupId. When using groupId "org.company.myapp" maven would for instance  put our Hello.java in "src/main/java/org/company/myapp". This is a feature that we think is great, but it does not work with files that are in the "src/main/resources" -folder. Our config.xml which was located in "src/main/resources/org/company/templateApp/config.xml" is not moved to "src/../resources/o../c../myapp" in the newly created project. 
> Our workaround for this issue is to put the xml config files in src/main/java instead. This is a solution that works for us (files are put in expected folders), but it goes against the idea of having separate java and resources folders, or at least it means that developers have to manually move these files after creating a project from the archetype.
> Is this a bug? 
> or is this a feature not intended for files in src/main/resources? If so, why not?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira