Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-241

Filtering of directory name same as filenames

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha-4
    • Fix Version/s: 3.0.0
    • Component/s: Generator
    • Labels:
      None

      Description

      Currently I have the following setup:

      target\generated-sources\archetype\src\main\resources\archetype-resources
      - __rootArtifactId__-test1
         - src
            - main
               - java
      - __projectName__-test2
         - src
            - main
               - java
                  - Test-__projectName__.java
                     "This is ${projectName}!"
      

      When I use this archetype with the required property "projectName" set to "myName" it generates:

      - myArtifactId-test1
         - src
            - main
               - java
      - __projectName__-test2
         - src
            - main
               - java
                  - Test-myName.java
                     "This is myName!"
      

      This project builds as expected, but as you can see, the property is changed in all the filenames (thanks to ARCHETYPE-191) and Velocity changes the property in the files, but the directory isn't renamed. I would expect that the directory and module would also accept custom properties besides the usual rootArtifactId?

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-archetype-m3 #246 (See https://builds.apache.org/job/maven-archetype-m3/246/)
          ARCHETYPE-241 Filtering of directory name same as filenames (rfscholte: rev 8763512e7b13f360916c8f5ee02b068bcee987ab)

          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/archetype/pom.xml
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/project.properties
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241filter-directory/archetype/src/main/resources/archetype-resources/projectNametest2/src/main/java/TestprojectName_.java
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241filter-directory/archetype/src/main/resources/archetype-resources/projectName_-test2/pom.xml
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/invoker.properties
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/verify.groovy
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/pom.xml
          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241filter-directory/archetype/src/main/resources/archetype-resources/rootArtifactId_-test1/pom.xml
          • (add) maven-archetype-plugin/src/it/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/pom.xml
          • (edit) pom.xml
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-archetype-m3 #246 (See https://builds.apache.org/job/maven-archetype-m3/246/ ) ARCHETYPE-241 Filtering of directory name same as filenames (rfscholte: rev 8763512e7b13f360916c8f5ee02b068bcee987ab) (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/archetype/pom.xml (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/project.properties (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 filter-directory/archetype/src/main/resources/archetype-resources/ projectName test2/src/main/java/Test projectName _.java (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 filter-directory/archetype/src/main/resources/archetype-resources/ projectName _-test2/pom.xml (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/invoker.properties (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/verify.groovy (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/pom.xml (edit) archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 filter-directory/archetype/src/main/resources/archetype-resources/ rootArtifactId _-test1/pom.xml (add) maven-archetype-plugin/src/it/ ARCHETYPE-241 _filter-directory/archetype/src/main/resources/archetype-resources/pom.xml (edit) pom.xml
          Hide
          rfscholte Robert Scholte added a comment -
          Show
          rfscholte Robert Scholte added a comment - Fixed in 8763512e7b13f360916c8f5ee02b068bcee987ab
          Hide
          kumarprabal prabal kumar added a comment -

          I am facing the same issue. Have you resolved this? Please provide me the solution or link. Thanks.

          Show
          kumarprabal prabal kumar added a comment - I am facing the same issue. Have you resolved this? Please provide me the solution or link. Thanks.

            People

            • Assignee:
              rfscholte Robert Scholte
              Reporter:
              yor Roy van Rijn
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development