You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Wendy Smoak (JIRA)" <ji...@codehaus.org> on 2007/03/04 03:27:00 UTC

[jira] Created: (ARCHETYPE-65) Restore the ability to "package" non-Java resources

Restore the ability to "package" non-Java resources
---------------------------------------------------

                 Key: ARCHETYPE-65
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-65
             Project: Maven Archetype
          Issue Type: Bug
          Components: Creator
    Affects Versions: 1.0-alpha-4
            Reporter: Wendy Smoak
         Attachments: archetype-resource-package-interpolation.patch

Some time ago, the Archetype plugin lost the ability to "package" non-Java resources.  The change was committed in April '06, so it would have first appeared in 1.0-alpha-4.

http://mail-archives.apache.org/mod_mbox/maven-commits/200604.mbox/%3C20060403072414.51468.qmail@minotaur.apache.org%3E

Prior to this change, you could put non-Java files in the <sources> element, for example
<source>src/main/resources/App.properties</source>
   and
mvn archetype:create ... -DgroupId=com.example
   would result in
src/main/resources/com/example/App.properties

Now, you get an error saying: "Template 'App.properties' is not in directory src/main/java."

One way to fix this is to roll back the changes from lines 682-705 in r390971:
http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?r1=390965&r2=390971&diff_format=h

However if I'm reading the changes right, that will break the ability to have "sub packages".

Maybe we need to leave <sources> alone, and have both <resources> and <packagedResources> ?

There is an example project (based on the quickstart archetype) in the sandbox.  It includes App.properties as described above.

http://svn.apache.org/repos/asf/maven/sandbox/trunk/archetype/maven-archetype-quickstart/


-- 
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] Commented: (ARCHETYPE-65) Restore the ability to "package" non-Java resources

Posted by "Raphaël Piéroni (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148905#action_148905 ] 

Raphaël Piéroni commented on ARCHETYPE-65:
------------------------------------------

Yup, 
I leaved this intentionnaly in archetype:create as archetype:generate encompass the archetype:create behaviour.

But it obviously works with archetype/generate and new kind of archetypes. Migrating old kind of archetypes to new kind is still to be done.

Raphaël

> Restore the ability to "package" non-Java resources
> ---------------------------------------------------
>
>                 Key: ARCHETYPE-65
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-65
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Creator
>    Affects Versions: 1.0-alpha-4
>            Reporter: Wendy Smoak
>             Fix For: 2.0-alpha-1
>
>         Attachments: archetype-resource-package-interpolation.patch
>
>
> Some time ago, the Archetype plugin lost the ability to "package" non-Java resources.  The change was committed in April '06, so it would have first appeared in 1.0-alpha-4.
> http://mail-archives.apache.org/mod_mbox/maven-commits/200604.mbox/%3C20060403072414.51468.qmail@minotaur.apache.org%3E
> Prior to this change, you could put non-Java files in the <sources> element, for example
> <source>src/main/resources/App.properties</source>
>    and
> mvn archetype:create ... -DgroupId=com.example
>    would result in
> src/main/resources/com/example/App.properties
> Now, you get an error saying: "Template 'App.properties' is not in directory src/main/java."
> One way to fix this is to roll back the changes from lines 682-705 in r390971:
> http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?r1=390965&r2=390971&diff_format=h
> However if I'm reading the changes right, that will break the ability to have "sub packages".
> Maybe we need to leave <sources> alone, and have both <resources> and <packagedResources> ?
> There is an example project (based on the quickstart archetype) in the sandbox.  It includes App.properties as described above.
> http://svn.apache.org/repos/asf/maven/sandbox/trunk/archetype/maven-archetype-quickstart/

-- 
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] Commented: (ARCHETYPE-65) Restore the ability to "package" non-Java resources

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148899#action_148899 ] 

Wendy Smoak commented on ARCHETYPE-65:
--------------------------------------

How was this addressed?  ARCHETYPE-203 implies that it was not fixed for archetype:create, but that it does work with archetype:generate.

> Restore the ability to "package" non-Java resources
> ---------------------------------------------------
>
>                 Key: ARCHETYPE-65
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-65
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Creator
>    Affects Versions: 1.0-alpha-4
>            Reporter: Wendy Smoak
>             Fix For: 2.0-alpha-1
>
>         Attachments: archetype-resource-package-interpolation.patch
>
>
> Some time ago, the Archetype plugin lost the ability to "package" non-Java resources.  The change was committed in April '06, so it would have first appeared in 1.0-alpha-4.
> http://mail-archives.apache.org/mod_mbox/maven-commits/200604.mbox/%3C20060403072414.51468.qmail@minotaur.apache.org%3E
> Prior to this change, you could put non-Java files in the <sources> element, for example
> <source>src/main/resources/App.properties</source>
>    and
> mvn archetype:create ... -DgroupId=com.example
>    would result in
> src/main/resources/com/example/App.properties
> Now, you get an error saying: "Template 'App.properties' is not in directory src/main/java."
> One way to fix this is to roll back the changes from lines 682-705 in r390971:
> http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?r1=390965&r2=390971&diff_format=h
> However if I'm reading the changes right, that will break the ability to have "sub packages".
> Maybe we need to leave <sources> alone, and have both <resources> and <packagedResources> ?
> There is an example project (based on the quickstart archetype) in the sandbox.  It includes App.properties as described above.
> http://svn.apache.org/repos/asf/maven/sandbox/trunk/archetype/maven-archetype-quickstart/

-- 
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] Commented: (ARCHETYPE-65) Restore the ability to "package" non-Java resources

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92369 ] 

Wendy Smoak commented on ARCHETYPE-65:
--------------------------------------

Related thread: http://www.nabble.com/Change-in-behavior-of-maven-archetype-plugin-t3342851.html

> Restore the ability to "package" non-Java resources
> ---------------------------------------------------
>
>                 Key: ARCHETYPE-65
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-65
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Creator
>    Affects Versions: 1.0-alpha-4
>            Reporter: Wendy Smoak
>         Attachments: archetype-resource-package-interpolation.patch
>
>
> Some time ago, the Archetype plugin lost the ability to "package" non-Java resources.  The change was committed in April '06, so it would have first appeared in 1.0-alpha-4.
> http://mail-archives.apache.org/mod_mbox/maven-commits/200604.mbox/%3C20060403072414.51468.qmail@minotaur.apache.org%3E
> Prior to this change, you could put non-Java files in the <sources> element, for example
> <source>src/main/resources/App.properties</source>
>    and
> mvn archetype:create ... -DgroupId=com.example
>    would result in
> src/main/resources/com/example/App.properties
> Now, you get an error saying: "Template 'App.properties' is not in directory src/main/java."
> One way to fix this is to roll back the changes from lines 682-705 in r390971:
> http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?r1=390965&r2=390971&diff_format=h
> However if I'm reading the changes right, that will break the ability to have "sub packages".
> Maybe we need to leave <sources> alone, and have both <resources> and <packagedResources> ?
> There is an example project (based on the quickstart archetype) in the sandbox.  It includes App.properties as described above.
> http://svn.apache.org/repos/asf/maven/sandbox/trunk/archetype/maven-archetype-quickstart/

-- 
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