|
277 | 277 | </execution> |
278 | 278 | </executions> |
279 | 279 | </plugin> |
280 | | - <plugin> |
281 | | - <groupId>org.codehaus.mojo</groupId> |
282 | | - <artifactId>jaxb2-maven-plugin</artifactId> |
283 | | - <executions> |
284 | | - <execution> |
285 | | - <id>schemagen</id> |
286 | | - <phase>generate-resources</phase> |
287 | | - <goals> |
288 | | - <goal>schemagen</goal> |
289 | | - </goals> |
290 | | - <configuration> |
291 | | - <workDirectory>${project.build.directory}/generated-resources/schemagen</workDirectory> |
292 | | - <includes> |
293 | | - org/dozer/builder/model/jaxb/** |
294 | | - </includes> |
295 | | - <transformSchemas> |
296 | | - <transformSchema> |
297 | | - <uri>http://dozermapper.github.io/schema/bean-mapping</uri> |
298 | | - <toFile>bean-mapping.xsd</toFile> |
299 | | - </transformSchema> |
300 | | - </transformSchemas> |
301 | | - </configuration> |
302 | | - </execution> |
303 | | - </executions> |
304 | | - </plugin> |
305 | 280 | <plugin> |
306 | 281 | <groupId>org.codehaus.mojo</groupId> |
307 | 282 | <artifactId>xmlbeans-maven-plugin</artifactId> |
|
321 | 296 | </plugins> |
322 | 297 | </build> |
323 | 298 |
|
| 299 | + <profiles> |
| 300 | + <profile> |
| 301 | + <id>jdk8-build</id> |
| 302 | + <activation> |
| 303 | + <jdk>1.8</jdk> |
| 304 | + </activation> |
| 305 | + <build> |
| 306 | + <plugins> |
| 307 | + <plugin> |
| 308 | + <groupId>org.codehaus.mojo</groupId> |
| 309 | + <artifactId>jaxb2-maven-plugin</artifactId> |
| 310 | + <executions> |
| 311 | + <execution> |
| 312 | + <id>schemagen</id> |
| 313 | + <phase>generate-resources</phase> |
| 314 | + <goals> |
| 315 | + <goal>schemagen</goal> |
| 316 | + </goals> |
| 317 | + <configuration> |
| 318 | + <workDirectory>${project.build.directory}/generated-resources/schemagen</workDirectory> |
| 319 | + <includes> |
| 320 | + org/dozer/builder/model/jaxb/** |
| 321 | + </includes> |
| 322 | + <transformSchemas> |
| 323 | + <transformSchema> |
| 324 | + <uri>http://dozermapper.github.io/schema/bean-mapping</uri> |
| 325 | + <toFile>bean-mapping.xsd</toFile> |
| 326 | + </transformSchema> |
| 327 | + </transformSchemas> |
| 328 | + </configuration> |
| 329 | + </execution> |
| 330 | + </executions> |
| 331 | + </plugin> |
| 332 | + </plugins> |
| 333 | + </build> |
| 334 | + </profile> |
| 335 | + <profile> |
| 336 | + <id>jdk9-build</id> |
| 337 | + <activation> |
| 338 | + <jdk>9</jdk> |
| 339 | + </activation> |
| 340 | + <build> |
| 341 | + <plugins> |
| 342 | + <plugin> |
| 343 | + <groupId>org.codehaus.mojo</groupId> |
| 344 | + <artifactId>jaxb2-maven-plugin</artifactId> |
| 345 | + <executions> |
| 346 | + <execution> |
| 347 | + <id>schemagen</id> |
| 348 | + <phase>generate-resources</phase> |
| 349 | + <goals> |
| 350 | + <goal>schemagen</goal> |
| 351 | + </goals> |
| 352 | + <configuration> |
| 353 | + <workDirectory>${project.build.directory}/generated-resources/schemagen</workDirectory> |
| 354 | + <includes> |
| 355 | + org/dozer/builder/model/jaxb/** |
| 356 | + </includes> |
| 357 | + </configuration> |
| 358 | + </execution> |
| 359 | + </executions> |
| 360 | + <dependencies> |
| 361 | + <dependency> |
| 362 | + <groupId>org.glassfish.jaxb</groupId> |
| 363 | + <artifactId>jaxb-jxc-jdk9</artifactId> |
| 364 | + <version>2.3.0</version> |
| 365 | + </dependency> |
| 366 | + <dependency> |
| 367 | + <groupId>javax.activation</groupId> |
| 368 | + <artifactId>javax.activation-api</artifactId> |
| 369 | + <version>1.2.0</version> |
| 370 | + </dependency> |
| 371 | + </dependencies> |
| 372 | + </plugin> |
| 373 | + <plugin> |
| 374 | + <groupId>org.apache.maven.plugins</groupId> |
| 375 | + <artifactId>maven-antrun-plugin</artifactId> |
| 376 | + <executions> |
| 377 | + <execution> |
| 378 | + <id>copy-schema</id> |
| 379 | + <phase>generate-resources</phase> |
| 380 | + <configuration> |
| 381 | + <target> |
| 382 | + <echo>Copying XSD schema to be included in JAR</echo> |
| 383 | + <replace file="${project.build.directory}/generated-resources/schemagen/schema1.xsd" |
| 384 | + token="xmlns:xs="http://www.w3.org/2001/XMLSchema"" |
| 385 | + value="xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema""/> |
| 386 | + <move file="${project.build.directory}/generated-resources/schemagen/schema1.xsd" |
| 387 | + tofile="${project.build.directory}/generated-resources/schemagen/bean-mapping.xsd"/> |
| 388 | + </target> |
| 389 | + </configuration> |
| 390 | + <goals> |
| 391 | + <goal>run</goal> |
| 392 | + </goals> |
| 393 | + </execution> |
| 394 | + </executions> |
| 395 | + </plugin> |
| 396 | + </plugins> |
| 397 | + </build> |
| 398 | + </profile> |
| 399 | + </profiles> |
324 | 400 | </project> |
0 commit comments