You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/01/31 02:19:34 UTC

[GitHub] [maven-archetype] ripper2hl opened a new pull request #36: WIP: Add feature no create base dir

ripper2hl opened a new pull request #36: WIP: Add feature no create base dir
URL: https://github.com/apache/maven-archetype/pull/36
 
 
   For now when you create an project always generate a directory with the name of the artifact but in some case this is not required.
   
   You can see https://stackoverflow.com/questions/24399613/using-maven-archetype-generate-in-the-same-directory
   
   Work-in-Progress.
   
   If this a bad approach let me know please.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-archetype] ripper2hl commented on issue #36: Add feature to create base dir

Posted by GitBox <gi...@apache.org>.
ripper2hl commented on issue #36: Add feature to create base dir
URL: https://github.com/apache/maven-archetype/pull/36#issuecomment-614946934
 
 
   This a related jira issue , i don't know if what is you need @elharo .
   
   https://issues.apache.org/jira/browse/ARCHETYPE-311

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-archetype] ripper2hl commented on a change in pull request #36: Add feature to create base dir

Posted by GitBox <gi...@apache.org>.
ripper2hl commented on a change in pull request #36: Add feature to create base dir
URL: https://github.com/apache/maven-archetype/pull/36#discussion_r409962351
 
 

 ##########
 File path: archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
 ##########
 @@ -390,4 +392,16 @@ public ArchetypeGenerationRequest setFilter( String filter )
 
         return this;
     }
+    
+    public boolean isCreateBaseDir()
+    {
+        return createBaseDir;
+    }
+    
+    public ArchetypeGenerationRequest setCreteBaseDir( boolean createBaseDir )
 
 Review comment:
   @michael-o you can review now, please

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-archetype] michael-o commented on a change in pull request #36: Add feature to create base dir

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #36: Add feature to create base dir
URL: https://github.com/apache/maven-archetype/pull/36#discussion_r409777230
 
 

 ##########
 File path: archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
 ##########
 @@ -390,4 +392,16 @@ public ArchetypeGenerationRequest setFilter( String filter )
 
         return this;
     }
+    
+    public boolean isCreateBaseDir()
+    {
+        return createBaseDir;
+    }
+    
+    public ArchetypeGenerationRequest setCreteBaseDir( boolean createBaseDir )
 
 Review comment:
   HEre is a typo

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-archetype] ripper2hl commented on a change in pull request #36: Add feature no create base dir

Posted by GitBox <gi...@apache.org>.
ripper2hl commented on a change in pull request #36: Add feature no create base dir
URL: https://github.com/apache/maven-archetype/pull/36#discussion_r374883848
 
 

 ##########
 File path: archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
 ##########
 @@ -136,7 +136,8 @@ public void generateArchetype( ArchetypeGenerationRequest request, File archetyp
 
             String packageName = request.getPackage();
             String artifactId = request.getArtifactId();
-            File outputDirectoryFile = new File( request.getOutputDirectory(), artifactId );
+            File outputDirectoryFile = new File( request.getOutputDirectory(),
 
 Review comment:
   `request.getOutputDirectory() ` return a String 
   
   If i use your code , needs a bit change
   
   ```java
   File outputDirectoryFile = request.isCreateBaseDir() ? new File( request.getOutputDirectory(), artifactId):  new File( request.getOutputDirectory() ) ;
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-archetype] ripper2hl commented on a change in pull request #36: Add feature to create base dir

Posted by GitBox <gi...@apache.org>.
ripper2hl commented on a change in pull request #36: Add feature to create base dir
URL: https://github.com/apache/maven-archetype/pull/36#discussion_r409904662
 
 

 ##########
 File path: archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
 ##########
 @@ -390,4 +392,16 @@ public ArchetypeGenerationRequest setFilter( String filter )
 
         return this;
     }
+    
+    public boolean isCreateBaseDir()
+    {
+        return createBaseDir;
+    }
+    
+    public ArchetypeGenerationRequest setCreteBaseDir( boolean createBaseDir )
 
 Review comment:
   :o  yes, i need fix it , 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-archetype] albfan commented on a change in pull request #36: WIP: Add feature no create base dir

Posted by GitBox <gi...@apache.org>.
albfan commented on a change in pull request #36: WIP: Add feature no create base dir
URL: https://github.com/apache/maven-archetype/pull/36#discussion_r373840917
 
 

 ##########
 File path: archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
 ##########
 @@ -136,7 +136,8 @@ public void generateArchetype( ArchetypeGenerationRequest request, File archetyp
 
             String packageName = request.getPackage();
             String artifactId = request.getArtifactId();
-            File outputDirectoryFile = new File( request.getOutputDirectory(), artifactId );
+            File outputDirectoryFile = new File( request.getOutputDirectory(),
 
 Review comment:
   I think this makes more sense:
   
       File outputDirectoryFile = request.isCreateBaseDir() ? new File( request.getOutputDirectory(), artifactId): request.getOutputDirectory();

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services