|
157 | 157 | <!-- Extra maven-surefire-plugin args. --> |
158 | 158 | <scijava.surefire.args /> |
159 | 159 |
|
160 | | - <!-- Target version of the Java platform. --> |
| 160 | + <!-- Compiler configuration. --> |
161 | 161 | <scijava.jvm.version>1.8</scijava.jvm.version> |
162 | 162 | <scijava.jvm.test.version>${scijava.jvm.version}</scijava.jvm.test.version> |
163 | 163 | <!-- NB: 1.8.0_101 is needed for SciJava Maven repository HTTPS support. --> |
164 | 164 | <scijava.jvm.build.version>[1.8.0-101,1.8.9999]</scijava.jvm.build.version> |
| 165 | + <maven.compiler.source>${scijava.jvm.version}</maven.compiler.source> |
| 166 | + <maven.compiler.target>${scijava.jvm.version}</maven.compiler.target> |
| 167 | + <maven.compiler.testSource>${scijava.jvm.test.version}</maven.compiler.testSource> |
| 168 | + <maven.compiler.testTarget>${scijava.jvm.test.version}</maven.compiler.testTarget> |
| 169 | + <!-- |
| 170 | + Workaround for a bug in maven-compiler-plugin. |
| 171 | + See https://issues.apache.org/jira/browse/MCOMPILER-209 |
| 172 | + --> |
| 173 | + <maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation> |
165 | 174 |
|
166 | 175 | <!-- Minimum required Maven version to build the project. --> |
167 | 176 | <scijava.mvn.version>3.3.9</scijava.mvn.version> |
|
275 | 284 | <plugin> |
276 | 285 | <artifactId>maven-compiler-plugin</artifactId> |
277 | 286 | <version>${maven-compiler-plugin.version}</version> |
278 | | - <configuration> |
279 | | - <source>${scijava.jvm.version}</source> |
280 | | - <target>${scijava.jvm.version}</target> |
281 | | - <testSource>${scijava.jvm.test.version}</testSource> |
282 | | - <testTarget>${scijava.jvm.test.version}</testTarget> |
283 | | - <!-- |
284 | | - Workaround for a bug in maven-compiler-plugin. |
285 | | - See https://issues.apache.org/jira/browse/MCOMPILER-209 |
286 | | - --> |
287 | | - <useIncrementalCompilation>false</useIncrementalCompilation> |
288 | | - </configuration> |
289 | 287 | </plugin> |
290 | 288 |
|
291 | 289 | <plugin> |
|
1811 | 1809 | </plugins> |
1812 | 1810 | </pluginManagement> |
1813 | 1811 | <plugins> |
1814 | | - <!-- |
1815 | | - HACK - Tell Eclipse to use the TEST source and target JVM version. |
1816 | | - This is necessary because the JVM version used for tests may be newer |
1817 | | - than that used for the main artifact. Maven is OK with this, but |
1818 | | - Eclipse wants only a single JVM version for both main and tests. |
1819 | | - See: https://gist.github.com/aslakknutsen/9648594#gistcomment-1588906 |
1820 | | - --> |
1821 | | - <plugin> |
1822 | | - <artifactId>maven-compiler-plugin</artifactId> |
1823 | | - <configuration> |
1824 | | - <source>${scijava.jvm.test.version}</source> |
1825 | | - <target>${scijava.jvm.test.version}</target> |
1826 | | - </configuration> |
1827 | | - </plugin> |
1828 | 1812 | <plugin> |
1829 | 1813 | <groupId>org.scijava</groupId> |
1830 | 1814 | <artifactId>scijava-maven-plugin</artifactId> |
|
1839 | 1823 | </plugin> |
1840 | 1824 | </plugins> |
1841 | 1825 | </build> |
| 1826 | + <properties> |
| 1827 | + <!-- |
| 1828 | + HACK - Tell Eclipse to use the TEST source and target JVM version. |
| 1829 | + This is necessary because the JVM version used for tests may be newer |
| 1830 | + than that used for the main artifact. Maven is OK with this, but |
| 1831 | + Eclipse wants only a single JVM version for both main and tests. |
| 1832 | + See: https://gist.github.com/aslakknutsen/9648594#gistcomment-1588906 |
| 1833 | + --> |
| 1834 | + <maven.compiler.source>${scijava.jvm.test.version}</maven.compiler.source> |
| 1835 | + <maven.compiler.target>${scijava.jvm.test.version}</maven.compiler.target> |
| 1836 | + </properties> |
1842 | 1837 | </profile> |
1843 | 1838 |
|
1844 | 1839 | <!-- |
|
0 commit comments