Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6117c5a57fc745db1a76319a15526bbe908c4bd3 (plain) (blame)
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
<?xml version="1.0"?>
<project name="TeneoMaven">

	<macrodef name="teneo.pom">
		<attribute name="mavenVersion" />
		<attribute name="fileName" />
		<attribute name="name" />
		<sequential>
			<xslt style="pom.xsl" in="dummy.xml" out="@{fileName}">
				<param name="mavenVersion" expression="@{mavenVersion}" />
				<param name="name" expression="@{name}" />
				<outputproperty name="method" value="xml" />
				<outputproperty name="indent" value="yes" />
			</xslt>
		</sequential>
	</macrodef>

	<macrodef name="teneo.dummy.javadoc">
		<attribute name="fileName" />
		<sequential>

			<echo file="@{fileName}">
				<![CDATA[No content, needed for publishing on nexus]]>
			</echo>
		</sequential>
	</macrodef>

	<macrodef name="teneo.maven">
		<attribute name="name" />
		<sequential>
			<echo message="Creating maven jar and pom for @{name}" />

			<copy file="${rootPath}/output/@{name}_${teneo.version}-osgi.bundle/jar/@{name}_${teneoVersion}.jar" tofile="${mavenPath}/@{name}-${mavenVersion}.jar" />
			<copy file="${rootPath}/output/@{name}_${teneo.version}-osgi.bundle/source.jar/@{name}.source_${teneoVersion}.jar" tofile="${mavenPath}/@{name}-${mavenVersion}-sources.jar" />

			<copy file="${rootPath}/output/@{name}_${teneo.version}-osgi.bundle/jar/@{name}_${teneoVersion}.jar" tofile="${mavenPath}/@{name}-${teneo.version}-SNAPSHOT.jar" />
			<copy file="${rootPath}/output/@{name}_${teneo.version}-osgi.bundle/source.jar/@{name}.source_${teneoVersion}.jar" tofile="${mavenPath}/@{name}-${teneo.version}-SNAPSHOT-sources.jar" />

			<teneo.pom fileName="${mavenPath}/@{name}-${mavenVersion}.pom" name="@{name}" mavenVersion="${mavenVersion}" />
			<teneo.dummy.javadoc fileName="${mavenPath}/@{name}-${mavenVersion}-javadoc.jar" />

			<teneo.pom fileName="${mavenPath}/@{name}-${teneo.version}-SNAPSHOT.pom" name="@{name}" mavenVersion="${teneo.version}-SNAPSHOT" />
			<teneo.dummy.javadoc fileName="${mavenPath}/@{name}-${teneo.version}-SNAPSHOT-javadoc.jar" />
		</sequential>
	</macrodef>
</project>

Back to the top