[ 
https://issues.apache.org/jira/browse/ARCHETYPE-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792195#comment-17792195
 ] 

ASF GitHub Bot commented on ARCHETYPE-64:
-----------------------------------------

WolfgangHG commented on PR #160:
URL: https://github.com/apache/maven-archetype/pull/160#issuecomment-1836736679

   About empty directories: one could think that it could be feature in the new 
version that empty directories are also included in the jar file. But I tried 
to add empty folders in different places in the archetype source directory 
structure, and none of them was included in the archetype jar (using archetype 
plugin 3.2.1, which creates jar entries for all directories, but without my 
workaround). 
   Several StackOverflow answers suggest to achieve this by using filesets.
   
   Then I found this suggestion which does not work any more with my 
workaround: 
https://stackoverflow.com/questions/2786966/how-to-create-empty-folders-with-maven-archetype
   When adding the "maven-resources-plugin" with "includeEmptyDirs=true", then 
this will work with 3.2.1 as expected: all empty dirs are added. But my 
workaround breaks this code.
   
   The only solution I could think of: parse "archetype-metadata.xml" and 
exclude all directories that are defined as root dirs of filesets. But how to 
do this and how to handle the excludes? As I wrote above, I did not manage to 
specify exclusions on "DefaultFileSet".




> groupId and version redundant when executing archetype with parent
> ------------------------------------------------------------------
>
>                 Key: ARCHETYPE-64
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-64
>             Project: Maven Archetype
>          Issue Type: Improvement
>          Components: Generator
>    Affects Versions: 1.0-alpha-4
>            Reporter: Rod Coffin
>            Priority: Major
>         Attachments: ARCHETYPE-64-maven-archetype-core.patch
>
>
> Running the archetype plugin in a parent project creates a sub-project 
> (module).  Although the parent elements are properly set in the child pom, 
> the group id and version are repeated.  These are not necessary since they 
> will be inherited from the parent.  Ex:
> {code:xml}
>   <parent>
>     <artifactId>parent</artifactId>
>     <groupId>com.rfc.archetypes.example</groupId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.rfc.archetypes.example</groupId>
>   <artifactId>example-web</artifactId>
>   <version>1.0-SNAPSHOT</version>
> {code}
> Having this information is two places is bad in principle because it violates 
> the DRY principle and in practice because they can get out of sync 
> accidentally and it could be confusing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to