Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 06c9e53252c056723ac82b81ba73b5eb6d015ebc (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                             
                                            
 




                                                                                                 

                                                                            
                                                                           



                                                             


                                                                                   
                                                                    
                                                                      
                                                               


                                                                                                    


                                                             
 

















                                                                                                                                                                                                                                              

                                                                                  
                                                 



                                                                                                                                                    




                                                                                                                                                
                                                                                  




                                                                                                                                                     
                                                                                  




                                                                                                                    
                                                                                  



                                                                                                                         



                             
<?xml version="1.0"?>
<!--
	Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
	All rights reserved. This program and the accompanying materials
	are made available under the terms of the Eclipse Public License v1.0
	which accompanies this distribution, and is available at
	http://www.eclipse.org/legal/epl-v10.html

	Contributors:
	  Eike Stepper - initial API and implementation
-->
<project name="copyExampleLib" basedir="..">

	<property name="examples.path" value="org.eclipse.emf.cdo.examples.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="nodes/*/db/" />
					<exclude name="bin/" />
					<exclude name=".settings/org.eclipse.mylyn*" />
					<exclude name=".settings/org.eclipse.pde.api.tools.prefs" />
					<exclude name="**/.gitignore" />
					<include name="**" />
				</fileset>
			</copy>

			<replaceregexp byline="false"
			               flags="sg"
			               match="&lt;stringAttribute key=&quot;selected_target_plugins&quot; value=&quot;([^&quot;]*)&quot;/>(.*)&lt;stringAttribute key=&quot;selected_workspace_plugins&quot; value=&quot;([^&quot;]*)&quot;/>"
			               replace="&lt;stringAttribute key=&quot;selected_target_plugins&quot; value=&quot;\1,\3&quot;/>\2&lt;stringAttribute key=&quot;selected_workspace_plugins&quot; value=&quot;\1,\3&quot;/>">
				<fileset dir="${examples.path}/@{project}">
					<include name="**/*.launch" />
				</fileset>
			</replaceregexp>

			<replaceregexp byline="false"
			               flags="sg"
			               match="&lt;stringAttribute key=&quot;selected_workspace_plugins&quot; value=&quot;([^&quot;]*)&quot;/>(.*)&lt;stringAttribute key=&quot;selected_target_plugins&quot; value=&quot;([^&quot;]*)&quot;/>"
			               replace="&lt;stringAttribute key=&quot;selected_workspace_plugins&quot; value=&quot;\1,\3&quot;/>\2&lt;stringAttribute key=&quot;selected_target_plugins&quot; value=&quot;\1,\3&quot;/>">
				<fileset dir="${examples.path}/@{project}">
					<include name="**/*.launch" />
				</fileset>
			</replaceregexp>

			<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.emf.cdo.releng.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.emf.cdo.releng.version.VersionNature&lt;/nature>"
			               replace="" />
		</sequential>
	</macrodef>

</project>

Back to the top