|
49 | 49 | <echo message="maven-remoteRepositoryUrl: ${maven-remoteRepositoryUrl}" />
|
50 | 50 | </target>
|
51 | 51 |
|
| 52 | + <target name="mvn-info" depends="info"> |
| 53 | + <artifact:mvn mavenHome="${maven.home}" fork="true" failonerror="true"> |
| 54 | + <arg value="-version"/> |
| 55 | + </artifact:mvn> |
| 56 | + </target> |
| 57 | + |
52 | 58 | <target name="prepare-maven" depends="info">
|
53 | 59 | <path id="mvn.classpath">
|
54 | 60 | <fileset dir="${maven.home}/boot">
|
|
190 | 196 | </target>
|
191 | 197 |
|
192 | 198 | <!-- before this, update project version (both build.xml and pom.xml) from SNAPSHOT to RELEASE -->
|
193 |
| - <target name="stage" depends="prepare-publish-sonatype" description="deploy release version to Maven staging repository"> |
| 199 | + <target name="stage" depends="prepare-maven, prepare-publish-sonatype" description="deploy release version to Maven staging repository"> |
194 | 200 | <echo message="artifactId: ${artifactId}"/>
|
195 | 201 | <fail message="Must NOT be SNAPSHOT version" if="version-snapshot"/>
|
196 | 202 |
|
|
200 | 206 | <echo message="sonatype-nexus-staging.username: ${sonatype-nexus-staging.username}"/>
|
201 | 207 | <echo message="sonatype-nexus-staging.password: ${sonatype-nexus-staging.password}"/>
|
202 | 208 | -->
|
203 |
| - |
204 |
| - <!-- sign and deploy the main artifact --> |
| 209 | + <!-- |
205 | 210 | <artifact:mvn>
|
| 211 | + <arg value="-v" /> |
| 212 | + </artifact:mvn> |
| 213 | + --> |
| 214 | + |
| 215 | + <java classname="${mvn.mainclass}" classpathref="mvn.classpath" fork="true" failonerror="true"> |
| 216 | + <jvmarg value="-Dclassworlds.conf=${env.M2_HOME}/bin/m2.conf" /> |
| 217 | + <jvmarg value="-Dmaven.home=${env.M2_HOME}" /> |
| 218 | + <jvmarg value="-Dmaven.multiModuleProjectDirectory=${basedir}" /> |
| 219 | + |
| 220 | + <arg value="-v" /> |
| 221 | + </java> |
| 222 | + |
| 223 | + <!-- sign and deploy the main artifact --> |
| 224 | + <java classname="${mvn.mainclass}" classpathref="mvn.classpath" fork="true" failonerror="true"> |
| 225 | + <jvmarg value="-Dclassworlds.conf=${env.M2_HOME}/bin/m2.conf" /> |
| 226 | + <jvmarg value="-Dmaven.home=${env.M2_HOME}" /> |
| 227 | + <jvmarg value="-Dmaven.multiModuleProjectDirectory=${basedir}" /> |
| 228 | + |
206 | 229 | <arg value="org.apache.maven.plugins:maven-gpg-plugin:${maven-gpg-plugin.version}:sign-and-deploy-file" />
|
207 | 230 | <arg value="-Durl=${maven-staging-repository-url}" />
|
208 | 231 | <arg value="-DrepositoryId=${maven-staging-repository-id}" />
|
|
212 | 235 | <arg value="-Dgpg.passphrase=${gpg.passphrase}" />
|
213 | 236 | <!--<arg value="-Dsonatype-nexus-staging.username=${sonatype-nexus-staging.username}" />
|
214 | 237 | <arg value="-Dsonatype-nexus-staging.password=${sonatype-nexus-staging.password}" />-->
|
215 |
| - </artifact:mvn> |
| 238 | + </java> |
216 | 239 |
|
217 | 240 | <!-- sign and deploy the sources artifact -->
|
218 |
| - <artifact:mvn> |
| 241 | + <java classname="${mvn.mainclass}" classpathref="mvn.classpath" fork="true" failonerror="true"> |
| 242 | + <jvmarg value="-Dclassworlds.conf=${env.M2_HOME}/bin/m2.conf" /> |
| 243 | + <jvmarg value="-Dmaven.home=${env.M2_HOME}" /> |
| 244 | + <jvmarg value="-Dmaven.multiModuleProjectDirectory=${basedir}" /> |
| 245 | + |
219 | 246 | <arg value="org.apache.maven.plugins:maven-gpg-plugin:${maven-gpg-plugin.version}:sign-and-deploy-file" />
|
220 | 247 | <arg value="-Durl=${maven-staging-repository-url}" />
|
221 | 248 | <arg value="-DrepositoryId=${maven-staging-repository-id}" />
|
|
224 | 251 | <arg value="-Dclassifier=sources" />
|
225 | 252 | <arg value="-Pgpg" />
|
226 | 253 | <arg value="-Dgpg.passphrase=${gpg.passphrase}" />
|
227 |
| - </artifact:mvn> |
| 254 | + </java> |
228 | 255 |
|
229 | 256 | <!-- sign and deploy the javadoc artifact -->
|
230 |
| - <artifact:mvn> |
| 257 | + <java classname="${mvn.mainclass}" classpathref="mvn.classpath" fork="true" failonerror="true"> |
| 258 | + <jvmarg value="-Dclassworlds.conf=${env.M2_HOME}/bin/m2.conf" /> |
| 259 | + <jvmarg value="-Dmaven.home=${env.M2_HOME}" /> |
| 260 | + <jvmarg value="-Dmaven.multiModuleProjectDirectory=${basedir}" /> |
| 261 | + |
231 | 262 | <arg value="org.apache.maven.plugins:maven-gpg-plugin:${maven-gpg-plugin.version}:sign-and-deploy-file" />
|
232 | 263 | <arg value="-Durl=${maven-staging-repository-url}" />
|
233 | 264 | <arg value="-DrepositoryId=${maven-staging-repository-id}" />
|
|
236 | 267 | <arg value="-Dclassifier=javadoc" />
|
237 | 268 | <arg value="-Pgpg" />
|
238 | 269 | <arg value="-Dgpg.passphrase=${gpg.passphrase}" />
|
239 |
| - </artifact:mvn> |
| 270 | + </java> |
240 | 271 | </target>
|
241 | 272 |
|
242 | 273 | </project>
|
0 commit comments