java - Why does Maven warn me about encoding? -


my goal create archetype project.

when run goal not involve maven-archetype-plugin, can't see warning:

[info] --- maven-resources-plugin:2.6:resources (default-resources) @ maven-archetype-base --- [info] using 'utf-8' encoding copy filtered resources. [info] copying 1 resource [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ maven-archetype-base --- [info] using 'utf-8' encoding copy filtered resources. [info] copying 0 resource [info] 

on other end, when run archetype:create-from-project, couple:

[info] --- maven-resources-plugin:2.6:resources (default-resources) @ maven-archetype-base-archetype --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] copying 10 resources [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ maven-archetype-base-archetype --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] copying 2 resources 

i know "standard" maven way use project.build.sourceencoding property. tried adding more properties pom in order address issue none of them worked.

any ideas? thanks.

i have following pom.xml:

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>my.group.id</groupid> <artifactid>my-artifact</artifactid> <version>0.0.1</version> <packaging>maven-archetype</packaging>  <properties>      <!-- compiler properties -->     <maven.compiler.target>1.7</maven.compiler.target>     <maven.compiler.source>1.7</maven.compiler.source>     <encoding>utf-8</encoding>     <project.build.sourceencoding>${encoding}</project.build.sourceencoding>     <project.reporting.outputencoding>${encoding}</project.reporting.outputencoding>     <project.resources.sourceencoding>${encoding}</project.resources.sourceencoding>     <archetype.encoding>${encoding}</archetype.encoding>      <!-- maven plugins version -->     <maven-archetype-plugin-version>2.2</maven-archetype-plugin-version>     <maven-resources-plugin-version>2.6</maven-resources-plugin-version>      <!-- maven extentions version -->     <maven-archetype-packaging-extension-version>2.2</maven-archetype-packaging-extension-version> </properties> <dependencies> [...] </dependencies>  <build>     <extensions>         <extension>             <groupid>org.apache.maven.archetype</groupid>             <artifactid>archetype-packaging</artifactid>             <version>${maven-archetype-packaging-extension-version}</version>         </extension>     </extensions>     <plugins>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-resources-plugin</artifactid>             <version>${maven-resources-plugin-version}</version>         </plugin>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-archetype-plugin</artifactid>             <version>${maven-archetype-plugin-version}</version>             <extensions>true</extensions>         </plugin>      </plugins>      <resources>         <resource>             <directory>src/main/resources</directory>             <filtering>true</filtering>         </resource>     </resources> </build> 

when run goal archetype:create-from-project, maven generates pom file building archetype @ target/generated-sources/archetype/pom.xml , runs package goal (by default) on pom.

the generated pom file doesn't have project.build.sourceencoding or other property defining encoding, , that's why warning.

the pom generated this prototype org.apache.maven.archetype.creator.filesetarchetypecreator#createarchetypeprojectpom, , code there doesn't seem way add properties resulting pom file.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -