-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpom.xml
151 lines (125 loc) · 5.92 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.tse</groupId>
<artifactId>jaxb-examples</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.maven-compiler-plugin>3.5.1</version.maven-compiler-plugin>
<version.jaxb2-maven-plugin>2.2</version.jaxb2-maven-plugin>
<version.build-helper-maven-plugin>1.7</version.build-helper-maven-plugin>
<version.jaxb-java-time-adapters>1.1.3</version.jaxb-java-time-adapters>
</properties>
<dependencies>
<dependency>
<groupId>com.migesok</groupId>
<artifactId>jaxb-java-time-adapters</artifactId>
<version>${version.jaxb-java-time-adapters}</version>
</dependency>
</dependencies>
<build>
<!-- Definition of additional Resource Folder -->
<resources>
<resource>
<directory>src/main/resources-gen</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.maven-compiler-plugin}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>${version.jaxb2-maven-plugin}</version>
<executions>
<!-- Generate Schema Files from Java Classes -->
<execution>
<id>schemagen</id>
<goals>
<goal>schemagen</goal>
</goals>
<configuration>
<!-- Define the Files to generate a Schema for -->
<sources>
<source>src/main/java/de/tse/jaxb/examples/objects/Person.java</source>
</sources>
<!-- Namespace to File Mapping -->
<transformSchemas>
<transformSchema>
<uri>http://xmldefs.mydefinitions/common</uri>
<toPrefix>cmn</toPrefix>
<toFile>Common.xsd</toFile>
</transformSchema>
</transformSchemas>
<!-- Target Directory for generated Schema Files -->
<outputDirectory>src/main/resources-gen/schemagen</outputDirectory>
</configuration>
</execution>
<!-- Generate Java Classes from Schema Files -->
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<!-- Use with Care! Enables JAXB RI Extensions -->
<extension>true</extension>
<!-- The Schema to generate Java Classes for -->
<sources>
<source>src/main/resources/schemas/Dictionary.xsd</source>
</sources>
<!-- Binding File for Customisation -->
<xjbSources>
<xjbSource>src/main/resources/bindings</xjbSource>
</xjbSources>
<!-- Define the Target Folder and Package -->
<outputDirectory>src/main/java-gen/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Definition of additional Source Folder -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${version.build-helper-maven-plugin}</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java-gen</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>