2011-08-01 30 views
7

Tôi muốn để có được những maven-jaxb2-plugin làm không viết 'từ chối trách nhiệm':Bỏ qua khởi tạo vào ngày ... trong các tập tin Java sử dụng jaxb2 maven Plugin

This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.2-hudson-jaxb-ri-2.2-63- 
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
Any modifications to this file will be lost upon recompilation of the source schema. 
Generated on: 2011.08.01 at 09:20:43 AM CEST 

Ít nhất là dấu thời gian.

Cảm ơn bạn.

Udo.

Trả lời

8

Sử dụng -no-header nếu bạn sử dụng trình tạo nguồn dòng lệnh hoặc header='false' nếu bạn sử dụng ant.

Trong pom, trong cấu hình <args><arg>-no-header</arg></args>

+0

Add câu trả lời của bạn rằng trong pom, trong cấu hình -no-header ssedano

+0

Chính xác những gì tôi đang tìm kiếm. Trang web này thực sự tuyệt vời! – julien

8

Chỉ cần thêm, tôi sử dụng Maven và những gì làm việc cho tôi là:

<arguments>-no-header</arguments> 
+1

hoạt động với ' org.codehaus.mojo jaxb2-maven-plugin 1.5' –

2

sử dụng "noGeneratedHeaderComments" dụ:

  <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>jaxb2-maven-plugin</artifactId> 
      <version>2.1</version> 
      <executions> 
       <execution> 
        <id>xjc</id> 
        <goals> 
         <goal>xjc</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <outputDirectory>${project.basedir}/src/main/java</outputDirectory> 
       <clearOutputDir>false</clearOutputDir> 
       <sources> 
        <source>${project.basedir}/src/main/resources/xsd</source> 
       </sources>  
       <noGeneratedHeaderComments>true</noGeneratedHeaderComments> 
      </configuration> 
     </plugin> 
Các vấn đề liên quan