You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by zhaoyi <yo...@gmail.com> on 2010/07/09 04:36:22 UTC
Maven jaxb2 plugin encoding issue
I set up jaxb2 plugin in my maven. It will generate code first then compile
the code. My problem is that when jaxb2 generate the code, it will generate
a commend line in the source code "// Generated on: 2010...". The time line
include Chinese character for that I am using a Chinese version OS. When
maven begins to build the source code, I will get an error that maven
doesn't map UTF-8 character. How can I change the generated time character
on jaxb2 plugin?
thanks.
--
View this message in context: http://maven.40175.n5.nabble.com/Maven-jaxb2-plugin-encoding-issue-tp1045281p1045281.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven jaxb2 plugin encoding issue
Posted by Thomas Markus <t....@proventis.net>.
Hi,
we use
<plugin>
<!-- http://mojo.codehaus.org/jaxb2-maven-plugin/xjc-mojo.html -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>jaxb2-maven-plugin-run</id>
<phase>generate-sources</phase>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<packageName>....</packageName>
</configuration>
</execution>
</executions>
</plugin>
thomas
Am 09.07.2010 08:35, schrieb zhaoyi:
> Below is our configuration. The -no-header doesn't solve the problem.
>
> <plugin>
> <groupId>org.jvnet.jaxb2.maven2</groupId>
> <artifactId>maven-jaxb2-plugin</artifactId>
> <version>0.7.1</version>
> <executions>
> <execution>
> <id>generate-jaxb</id>
> <phase>generate-test-sources</phase>
> <goals>
> <goal>generate</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <generatePackage>com.example.ipo.jaxb</generatePackage>
>
> <generateDirectory>${project.build.directory}/jaxb-source</generateDirectory>
>
> <schemaDirectory>${basedir}/src/test/resources</schemaDirectory>
> <schemaIncludes>
> <include>ipo.xsd</include>
> </schemaIncludes>
> <arguments>-no-header</arguments>
> </configuration>
> </plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven jaxb2 plugin encoding issue
Posted by Olivier Lamy <ol...@apache.org>.
Hi,
Afaik the plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin is not
maintained here.
We can answer for the plugin [1] : org.codehaus.mojo:jaxb2-maven-plugin
So try with this one if you have the same issue.
[1] http://mojo.codehaus.org/jaxb2-maven-plugin/
2010/7/9 zhaoyi <yo...@gmail.com>:
>
> Below is our configuration. The -no-header doesn't solve the problem.
>
> <plugin>
> <groupId>org.jvnet.jaxb2.maven2</groupId>
> <artifactId>maven-jaxb2-plugin</artifactId>
> <version>0.7.1</version>
> <executions>
> <execution>
> <id>generate-jaxb</id>
> <phase>generate-test-sources</phase>
> <goals>
> <goal>generate</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <generatePackage>com.example.ipo.jaxb</generatePackage>
>
> <generateDirectory>${project.build.directory}/jaxb-source</generateDirectory>
>
> <schemaDirectory>${basedir}/src/test/resources</schemaDirectory>
> <schemaIncludes>
> <include>ipo.xsd</include>
> </schemaIncludes>
> <arguments>-no-header</arguments>
> </configuration>
> </plugin>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Maven-jaxb2-plugin-encoding-issue-tp1045281p1045317.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Olivier
http://twitter.com/olamy
http://fr.linkedin.com/in/olamy
http://www.viadeo.com/fr/profile/olivier.lamy7
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven jaxb2 plugin encoding issue
Posted by zhaoyi <yo...@gmail.com>.
Below is our configuration. The -no-header doesn't solve the problem.
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.7.1</version>
<executions>
<execution>
<id>generate-jaxb</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<generatePackage>com.example.ipo.jaxb</generatePackage>
<generateDirectory>${project.build.directory}/jaxb-source</generateDirectory>
<schemaDirectory>${basedir}/src/test/resources</schemaDirectory>
<schemaIncludes>
<include>ipo.xsd</include>
</schemaIncludes>
<arguments>-no-header</arguments>
</configuration>
</plugin>
--
View this message in context: http://maven.40175.n5.nabble.com/Maven-jaxb2-plugin-encoding-issue-tp1045281p1045317.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven jaxb2 plugin encoding issue
Posted by Thomas Markus <t....@proventis.net>.
Hi,
try to deactivate the header.
<configuration>
<arguments>-no-header</arguments>
...
regards
thomas
Am 09.07.2010 04:36, schrieb zhaoyi:
> I set up jaxb2 plugin in my maven. It will generate code first then compile
> the code. My problem is that when jaxb2 generate the code, it will generate
> a commend line in the source code "// Generated on: 2010...". The time line
> include Chinese character for that I am using a Chinese version OS. When
> maven begins to build the source code, I will get an error that maven
> doesn't map UTF-8 character. How can I change the generated time character
> on jaxb2 plugin?
>
> thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven jaxb2 plugin encoding issue
Posted by zhaoyi <yo...@gmail.com>.
Does maven have a configuration for encoding or Calendar?
--
View this message in context: http://maven.40175.n5.nabble.com/Maven-jaxb2-plugin-encoding-issue-tp1045281p1045298.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven jaxb2 plugin encoding issue
Posted by Dan Tran <da...@gmail.com>.
file an jira issue with sample maven project , and provide a fix if
you can. jaxb2 plugin developer can work on it later.
-D
On Thu, Jul 8, 2010 at 7:36 PM, zhaoyi <yo...@gmail.com> wrote:
>
> I set up jaxb2 plugin in my maven. It will generate code first then compile
> the code. My problem is that when jaxb2 generate the code, it will generate
> a commend line in the source code "// Generated on: 2010...". The time line
> include Chinese character for that I am using a Chinese version OS. When
> maven begins to build the source code, I will get an error that maven
> doesn't map UTF-8 character. How can I change the generated time character
> on jaxb2 plugin?
>
> thanks.
> --
> View this message in context: http://maven.40175.n5.nabble.com/Maven-jaxb2-plugin-encoding-issue-tp1045281p1045281.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org