|
3 | 3 |
|
4 | 4 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
5 | 5 |
|
6 | | - Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved. |
| 6 | + Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved. |
7 | 7 |
|
8 | 8 | The contents of this file are subject to the terms of either the GNU |
9 | 9 | General Public License Version 2 only ("GPL") or the Common Development |
|
67 | 67 | <properties> |
68 | 68 | <mail.packages.export> |
69 | 69 | javax.mail.*; version=${mail.spec.version}, |
70 | | - com.sun.mail.util; version=${mail.version}, |
71 | | - com.sun.mail.util.logging; version=${mail.version}, |
72 | | - com.sun.mail.auth; version=${mail.version} |
73 | | - com.sun.mail.handlers; version=${mail.version} |
| 70 | + com.sun.mail.util; version=${mail.osgiversion}, |
| 71 | + com.sun.mail.auth; version=${mail.osgiversion}, |
| 72 | + com.sun.mail.handlers; version=${mail.osgiversion} |
74 | 73 | </mail.packages.export> |
75 | 74 | <mail.bundle.symbolicName> |
76 | 75 | javax.mail.api |
77 | 76 | </mail.bundle.symbolicName> |
78 | 77 | </properties> |
79 | 78 |
|
| 79 | + <profiles> |
| 80 | + <!-- |
| 81 | + A special profile for compiling with the real JDK 1.7 compiler. |
| 82 | + Exclude MailSessionDefinition and MailSessionDefinitions since |
| 83 | + the former requires JDK 1.8 and the latter depends on the former. |
| 84 | + --> |
| 85 | + <profile> |
| 86 | + <id>1.7</id> |
| 87 | + <build> |
| 88 | + <plugins> |
| 89 | + <plugin> |
| 90 | + <artifactId>maven-compiler-plugin</artifactId> |
| 91 | + <executions> |
| 92 | + <execution> |
| 93 | + <id>default-compile</id> |
| 94 | + <configuration> |
| 95 | + <excludes> |
| 96 | + <exclude> |
| 97 | + javax/mail/MailSessionDefinition.java |
| 98 | + </exclude> |
| 99 | + <exclude> |
| 100 | + javax/mail/MailSessionDefinitions.java |
| 101 | + </exclude> |
| 102 | + <exclude> |
| 103 | + module-info.java |
| 104 | + </exclude> |
| 105 | + </excludes> |
| 106 | + </configuration> |
| 107 | + </execution> |
| 108 | + </executions> |
| 109 | + </plugin> |
| 110 | + </plugins> |
| 111 | + </build> |
| 112 | + </profile> |
| 113 | + |
| 114 | + <!-- |
| 115 | + A special profile for compiling with JDK 9. |
| 116 | + --> |
| 117 | + <profile> |
| 118 | + <id>9</id> |
| 119 | + <activation> |
| 120 | + <jdk>9</jdk> |
| 121 | + </activation> |
| 122 | + <build> |
| 123 | + <plugins> |
| 124 | + <plugin> |
| 125 | + <artifactId>maven-compiler-plugin</artifactId> |
| 126 | + <executions> |
| 127 | + <execution> |
| 128 | + <id>default-compile</id> |
| 129 | + <configuration> |
| 130 | + <release>9</release> |
| 131 | + <source>9</source> |
| 132 | + <target>9</target> |
| 133 | + <compilerArgs> |
| 134 | + <arg>-Xlint</arg> |
| 135 | + <arg>-Xlint:-options</arg> |
| 136 | + <arg>-Xlint:-path</arg> |
| 137 | + <!-- |
| 138 | + Too many finalize warnings. |
| 139 | + <arg>-Werror</arg> |
| 140 | + --> |
| 141 | + </compilerArgs> |
| 142 | + <!-- un-exclude module-info.java --> |
| 143 | + <excludes combine.self="override"> |
| 144 | + </excludes> |
| 145 | + </configuration> |
| 146 | + </execution> |
| 147 | + </executions> |
| 148 | + </plugin> |
| 149 | + <!-- |
| 150 | + Require JDK 9. |
| 151 | + --> |
| 152 | + <plugin> |
| 153 | + <groupId>org.apache.maven.plugins</groupId> |
| 154 | + <artifactId>maven-enforcer-plugin</artifactId> |
| 155 | + <executions> |
| 156 | + <execution> |
| 157 | + <id>enforce-version</id> |
| 158 | + <goals> |
| 159 | + <goal>enforce</goal> |
| 160 | + </goals> |
| 161 | + <configuration> |
| 162 | + <rules> |
| 163 | + <requireMavenVersion> |
| 164 | + <version>[3.0.3,)</version> |
| 165 | + </requireMavenVersion> |
| 166 | + <requireJavaVersion> |
| 167 | + <version>9</version> |
| 168 | + </requireJavaVersion> |
| 169 | + </rules> |
| 170 | + </configuration> |
| 171 | + </execution> |
| 172 | + </executions> |
| 173 | + </plugin> |
| 174 | + </plugins> |
| 175 | + </build> |
| 176 | + </profile> |
| 177 | + </profiles> |
| 178 | + |
80 | 179 | <build> |
81 | 180 | <plugins> |
82 | 181 | <plugin> |
|
85 | 184 | <execution> |
86 | 185 | <!-- download the binaries --> |
87 | 186 | <id>get-binaries</id> |
88 | | - <phase>compile</phase> |
| 187 | + <phase>generate-sources</phase> |
89 | 188 | <goals> |
90 | 189 | <goal>unpack</goal> |
91 | 190 | </goals> |
92 | 191 | </execution> |
93 | 192 | <execution> |
94 | 193 | <!-- download the sources --> |
95 | 194 | <id>get-sources</id> |
96 | | - <phase>compile</phase> |
| 195 | + <phase>generate-sources</phase> |
97 | 196 | <goals> |
98 | 197 | <goal>unpack</goal> |
99 | 198 | </goals> |
|
131 | 230 | META-INF/* |
132 | 231 | </includes> |
133 | 232 | <excludes> |
| 233 | + com/sun/mail/util/logging/**, |
134 | 234 | META-INF/javamail.default.* |
135 | 235 | </excludes> |
136 | 236 | </configuration> |
|
0 commit comments