You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Greg Wittel (JIRA)" <ji...@codehaus.org> on 2010/03/29 17:45:23 UTC
[jira] Created: (ARCHETYPE-289) Support empty directory creation
Support empty directory creation
--------------------------------
Key: ARCHETYPE-289
URL: http://jira.codehaus.org/browse/ARCHETYPE-289
Project: Maven Archetype
Issue Type: Improvement
Components: Creator
Reporter: Greg Wittel
Fix For: 2.0-alpha-4
archetype.xml currently provides no way of creating empty directories.
--
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] Updated: (ARCHETYPE-289) Support empty directory creation
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy updated ARCHETYPE-289:
------------------------------------
Affects Version/s: 2.0
Fix Version/s: 2.1
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4, 2.0
> Reporter: Greg Wittel
> Fix For: 2.1
>
> Attachments: ARCHETYPE-289-test.zip
>
>
> archetype.xml currently provides no way of creating empty directories.
--
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-289) Support empty directory creation
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=276569#comment-276569 ]
Herve Boutemy commented on ARCHETYPE-289:
-----------------------------------------
first pass in [r1159926|http://svn.apache.org/viewvc?rev=1159926&view=rev]
this is actually limited to non-filtered filesets, I still need to investigate if it is reasonably extensible to filtered filesets (which actually creates an empty file instead of an empty directory)
notice that you must configure includeEmptyDirs=true for maven-resources-plugin or the archetype jar won't contain the empty directory (then of course the project generated from the archatype can't contain it...)
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: https://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4, 2.0
> Reporter: Greg Wittel
> Fix For: 2.1
>
> Attachments: ARCHETYPE-289-test.zip
>
>
> archetype.xml currently provides no way of creating empty directories.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (ARCHETYPE-289) Support empty directory creation
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=218064#action_218064 ]
Herve Boutemy commented on ARCHETYPE-289:
-----------------------------------------
archetype.xml is for Archetype 1.0.x: nothing will be fixed there
archetype-metadata.xml is for Archetype 2.0.x: if you provide a test case that I can reproduce, I'll work on a fix
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4
> Reporter: Greg Wittel
>
> archetype.xml currently provides no way of creating empty directories.
--
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-289) Support empty directory creation
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy closed ARCHETYPE-289.
-----------------------------------
Resolution: Fixed
Assignee: Herve Boutemy
filtered support added in [r1159957|http://svn.apache.org/viewvc?rev=1159957&view=rev]
IT support (comparison against reference) added in [r1159975| http://svn.apache.org/viewvc?rev=1159975&view=rev]
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: https://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4, 2.0
> Reporter: Greg Wittel
> Assignee: Herve Boutemy
> Fix For: 2.1
>
> Attachments: ARCHETYPE-289-test.zip
>
>
> archetype.xml currently provides no way of creating empty directories.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ARCHETYPE-289) Support empty directory creation
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy updated ARCHETYPE-289:
------------------------------------
Affects Version/s: 2.0-alpha-4
Fix Version/s: (was: 2.0-alpha-4)
2.0-alpha-5
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4
> Reporter: Greg Wittel
> Fix For: 2.0-alpha-5
>
>
> archetype.xml currently provides no way of creating empty directories.
--
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] Issue Comment Edited: (ARCHETYPE-289) Support empty
directory creation
Posted by "Greg Wittel (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215953#action_215953 ]
Greg Wittel edited comment on ARCHETYPE-289 at 3/29/10 3:26 PM:
----------------------------------------------------------------
ARCHETYPE-57 was never really resolved. As of alpha-4 and alpha-5 empty directories are not included in the archetype JAR files. There seem to be two issues:
1) -- Edit/clarification: Doesn't seem to be necessary.
2) The archetype archiver/JAR goal does not include empty directories unless explicitly listed in the archetype-metadata.xml. You can't apply inclusion wildcards, etc. The JAR mojo should include an includeEmptyDirs option. Additionally, this will require code changes to: archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetype.java (maybe others as well?)
In particular the archiveArchetype and zipper routines to include empty directories.
e.g. in zipper()
111 {
112 File[] files = currentSourceDirectory.listFiles();
113
114 for ( int i = 0; i < files.length; i++ )
115 {
116 if ( files[i].isDirectory() )
117 {
118 zipper( zos, offset, files[i] );
This area should have a check for if(includeEmptyDirs && files.length == 0) { ... add dir }
was (Author: gwittelpfpoint):
ARCHETYPE-57 was never really resolved. As of alpha-4 and alpha-5 empty directories are not included in the archetype JAR files. There seem to be two issues:
1) empty directories are not copied over into target/
This can be resolved by tweaking the resource plugin configuratioN:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>resources</id>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</execution>
</executions>
</plugin>
2) The archetype archiver/JAR goal does not include empty directories. The JAR mojo should include an includeEmptyDirs option. Additionally, this will require code changes to: archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetype.java (maybe others as well?)
In particular the archiveArchetype and zipper routines to include empty directories.
e.g. in zipper()
111 {
112 File[] files = currentSourceDirectory.listFiles();
113
114 for ( int i = 0; i < files.length; i++ )
115 {
116 if ( files[i].isDirectory() )
117 {
118 zipper( zos, offset, files[i] );
This area should have a check for if(includeEmptyDirs && files.length == 0) { ... add dir }
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Reporter: Greg Wittel
> Fix For: 2.0-alpha-4
>
>
> archetype.xml currently provides no way of creating empty directories.
--
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-289) Support empty directory creation
Posted by "Greg Wittel (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215953#action_215953 ]
Greg Wittel commented on ARCHETYPE-289:
---------------------------------------
ARCHETYPE-57 was never really resolved. As of alpha-4 and alpha-5 empty directories are not included in the archetype JAR files. There seem to be two issues:
1) empty directories are not copied over into target/
This can be resolved by tweaking the resource plugin configuratioN:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>resources</id>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</execution>
</executions>
</plugin>
2) The archetype archiver/JAR goal does not include empty directories. The JAR mojo should include an includeEmptyDirs option. Additionally, this will require code changes to: archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetype.java (maybe others as well?)
In particular the archiveArchetype and zipper routines to include empty directories.
e.g. in zipper()
111 {
112 File[] files = currentSourceDirectory.listFiles();
113
114 for ( int i = 0; i < files.length; i++ )
115 {
116 if ( files[i].isDirectory() )
117 {
118 zipper( zos, offset, files[i] );
This area should have a check for if(includeEmptyDirs && files.length == 0) { ... add dir }
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Reporter: Greg Wittel
> Fix For: 2.0-alpha-4
>
>
> archetype.xml currently provides no way of creating empty directories.
--
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] Updated: (ARCHETYPE-289) Support empty directory creation
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy updated ARCHETYPE-289:
------------------------------------
Fix Version/s: (was: 2.0-alpha-5)
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4
> Reporter: Greg Wittel
>
> archetype.xml currently provides no way of creating empty directories.
--
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] Updated: (ARCHETYPE-289) Support empty directory creation
Posted by "Grégory Joseph (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grégory Joseph updated ARCHETYPE-289:
-------------------------------------
Attachment: ARCHETYPE-289-test.zip
Herve, the attached zip file should show the issue. {{src/main/webapp}} is included in the generated artifact, as per the {{archetype-metadata.xml}}, but none of it's (empty) subdirectories is.
> Support empty directory creation
> --------------------------------
>
> Key: ARCHETYPE-289
> URL: http://jira.codehaus.org/browse/ARCHETYPE-289
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Creator
> Affects Versions: 2.0-alpha-4
> Reporter: Greg Wittel
> Attachments: ARCHETYPE-289-test.zip
>
>
> archetype.xml currently provides no way of creating empty directories.
--
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