File: copyExampleLib.ant

package info (click to toggle)
eclipse-emf 2.42.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 73,344 kB
  • sloc: java: 711,198; xml: 12,829; makefile: 5
file content (70 lines) | stat: -rw-r--r-- 2,657 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0"?>
<!--
	Copyright (c) 2012 Eclispe contributors and others.
	All rights reserved. This program and the accompanying materials
	are made available under the terms of the Eclipse Public License v2.0
	which accompanies this distribution, and is available at
	http://www.eclipse.org/legal/epl-v20.html
-->
<project name="copyExampleLib" basedir="..">

	<property name="examples.path" value="../plugins/org.eclipse.xsd.example.installer/examples" />
	<basename file="${build.project}" property="project" />

	<macrodef name="copyExample">
		<attribute name="project" />
		<sequential>
			<delete includeemptydirs="true" failonerror="false">
				<fileset dir="${examples.path}/@{project}">
					<include name="**" />
				</fileset>
			</delete>

			<copy todir="${examples.path}/@{project}" overwrite="true">
				<fileset dir="@{project}">
					<exclude name=".externalToolBuilders/" />
					<exclude name="database/" />
					<exclude name="bin/" />
					<exclude name="pom.xml" />
					<exclude name="target/" />
					<exclude name=".settings/org.eclipse.mylyn*" />
					<exclude name=".settings/org.eclipse.pde.api.tools.prefs" />
					<exclude name="**/.gitignore" />
					<exclude name="**/release.*" />
					<include name="**" />
				</fileset>
			</copy>

			<replaceregexp file="${examples.path}/@{project}/.project"
			               byline="false"
			               flags="sg"
			               match="\s*&lt;buildCommand>\s+&lt;name>org.eclipse.ui.externaltools.ExternalToolBuilder.*?&lt;/buildCommand>"
			               replace="" />

			<replaceregexp file="${examples.path}/@{project}/.project"
			               byline="false"
			               flags="s"
			               match="\s*&lt;buildCommand>\s+&lt;name>org.eclipse.pde.api.tools.apiAnalysisBuilder.*?&lt;/buildCommand>"
			               replace="" />

			<replaceregexp file="${examples.path}/@{project}/.project"
			               byline="false"
			               flags="s"
			               match="\s*&lt;buildCommand>\s+&lt;name>org.eclipse.oomph.version.VersionBuilder.*?&lt;/buildCommand>"
			               replace="" />

			<replaceregexp file="${examples.path}/@{project}/.project"
			               byline="false"
			               flags="s"
			               match="\s*&lt;nature>org.eclipse.pde.api.tools.apiAnalysisNature&lt;/nature>"
			               replace="" />

			<replaceregexp file="${examples.path}/@{project}/.project"
			               byline="false"
			               flags="s"
			               match="\s*&lt;nature>org.eclipse.oomph.version.VersionNature&lt;/nature>"
			               replace="" />
		</sequential>
	</macrodef>

</project>