|
2 | 2 | <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
3 | 3 | <!-- for some information on what you could do (e.g. targets to override). -->
|
4 | 4 | <!-- If you delete this file and reopen the project it will be recreated. -->
|
5 |
| -<project name="org.netbeans.modules.php.cake3" default="netbeans" basedir="."> |
| 5 | +<project name="org.netbeans.modules.php.cake3" default="netbeans" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
6 | 6 | <description>Builds, tests, and runs the project org.netbeans.modules.php.cake3.</description>
|
7 | 7 | <import file="nbproject/build-impl.xml"/>
|
| 8 | + <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" /> |
| 9 | + <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" /> |
| 10 | + |
| 11 | + <!-- define Maven coordinates --> |
| 12 | + <property name="build" value="build" /> |
| 13 | + <property name="groupId" value="com.junichi11.netbeans.modules" /> |
| 14 | + <property name="artifactId" value="netbeans-cakephp3" /> |
| 15 | + <!-- also change the version of pom.xml --> |
| 16 | + <property name="version" value="0.8.0" /> |
| 17 | + <!-- defined maven snapshots and staging repository id and url --> |
| 18 | + <property name="ossrh-snapshots-repository-url" |
| 19 | + value="https://oss.sonatype.org/content/repositories/snapshots/" /> |
| 20 | + <property name="ossrh-staging-repository-url" |
| 21 | + value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" /> |
| 22 | + <!-- there server id in the Maven settings.xml --> |
| 23 | + <property name="ossrh-server-id" value="ossrh" /> |
| 24 | + |
| 25 | + <target name="deploy" depends="nbm" description="deploy release version to Maven repository"> |
| 26 | + <move file="${build}/org-netbeans-modules-php-cake3.nbm" toFile="${build}/${artifactId}-${version}.nbm"/> |
| 27 | + <artifact:mvn> |
| 28 | + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" /> |
| 29 | + <arg value="-Durl=${ossrh-staging-repository-url}" /> |
| 30 | + <arg value="-DrepositoryId=${ossrh-server-id}" /> |
| 31 | + <arg value="-DpomFile=pom.xml" /> |
| 32 | + <arg value="-Dfile=${build}/${artifactId}-${version}.nbm" /> |
| 33 | + <arg value="-Pgpg" /> |
| 34 | + </artifact:mvn> |
| 35 | + </target> |
8 | 36 | </project>
|
0 commit comments