Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-9030

"-suppress-generated-date" does not omit timestamps from @Generated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.8, 3.6.3, 4.0.4
    • 3.5.9, 4.1.0, 4.0.5, 3.6.4
    • Tooling
    • None
    • Unknown

    Description

      Problem description

      Given this config:

      <plugin>
      	<groupId>org.apache.cxf</groupId>
      	<artifactId>cxf-codegen-plugin</artifactId>
      	<version>${dependency.cxf.version}</version>
      	<executions>
      		<execution>
      			<id>generate-sources</id>
      			<phase>generate-sources</phase>
      			<goals>
      				<goal>wsdl2java</goal>
      			</goals>
      			<configuration>
      				<defaultOptions>
      					<markGenerated>true</markGenerated>
      					<suppressGeneratedDate>true</suppressGeneratedDate>
      				</defaultOptions>
      			</configuration>
      		</execution>
      	</executions>
      </plugin>
      

      The resulting code will have a timestamp in the @Generated annotation:

      @XmlAccessorType(XmlAccessType.FIELD)
      @XmlType(name = "MyServiceClass", propOrder = {
          "p1",
          "p2",
          "p3"
      })
      @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v2.3.5", date = "2024-06-18T09:12:10+02:00")
      public class MyServiceClass { }
      

      Expected behaviour

      No timestamp was generated (for reproducible builds)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bmarwell Benjamin Marwell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: