|
10 | 10 | <groupId>org.hibernate.demos</groupId> |
11 | 11 | <artifactId>multi-release-jar-demo</artifactId> |
12 | 12 | <version>1.0-SNAPSHOT</version> |
13 | | - <packaging>jar</packaging> |
14 | 13 |
|
15 | 14 | <name>multi-release-jar-demo</name> |
16 | 15 | <url>http://hibernate.org/</url> |
|
19 | 18 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
20 | 19 | <maven.compiler.source>1.8</maven.compiler.source> |
21 | 20 | <maven.compiler.target>1.8</maven.compiler.target> |
22 | | - <java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory> |
23 | | - <java9.build.outputDirectory>${project.build.directory}/classes-java9</java9.build.outputDirectory> |
24 | 21 | </properties> |
25 | 22 |
|
26 | 23 | <build> |
27 | 24 | <plugins> |
28 | 25 | <plugin> |
29 | 26 | <groupId>org.apache.maven.plugins</groupId> |
30 | | - <artifactId>maven-antrun-plugin</artifactId> |
31 | | - <version>1.8</version> |
| 27 | + <artifactId>maven-compiler-plugin</artifactId> |
| 28 | + <version>3.8.1</version> |
32 | 29 | <executions> |
33 | | - <execution> |
34 | | - <id>compile-java9</id> |
35 | | - <phase>compile</phase> |
36 | | - <configuration> |
37 | | - <tasks> |
38 | | - <mkdir dir="${java9.build.outputDirectory}" /> |
39 | | - <javac srcdir="${java9.sourceDirectory}" destdir="${java9.build.outputDirectory}" |
40 | | - classpath="${project.build.outputDirectory}" includeantruntime="false" /> |
41 | | - </tasks> |
42 | | - </configuration> |
43 | | - <goals> |
44 | | - <goal>run</goal> |
45 | | - </goals> |
46 | | - </execution> |
47 | | - </executions> |
48 | | - </plugin> |
49 | | - <plugin> |
50 | | - <groupId>org.apache.maven.plugins</groupId> |
51 | | - <artifactId>maven-resources-plugin</artifactId> |
52 | | - <version>3.0.2</version> |
53 | | - <executions> |
54 | | - <execution> |
55 | | - <id>copy-resources</id> |
56 | | - <phase>prepare-package</phase> |
57 | | - <goals> |
58 | | - <goal>copy-resources</goal> |
59 | | - </goals> |
60 | | - <configuration> |
61 | | - <outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory> |
62 | | - <resources> |
63 | | - <resource> |
64 | | - <directory>${java9.build.outputDirectory}</directory> |
65 | | - </resource> |
66 | | - </resources> |
67 | | - </configuration> |
68 | | - </execution> |
| 30 | + <execution> |
| 31 | + <id>jdk9</id> |
| 32 | + <goals> |
| 33 | + <goal>compile</goal> |
| 34 | + </goals> |
| 35 | + <configuration> |
| 36 | + <release>9</release> |
| 37 | + <compileSourceRoots> |
| 38 | + <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot> |
| 39 | + </compileSourceRoots> |
| 40 | + <multiReleaseOutput>true</multiReleaseOutput> |
| 41 | + </configuration> |
| 42 | + </execution> |
69 | 43 | </executions> |
70 | 44 | </plugin> |
71 | 45 | <plugin> |
|
0 commit comments