Guest User

Untitled

a guest
Mar 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. import javax.xml.bind.annotation.XmlEnum;
  2. import javax.xml.bind.annotation.XmlType;
  3.  
  4.  
  5. /**
  6. * <p>Java class for LogLevelType.
  7. *
  8. * <p>The following schema fragment specifies the expected content contained within this class.
  9. * <p>
  10. * <pre>
  11. * <simpleType name="LogLevelType">
  12. * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
  13. * <enumeration value="ERROR"/>
  14. * <enumeration value="WARNING"/>
  15. * <enumeration value="INFO"/>
  16. * <enumeration value="DEBUG"/>
  17. * </restriction>
  18. * </simpleType>
  19. * </pre>
  20. *
  21. */
  22. @XmlType(name = "LogLevelType", namespace = "http://www.brabantia.com/XMLSchema/Logging")
  23. @XmlEnum
  24. public enum LogLevelType {
  25.  
  26. ERROR,
  27. WARNING,
  28. INFO,
  29. DEBUG;
  30.  
  31. public String value() {
  32. return name();
  33. }
  34.  
  35. public static LogLevelType fromValue(String v) {
  36. return valueOf(v);
  37. }
  38. }
  39.  
  40. import javax.xml.bind.annotation.XmlEnum
  41. import javax.xml.bind.annotation.XmlType
  42.  
  43. @XmlType(name = "ErrorCategoryType", namespace = "http://www.brabantia.com/XMLSchema/Enum")
  44. @XmlEnum
  45. enum class ErrorCategoryType {
  46. FUNCTIONAL,
  47. TECHNICAL;
  48.  
  49. fun value(): String = name
  50. fun fromValue(v: String) = valueOf(v)
  51. }
  52.  
  53. <plugin>
  54. <groupId>org.codehaus.mojo</groupId>
  55. <artifactId>jaxb2-maven-plugin</artifactId>
  56. <version>2.3.1</version>
  57. <executions>
  58. <execution>
  59. <id>xjc</id>
  60. <goals>
  61. <goal>xjc</goal>
  62. </goals>
  63. <configuration>
  64. <outputDirectory>${project.build.directory}/generated-sources/jaxb</outputDirectory>
  65.  
  66. <!-- The package of your generated sources -->
  67. <packageName>com.brabantia.common.schema</packageName>
  68. <sources>
  69. <source>${project.basedir}/src/main/resources/BrabantiaMain.xsd</source>
  70. </sources>
  71. </configuration>
  72. </execution>
  73. <execution>
  74. <id>schemagen</id>
  75. <goals>
  76. <goal>schemagen</goal>
  77. </goals>
  78. <configuration>
  79. <outputDirectory>${project.basedir}/src/main/resources/Generated</outputDirectory>
  80. <sources>
  81. <source>${project.basedir}/src/main/kotlin/com/brabantia/common/xmlschemas/enums</source>
  82. </sources>
  83. </configuration>
  84. </execution>
  85. </executions>
  86. </plugin>
  87.  
  88. Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.3.1:schemagen (default-cli) on project xml-schemas: Execution default-cli of goal org.codehaus.mojo:jaxb2-maven-plugin:2.3.1:schemagen failed: syntax error @[1,41] in file:/C:/projects/INTEGRATION_FACTORY/XML_SCHEMAS/src/main/kotlin/com/brabantia/common/xmlschemas/enum/ErrorCategoryType.kt -> [Help 1]
Add Comment
Please, Sign In to add comment