cxf-codegen adding superfluous underscore in enum member name - cxf-codegen-plugin
I have the following generated enumeration type. The issue I have is that for some reason (presumably capitalisation) that an underscore is inserted in the NCBonus value.
I would like to know how I can prevent that from happening when generating the enumeration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="PromoType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="MEM"/>
* <enumeration value="COU"/>
* <enumeration value="CHA"/>
* <enumeration value="SAD"/>
* <enumeration value="NCBonus"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
#XmlType(name = "PromoType")
#XmlEnum
public enum PromoType {
MEM("MEM"),
COU("COU"),
CHA("CHA"),
SAD("SAD"),
#XmlEnumValue("NCBonus")
NC_BONUS("NCBonus");
I have tried using the global bindings option
<jxb:globalBindings underscoreBinding="asCharInWord" xmlns:xs="http://www.w3.org/2001/XMLSchema">
which has undesired consequences on other objects but makes no different to the enum type.
In addition I have tried using
<jaxb:bindings schemaLocation="../schemas/insurance_service_model.xsd" node="//xs:schema">
<jaxb:bindings node="xs:simpleType[#name='PromoType']">
<jaxb:typesafeEnumMember name="NCBonus" value="NCBonus"/>
all to no avail.
Could someone please advise how I can achieve this goal please.
The answer that worked for me was to move the jaxb bindings out of the jaxws bindings file.
jaxb_bindings.xml
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
jaxb:version="2.0">
<jaxb:bindings schemaLocation="../schemas/insurance_service_model.xsd">
<jaxb:bindings node="//xsd:simpleType[#name='PromoType']">
<jaxb:typesafeEnumClass name="PromoType">
<jaxb:typesafeEnumMember name="NCBonus" value="NCBonus"/>
</jaxb:typesafeEnumClass>
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
wsdl_bindings.xml
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="../wsdl/insurance_service.wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
</jaxws:bindings>
pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.codegen.version}</version>
<executions>
<execution>
<id>csg</id>
<phase>generate-sources</phase>
<configuration>
<wsdlOptions>
<wsdlOption>
<wsdl>${project.basedir}/src/main/resources/v2_3/wsdl/insurance_service.wsdl</wsdl>
<extraargs>
<extraarg>-xjc-verbose</extraarg>
<extraarg>-verbose</extraarg>
</extraargs>
<bindingFiles>
<bindingFile>${project.basedir}/src/main/resources/common_binding.xml</bindingFile>
<bindingFile>${project.basedir}/src/main/resources/v2_3/bindings/wsdl_binding.xml</bindingFile>
<bindingFile>${project.basedir}/src/main/resources/v2_3/bindings/jaxb_bindings.xml</bindingFile>
</bindingFiles>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
Related
How to exclude META-INF WARNING after running mvn clean install?
the warnings look like this. Then under are my plugins How should I configure plugins to remove all META-INF warnings? the warnings look like this. Then under are my plugins How should I configure plugins to remove all META-INF warnings? Hier is one explanation that I have found. Maven Shade plugin: how resolve the warning message "define 1 overlapping resource: [WARNING] - META-INF/MANIFEST.MF" [WARNING] Discovered module-info.class. Shading will break its strong encapsulation. [WARNING] Discovered module-info.class. Shading will break its strong encapsulation. [WARNING] FastInfoset-1.2.15.jar, HikariCP-java7-2.4.13.jar, MigLayout-3.7.2.jar, SparseBitSet-1.2.jar, TeoClientTest.jar, activemq-client-5.17.0.jar, animal-sniffer-annotations-1.17.jar, ant-1.10.12.jar, ant-antlr-1.10.12.jar, ant-junit-1.10.12.jar, ant-launcher-1.10.12.jar, asm-7.1.jar, bapi-skif-11.5.0-SNAPSHOT.jar, bcprov-jdk15on-1.68.jar, byte-buddy-1.8.12.jar, c3p0-0.9.5.4.jar, cglib-3.3.0.jar, checker-qual-2.5.2.jar, classmate-1.4.0.jar, cloning-1.9.12.jar, commons-beanutils-1.9.4.jar, commons-cli-1.4.jar, commons-codec-1.15.jar, commons-collections-3.2.2.jar, commons-collections4-4.4.jar, commons-compiler-3.1.6.jar, commons-compress-1.19.jar, commons-digester-2.1.jar, commons-email-1.5.jar, commons-io-2.11.0.jar, commons-lang-2.6.jar, commons-lang3-3.4.jar, commons-math3-3.6.1.jar, curvesapi-1.06.jar, ecj-3.21.0.jar, error_prone_annotations-2.2.0.jar, failureaccess-1.0.1.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar, groovy-3.0.10.jar, groovy-ant-3.0.10.jar, groovy-astbuilder-3.0.10.jar, groovy-cli-picocli-3.0.10.jar, groovy-console-3.0.10.jar, groovy-datetime-3.0.10.jar, groovy-docgenerator-3.0.10.jar, groovy-groovydoc-3.0.10.jar, groovy-groovysh-3.0.10.jar, groovy-jmx-3.0.10.jar, groovy-json-3.0.10.jar, groovy-jsr223-3.0.10.jar, groovy-macro-3.0.10.jar, groovy-nio-3.0.10.jar, groovy-servlet-3.0.10.jar, groovy-sql-3.0.10.jar, groovy-swing-3.0.10.jar, groovy-templates-3.0.10.jar, groovy-test-3.0.10.jar, groovy-test-junit5-3.0.10.jar, groovy-testng-3.0.10.jar, groovy-xml-3.0.10.jar, gson-2.9.0.jar, guava-27.0.1-jre.jar, hawtbuf-1.11.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, httpmime-4.5.13.jar, itext-2.1.7.js9.jar, itextpdf-5.5.6.jar, j2objc-annotations-1.1.jar, jackson-annotations-2.11.3.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar, jackson-dataformat-xml-2.11.3.jar, jackson-module-jaxb-annotations-2.11.3.jar, jakarta.activation-2.0.1.jar, janino-3.1.6.jar, jasperreports-6.19.0.jar, javaparser-core-3.24.0.jar, javassist-3.28.0-GA.jar, javax.activation-api-1.2.0.jar, javax.annotation-api-1.3.2.jar, javax.jms-api-2.0.1.jar, javax.mail-1.5.6.jar, jaxb-api-2.3.1.jar, jaxb-core-3.0.2.jar, jaxb-impl-3.0.2.jar, jaxb-runtime-2.4.0-b180830.0438.jar, jcl-over-slf4j-1.7.35.jar, jcommander-1.78.jar, jcommon-1.0.24.jar, jdom2-2.0.6.1.jar, jfreechart-1.5.3.jar, jide-action-3.7.10.jar, jide-charts-3.7.10.jar, jide-common-3.7.10.jar, jide-components-3.7.10.jar, jide-dashboard-3.7.10.jar, jide-dock-3.7.10.jar, jide-editor-3.7.10.jar, jide-gantt-3.7.10.jar, jide-grids-3.7.10.jar, jide-pivot-3.7.10.jar, jide-plaf-3.7.10.jar, jide-shortcut-3.7.10.jar, jline-2.14.6.jar, jna-5.11.0.jar, jna-platform-5.11.0.jar, joda-time-2.10.14.jar, jollyday-0.5.10.jar, jquery-3.5.1.jar, jsr305-3.0.2.jar, jul-to-slf4j-1.7.35.jar, junit-jupiter-api-5.8.2.jar, junit-jupiter-engine-5.8.2.jar, junit-platform-commons-1.8.2.jar, junit-platform-engine-1.8.2.jar, junit-platform-launcher-1.8.2.jar, listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, log4j-over-slf4j-1.7.35.jar, logback-classic-1.2.10.jar, logback-core-1.2.10.jar, mapstruct-1.2.0.Final.jar, mchange-commons-java-0.2.15.jar, mybatis-3.5.7.jar, objenesis-3.0.1.jar, ojdbc11-21.5.0.0.jar, opencsv-2.3.jar, opentest4j-1.2.0.jar, picocli-4.6.1.jar, plac-exif-21.2.0.0.jar, poi-4.1.2.jar, poi-ooxml-4.1.2.jar, poi-ooxml-schemas-4.1.2.jar, qdox-1.12.1.jar, quartz-2.3.2.jar, reflections-0.10.2.jar, slf4j-api-1.7.35.jar, spring-aop-5.2.20.RELEASE.jar, spring-beans-5.2.20.RELEASE.jar, spring-context-5.2.20.RELEASE.jar, spring-context-support-5.2.20.RELEASE.jar, spring-core-5.2.20.RELEASE.jar, spring-expression-5.2.20.RELEASE.jar, spring-jdbc-5.2.20.RELEASE.jar, spring-jms-5.2.20.RELEASE.jar, spring-messaging-5.2.20.RELEASE.jar, spring-orm-5.2.20.RELEASE.jar, spring-oxm-5.2.20.RELEASE.jar, spring-plugin-core-1.2.0.RELEASE.jar, spring-plugin-metadata-1.2.0.RELEASE.jar, spring-security-core-5.4.10.jar, spring-tx-5.2.20.RELEASE.jar, spring-web-5.2.20.RELEASE.jar, spring-webmvc-5.2.20.RELEASE.jar, springfox-core-2.9.2.jar, springfox-schema-2.9.2.jar, springfox-spi-2.9.2.jar, springfox-spring-web-2.9.2.jar, springfox-swagger-common-2.9.2.jar, springfox-swagger-ui-2.9.2.jar, springfox-swagger2-2.9.2.jar, stax-ex-1.8.jar, stax2-api-4.2.1.jar, swagger-annotations-1.5.20.jar, swagger-models-1.5.20.jar, teo-common-report-10.3.0-SNAPSHOT.jar, teo-common-ui-10.3.0-SNAPSHOT.jar, teo-common-ui-report-10.3.0-SNAPSHOT.jar, teo-common-util-10.3.0-SNAPSHOT.jar, teo-skif-12.7.0-SNAPSHOT.jar, testng-7.5.jar, threeten-extra-1.5.0.jar, ucp-21.5.0.0.jar, woodstox-core-6.2.1.jar, xbean-spring-4.20.jar, xmlbeans-3.1.0.jar define 1 overlapping resource: [WARNING] - META-INF/MANIFEST.MF [WARNING] activemq-client-5.17.0.jar, cglib-3.3.0.jar, classmate-1.4.0.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar, groovy-3.0.10.jar, groovy-ant-3.0.10.jar, groovy-astbuilder-3.0.10.jar, groovy-cli-picocli-3.0.10.jar, groovy-console-3.0.10.jar, groovy-datetime-3.0.10.jar, groovy-docgenerator-3.0.10.jar, groovy-groovydoc-3.0.10.jar, groovy-groovysh-3.0.10.jar, groovy-jmx-3.0.10.jar, groovy-json-3.0.10.jar, groovy-jsr223-3.0.10.jar, groovy-macro-3.0.10.jar, groovy-nio-3.0.10.jar, groovy-servlet-3.0.10.jar, groovy-sql-3.0.10.jar, groovy-swing-3.0.10.jar, groovy-templates-3.0.10.jar, groovy-test-3.0.10.jar, groovy-test-junit5-3.0.10.jar, groovy-testng-3.0.10.jar, groovy-xml-3.0.10.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, httpmime-4.5.13.jar, jackson-annotations-2.11.3.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar, jackson-dataformat-xml-2.11.3.jar, jackson-module-jaxb-annotations-2.11.3.jar, jna-5.11.0.jar, jna-platform-5.11.0.jar, mybatis-3.5.7.jar, objenesis-3.0.1.jar, poi-4.1.2.jar, poi-ooxml-4.1.2.jar, poi-ooxml-schemas-4.1.2.jar, stax2-api-4.2.1.jar, woodstox-core-6.2.1.jar, xbean-spring-4.20.jar define 1 overlapping resource: [WARNING] - META-INF/LICENSE [WARNING] activemq-client-5.17.0.jar, cglib-3.3.0.jar, classmate-1.4.0.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar, groovy-3.0.10.jar, groovy-ant-3.0.10.jar, groovy-astbuilder-3.0.10.jar, groovy-cli-picocli-3.0.10.jar, groovy-console-3.0.10.jar, groovy-datetime-3.0.10.jar, groovy-docgenerator-3.0.10.jar, groovy-groovydoc-3.0.10.jar, groovy-groovysh-3.0.10.jar, groovy-jmx-3.0.10.jar, groovy-json-3.0.10.jar, groovy-jsr223-3.0.10.jar, groovy-macro-3.0.10.jar, groovy-nio-3.0.10.jar, groovy-servlet-3.0.10.jar, groovy-sql-3.0.10.jar, groovy-swing-3.0.10.jar, groovy-templates-3.0.10.jar, groovy-test-3.0.10.jar, groovy-test-junit5-3.0.10.jar, groovy-testng-3.0.10.jar, groovy-xml-3.0.10.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, httpmime-4.5.13.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar, jackson-dataformat-xml-2.11.3.jar, jackson-module-jaxb-annotations-2.11.3.jar, mybatis-3.5.7.jar, objenesis-3.0.1.jar, poi-4.1.2.jar, poi-ooxml-4.1.2.jar, poi-ooxml-schemas-4.1.2.jar, xbean-spring-4.20.jar define 1 // [WARNING] maven-shade-plugin has detected that some class files are [WARNING] present in two or more JARs. When this happens, only one [WARNING] single version of the class is copied to the uber jar. [WARNING] Usually this is not harmful and you can skip these warnings, [WARNING] otherwise try to manually exclude artifacts based on [WARNING] mvn dependency:tree -Ddetail=true and the above output. [WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/ How can I remove these WARNINGS? My plugins looks like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.4</version> <configuration> <minimizeJar>true</minimizeJar> <inLibsFilter>!META-INF/**,!META-INF/versions/9/**.class</inLibsFilter> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.basepom.maven</groupId> <artifactId>duplicate-finder-maven-plugin</artifactId> <version>1.5.1</version> <executions> <execution> <id>default</id> <phase>verify</phase> <goals> <goal>check</goal> </goals> </execution> </executions> <configuration> <printEqualFiles>false</printEqualFiles> <failBuildInCaseOfDifferentContentConflict>false</failBuildInCaseOfDifferentContentConflict> <failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict> <failBuildInCaseOfConflict>false</failBuildInCaseOfConflict> <checkCompileClasspath>true</checkCompileClasspath> <checkRuntimeClasspath>true</checkRuntimeClasspath> <checkTestClasspath>false</checkTestClasspath> <skip>false</skip> <quiet>false</quiet> <preferLocal>true</preferLocal> <useResultFile>true</useResultFile> <resultFileMinClasspathCount>2</resultFileMinClasspathCount> <resultFile>${project.build.directory}/duplicate-finder-result.xml</resultFile> <includeBootClasspath>false</includeBootClasspath> <bootClasspathProperty>sun.boot.class.path</bootClasspathProperty> <useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList> <includePomProjects>false</includePomProjects> <useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList> <ignoredResourcePatterns> <ignoredResourcePattern>jasperreports_extension\.properties</ignoredResourcePattern> <ignoredResourcePattern>\.project</ignoredResourcePattern> <ignoredResourcePattern>.*\.png$</ignoredResourcePattern> <ignoredResourcePattern>.*\.txt$</ignoredResourcePattern> <ignoredResourcePattern>.*\.json$</ignoredResourcePattern> <ignoredResourcePattern>.*\.xml$</ignoredResourcePattern> <ignoredResourcePattern>.*\.properties$</ignoredResourcePattern> <ignoredResourcePattern>.*\.md$</ignoredResourcePattern> </ignoredResourcePatterns> <ignoredClassPatterns> <ignoredClassPattern>(META-INF)</ignoredClassPattern> </ignoredClassPatterns> <!-- Beispiele <ignoredResourcePatterns> jasperreports_extension.properties <ignoredResourcePattern>.*index\.html$</ignoredResourcePattern> </ignoredResourcePatterns> <ignoredClassPatterns> <ignoredClassPattern>javax.*$</ignoredClassPattern> </ignoredClassPatterns> --> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>*:*</artifact> <!-- We need to exclude the signatures for any signed jars otherwise we get an exception. --> <excludes> <exclude>META-INF/*</exclude> <exclude>META-INF/*.*</exclude> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </configuration> </plugin>
This example works for me: ... <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.example.pikachu.Pikachu</mainClass> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> <resource>MANIFEST.MF</resource> </transformer> </transformers> <filters> <filter> <artifact>com.example.pikachu:*</artifact> <excludes> <exclude>META-INF/*.MF</exclude> </excludes> </filter> </filters> </configuration> ...
How to change swagger group name (names displayed in the dropdown menu) with swagger-annotations and swagger-maven-plugin
I'm using Swagger-maven-plugin and Swagger-annotations. I have two java controllers in the same package xxcontrollerV1 and xxcontrollerV2 which are annotated with #Api(value = "xxcontrollerV1",tags = {"xxcontroller V1"}), In swagger-ui dropdown group, they appear with the same name "xxcontroller API" without version. here is my swagger-maven-plugin configuration : <apiSource> <locations> <location> webservices.api.xxapi.web.controller.xxControllerV1 </location> </locations> <basePath>[BASEPATH_TAG]</basePath> <info> <title>XX API V1</title> <version>${project.version}</version> </info> <securityDefinitions> <securityDefinition> <jsonPath>${project.basedir}/securityDefinition-BearerToken.json</jsonPath> </securityDefinition> </securityDefinitions> <swaggerDirectory> ${project.build.directory}/${project.build.finalName}/swagger/xx_v1 </swaggerDirectory> <outputFormats>json</outputFormats> </apiSource> <apiSource> <locations> <location> webservices.api.xxapi.web.controller.xxControllerV2 </location> </locations> <basePath>[BASEPATH_TAG]</basePath> <info> <title>XX API V2</title> <version>${project.version}</version> </info> <swaggerDirectory> ${project.build.directory}/${project.build.finalName}/swagger/xx_v2 </swaggerDirectory> <outputFormats>json</outputFormats> </apiSource> Is there any way to modify the name of group displayed in the dropdown ? Thanks !
Adding custom classes required by maven-antrun-plugin
I have an Ant task which is executed in maven by using maven-antrun-plugin. This tas uses an XmlTask to read some values from an XML file. The task fails with a class load error as the definition for this tas is in a separate jar. How can I add this jar to the classpath? I have tried adding this jar to the lib directory of both Maven and Ant, but still, I get this error. Below is a section of my pom.xml where the error is: <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>versionConsistency</id> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/> <xmltask source="Upgrade.xml"> <copy path="component/versions/version/#number" property="fVer" /> </xmltask> <property name="pVer" value = "${project.version}" /> <script language="javascript"> <![CDATA[ fVer = project.getProperty('fVer'); pVer = project.getProperty('pVer'); if( fVer == pVer){ project.setProperty('isVerConsistent','true'); }else if (pVer.substring(0, pVer.search("-")) == fVer){ project.setProperty('isVerConsistent','true'); }else{ project.setProperty('isVerConsistent','false'); var fail = project.createTask("fail"); fail.setMessage("Project version and version in Upgrade.xml do not match"); fail.perform(); } ]]> </script> </target> </configuration> </execution> </executions>
Object of class Mage_Cron_Model_Schedule could not be converted to string
I get the error above for some reason when I try to manually execute the /cron.php file. Here is my config.xml for a module that I think is causing the issue <?xml version="1.0" encoding="UTF-8"?> <!-- The root node for Magento module configuration --> <config> <!-- The module's node contains basic information about each Magento module --> <modules> <!-- This must exactly match the namespace and module's folder names, with directory separators replaced by underscores --> <Company_ScheduledPriceDrop> <!-- The version of our module, starting at 0.0.1 --> <version>0.0.1</version> </Company_ScheduledPriceDrop> </modules> <crontab> <jobs> <Company_ScheduledPriceDrop> <schedule> <cron_expr>*/5 * * * *</cron_expr> </schedule> <run> <model>Company_ScheduledPriceDrop/observer::setPrice</model> </run> </Company_ScheduledPriceDrop> </jobs> </crontab> </config> And here is the observer file that is being called <?php class Company_ScheduledPriceDrop_Model_Observer extends Mage_Core_Model_Abstract { public function setPrice() { Mage::log("WORKS!"); } } I'm not sure what the error means, can anyone help please?
\app\etc\modules\Company_ScheduledPriceDrop.xml, \app\code\local\Company\ScheduledPriceDrop\etc\config.xml, and \app\code\local\Company\ScheduledPriceDrop\Model\Observer.php should be your files. Company_ScheduledPriceDrop.xml <config> <modules> <Company_ScheduledPriceDrop> <active>true</active> <codePool>local</codePool> </Company_ScheduledPriceDrop> </modules> </config> This file tells Magento that you have a module to load. config.xml <config> <modules> <Company_ScheduledPriceDrop> <version>1.0.0</version> </Company_ScheduledPriceDrop> </modules> <global> <models> <scheduledpricedrop> <class>Company_ScheduledPriceDrop_Model</class> </scheduledpricedrop> </models> </global> <crontab> <jobs> <scheduledpricedrop> <schedule> <cron_expr>*/5 * * * *</cron_expr> </schedule> <run> <model>scheduledpricedrop/observer::setPrice</model> </run> </scheduledpricedrop> </jobs> </crontab> </config> This file tells Magento where the module plugs in to the Magento system. Also.. you need to have your models in the global namespace for cron stuff. Hope this helps! If that still doesn't work, please post the full error output by Magento and I'll update the answer. Also here, have this How to setup a cron job in Magento module?
<?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Company_Schedule> <version>0.0.1</version> </Company_Schedule> </modules> <global> <models> <schedule> <class>Company_Schedule_Model</class> </schedule> </models> </global> <crontab> <jobs> <schedulepricedrop_cronjob> <schedule> <cron_expr>*/5 * * * *</cron_expr> </schedule> <run> <model>schedule/observer::setPrice</model> </run> </schedulepricedrop_cronjob> </jobs> </crontab> </config> It works for me. Select from cron_schedule: 100 schedulepricedrop_cronjob pending NULL 2015-04-10 05:22:11 2015-04-10 05:25:00 NULL NULL 101 schedulepricedrop_cronjob pending NULL 2015-04-10 05:22:11 2015-04-10 05:30:00 NULL NULL 102 schedulepricedrop_cronjob pending NULL 2015-04-10 05:22:11 2015-04-10 05:35:00 NULL NULL 103 schedulepricedrop_cronjob pending NULL 2015-04-10 05:22:11 2015-04-10 05:40:00 NULL NULL
maven-jaxb2-plugin (maven) generated date and time
I'm trying to remove the generated date and time from files generated with plugin maven-jaxb2-plugin. Is-it possible? Part of pom.xml : <build> <plugins> <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.8.3</version> <executions> <execution> <id>commun-generate</id> <goals> <goal>generate</goal> </goals> <configuration> <generatePackage>my.package.dest</generatePackage> <generateDirectory>${basedir}/src/main/java/</generateDirectory> <schemaDirectory>${basedir}/src/main/resources/schemas/wsrest</schemaDirectory> <bindingDirectory>${basedir}/src/main/resources/schemas/wsrest</bindingDirectory> <bindingIncludes> <include>bindings.xml</include> </bindingIncludes> <strict>false</strict> <extension>true</extension> <verbose>true</verbose> </configuration> </execution> Begin of a generated file : // // Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.6 // Voir http://java.sun.com/xml/jaxb // Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source. // Généré le : 2014.03.17 à 09:42:08 AM CET // package my.package.dest; ... I would like to remove this part : Généré le : 2014.03.17 à 09:42:08 AM CET thanks in advance Clément
FYI noFileHeader configuration parameter is supported from 0.9.0. So you can just do <configuration> <noFileHeader>true</noFileHeader> </configuration> now. See controlling the output section in the docs.
#lexicore's answer still works in 0.14.0 version. Simply add <noFileHeader>true</noFileHeader> in the configuration section. <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.14.0</version> <configuration> <noFileHeader>true</noFileHeader> <schemaLanguage>wsdl</schemaLanguage> <generatePackage>[...]</generatePackage> <generateDirectory>${project.basedir}/src/main/java</generateDirectory> <schemas> <schema> <url>[...]</url> </schema> </schemas> </configuration>
I found a workaround describe here : Skip the Generated on... in Java files using jaxb2 maven plugin Solution? add in pom.xml, in , theses arguments : <args><arg>-no-header</arg></args> result : no header is generated