You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "qxo (via GitHub)" <gi...@apache.org> on 2023/03/18 06:43:08 UTC

[GitHub] [maven-archetype] qxo opened a new pull request, #129: [ARCHETYPE-638] - fix: maven-archetype pom.xml should add request encoding

qxo opened a new pull request, #129:
URL: https://github.com/apache/maven-archetype/pull/129

   This commit remove below warning:
   [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-archetype] qxo commented on pull request #129: [ARCHETYPE-638] - fix: maven-archetype pom.xml should add request encoding

Posted by "qxo (via GitHub)" <gi...@apache.org>.
qxo commented on PR #129:
URL: https://github.com/apache/maven-archetype/pull/129#issuecomment-1484134980

   > Why is this not part of the `configurationProperties`?
   
   I have no idea about that.


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-archetype] michael-o commented on a diff in pull request #129: [ARCHETYPE-638] - fix: maven-archetype pom.xml should add request encoding

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #129:
URL: https://github.com/apache/maven-archetype/pull/129#discussion_r1141326698


##########
archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java:
##########
@@ -391,10 +392,12 @@ else if ( !properties.containsKey( Constants.PACKAGE ) )
      * Create the archetype project pom.xml file, that will be used to build the archetype.
      */
     private File createArchetypeProjectPom( MavenProject project, ProjectBuildingRequest buildingRequest,
-                                            Properties configurationProperties, File projectDir )
+                                            Properties configurationProperties, File projectDir,
+                                            String defaultEncoding )
         throws TemplateCreationException, IOException
     {
         Model model = new Model();
+        model.getProperties().put( "project.build.sourceEncoding", defaultEncoding );

Review Comment:
   What if the input value is null or empty?



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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-archetype] michael-o commented on pull request #129: [ARCHETYPE-638] - fix: maven-archetype pom.xml should add request encoding

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #129:
URL: https://github.com/apache/maven-archetype/pull/129#issuecomment-1484150838

   > > Why is this not part of the `configurationProperties`?
   > 
   > I have no idea about that.
   
   Try to evaluate that...


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-archetype] michael-o commented on a diff in pull request #129: [ARCHETYPE-638] - fix: maven-archetype pom.xml should add request encoding

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #129:
URL: https://github.com/apache/maven-archetype/pull/129#discussion_r1142295047


##########
archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java:
##########
@@ -391,10 +392,15 @@ else if ( !properties.containsKey( Constants.PACKAGE ) )
      * Create the archetype project pom.xml file, that will be used to build the archetype.
      */
     private File createArchetypeProjectPom( MavenProject project, ProjectBuildingRequest buildingRequest,
-                                            Properties configurationProperties, File projectDir )
+                                            Properties configurationProperties, File projectDir,
+                                            String defaultEncoding )
         throws TemplateCreationException, IOException
     {
         Model model = new Model();
+        if ( defaultEncoding != null && !defaultEncoding.isEmpty() )

Review Comment:
   You could use `StringUtils`. It is imported anyway.



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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org