forked from evilbloodydemon/cakephp-netbeans
-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.xml
48 lines (45 loc) · 2.64 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="org.cakephp.netbeans" default="netbeans" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<description>Builds, tests, and runs the project org.cakephp.netbeans.</description>
<import file="nbproject/build-impl.xml"/>
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />
<!-- define Maven coordinates -->
<property name="build" value="build" />
<property name="groupId" value="com.junichi11.netbeans.modules" />
<property name="artifactId" value="netbeans-cakephp" />
<!-- also change the version of pom.xml -->
<property name="version" value="1.2.0" />
<!-- defined maven snapshots and staging repository id and url -->
<property name="ossrh-snapshots-repository-url"
value="https://oss.sonatype.org/content/repositories/snapshots/" />
<property name="ossrh-staging-repository-url"
value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
<!-- there server id in the Maven settings.xml -->
<property name="ossrh-server-id" value="ossrh" />
<property name="code-name-base" value="org-cakephp-netbeans" />
<target name="update-version-number">
<replaceregexp file="pom.xml"
match="(^ <version>).+(</version>)"
replace="\1${version}\2"
byline="true" />
<replaceregexp file="manifest.mf"
match="(OpenIDE-Module-Specification-Version:[ ]*).+"
replace="\1${version}"
byline="true" />
</target>
<target name="deploy" depends="nbm" description="deploy release version to Maven repository">
<move file="${build}/${code-name-base}.nbm" toFile="${build}/${artifactId}-${version}.nbm"/>
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
<arg value="-Durl=${ossrh-staging-repository-url}" />
<arg value="-DrepositoryId=${ossrh-server-id}" />
<arg value="-DpomFile=pom.xml" />
<arg value="-Dfile=${build}/${artifactId}-${version}.nbm" />
<arg value="-Pgpg" />
</artifact:mvn>
</target>
</project>