Skip to content

Commit

Permalink
Project restructuring.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Kit <kit@d3s.mff.cuni.cz>
  • Loading branch information
Michal Kit committed Oct 10, 2012
1 parent b27895e commit 09f9994
Show file tree
Hide file tree
Showing 424 changed files with 210 additions and 230 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

/bin
/build
/jdeeco-core/bin
/jdeeco-example-osgi/MigrationEnsembleOSGI/bin
/jdeeco-example-osgi/NodeAOSGI/bin
/jdeeco-example-osgi/NodeBOSGI/bin
/dist
/test-output
/jdeeco-core/test-output
Binary file not shown.
Binary file not shown.
Binary file not shown.
120 changes: 25 additions & 95 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<description>JDEECo build file</description>

<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="demo" location="demo"/>
<property name="build" location="bin"/>
<property name="src" location="jdeeco-core/src"/>
<property name="demo" location="jdeeco-core/demo"/>
<property name="build" location="jdeeco-core/bin"/>
<property name="dist" location="dist"/>
<property name="libs" location="libs"/>
<property name="river" location="${dist}/apache-river"/>

<property name="debug" value="yes"/>
Expand All @@ -17,63 +18,6 @@
<mkdir dir="${dist}"/>
</target>

<!-- compile subprojects -->
<target name="compile-jdeeco" depends="init"
description="Compiles the JDEECo runtime sources" >
<mkdir dir="${build}/jdeeco"/>
<javac srcdir="${src}" destdir="${build}/jdeeco" debug="${debug}">
<classpath>
<pathelement location="lib/jsk-lib.jar"/>
<pathelement location="lib/jsk-platform.jar"/>
<pathelement location="lib/bcel-5.2.jar"/>
</classpath>
</javac>
</target>

<target name="compile-demo" depends="dist-jdeeco"
description="Compiles the demos sources" >
<mkdir dir="${build}/demo"/>
<javac srcdir="${demo}" destdir="${build}/demo" debug="${debug}">
<classpath>
<pathelement location="lib/jsk-lib.jar"/>
<pathelement location="lib/jsk-platform.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
</classpath>
</javac>
</target>

<!-- package into jar files -->
<target name="dist-jdeeco" depends="compile-jdeeco"
description="Generates a jar with JDEECo runtime" >
<jar jarfile="${dist}/jdeeco.jar" basedir="${build}/jdeeco" manifest="./META-INF/MANIFEST.MF">
<fileset dir="." includes="OSGI-INF/*.*"/>
</jar>
</target>

<target name="dist-demo" depends="compile-demo"
description="Generates a jar with the demos" >
<jar jarfile="${dist}/demo.jar" basedir="${build}/demo"/>
</target>

<!-- zip source files -->
<target name="zip" depends="init"
description="Creates a zip with the source files" >
<zip destfile="${dist}/sources.zip">
<zipfileset dir="src"/>
<zipfileset dir="demo"/>
</zip>
</target>

<!-- download and setup jpf - requires mercurial -->
<target name="get-jpf">
<mkdir dir="${dist}/jpf"/>
<exec executable="hg" dir="${dist}/jpf" searchpath="true">
<arg value="clone"/>
<arg value="http://babelfish.arc.nasa.gov/hg/jpf/jpf-core"/>
</exec>
<ant dir="${dist}/jpf/jpf-core"/>
</target>

<!-- download and setup apache river -->
<target name="get-ar">
<get src="http://apache.mirror.dkm.cz/pub/apache/river/river-2.2.0/apache-river-2.2.0-bin.zip"
Expand All @@ -83,7 +27,7 @@
<move file="${dist}/apache-river-2.2.0" tofile="${river}"/>
<delete file="${dist}/apache-river.zip"/>
<copy todir="${river}-config">
<fileset dir="apache-river-config"/>
<fileset dir="config/apache-river-config"/>
</copy>
</target>

Expand Down Expand Up @@ -129,46 +73,43 @@
</target>

<!-- start cloud demo with local shared memory -->
<target name="cloud-local" depends="dist-demo"
description="Runs the cloud demo">
<target name="cloud-local" description="Runs the cloud demo">
<java classname="cz.cuni.mff.d3s.deeco.demo.cloud.LocalLauncherCloudNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="lib/jsk-lib.jar"/>
<pathelement location="lib/jsk-platform.jar"/>
<pathelement location="${libs}/jsk-lib.jar"/>
<pathelement location="${libs}/jsk-platform.jar"/>
</classpath>
<jvmarg value="-Djava.security.policy=${river}-config/start.policy"/>
<jvmarg value="-Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider"/>
</java>
</target>

<!-- start convoy demo with local shared memory -->
<target name="convoy-local" depends="dist-demo"
description="Runs the convoy demo">
<target name="convoy-local" description="Runs the convoy demo">
<java classname="cz.cuni.mff.d3s.deeco.demo.convoy.LocalLauncherConvoyNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="lib/jsk-lib.jar"/>
<pathelement location="lib/jsk-platform.jar"/>
<pathelement location="${libs}/jsk-lib.jar"/>
<pathelement location="${libs}/jsk-platform.jar"/>
</classpath>
<jvmarg value="-Djava.security.policy=${river}-config/start.policy"/>
<jvmarg value="-Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider"/>
</java>
</target>

<!-- start cloud demo with tuple spaces as shared memory -->
<target name="cloud-ts" depends="dist-demo"
description="Runs the cloud demo">
<target name="cloud-ts" description="Runs the cloud demo">
<parallel>
<antcall target="start-ar"/>
<java classname="cz.cuni.mff.d3s.deeco.demo.cloud.TSLauncherCloudNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="lib/jsk-lib.jar"/>
<pathelement location="lib/jsk-platform.jar"/>
<pathelement location="${libs}/jsk-lib.jar"/>
<pathelement location="${libs}/jsk-platform.jar"/>
</classpath>
<jvmarg value="-Djava.security.policy=${river}-config/start.policy"/>
<jvmarg value="-Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider"/>
Expand All @@ -177,59 +118,48 @@
</target>

<!-- start cloud demo with tuple spaces as shared memory -->
<target name="convoy-ts" depends="dist-demo"
description="Runs the convoy demo">
<target name="convoy-ts" description="Runs the convoy demo">
<parallel>
<antcall target="start-ar"/>
<java classname="cz.cuni.mff.d3s.deeco.demo.convoy.TSLauncherConvoyNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="lib/jsk-lib.jar"/>
<pathelement location="lib/jsk-platform.jar"/>
<pathelement location="${libs}/jsk-lib.jar"/>
<pathelement location="${libs}/jsk-platform.jar"/>
</classpath>
<jvmarg value="-Djava.security.policy=${river}-config/start.policy"/>
<jvmarg value="-Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider"/>
</java>
</parallel>
</target>

<!-- package cloud demo ensembles and components into single jar file -->
<target name="dist-cloud-demo" depends="compile-demo"
description="Generates a jar with cloud demo main classes" >
<jar jarfile="${dist}/cloud-demo.jar" basedir="${build}/demo" includes="**/NodeA.class,**/NodeB.class,**/MigrationEnsemble.class">
<manifest>
<attribute name="Bundle-Version" value="0.0.1.SNAPSHOT"/>
<attribute name="Export-Package" value="cz.cuni.mff.d3s.deeco.demo.cloud"/>
<attribute name="Bundle-Name" value="Cloud demo package" />
<attribute name="Bundle-SymbolicName" value="cz.cuni.mff.d3s.deeco.demo.cloud" />
</manifest>
</jar>
</target>

<!-- Run cloud demo under jpf -->
<target name="jpf-cloud" depends="get-jpf, dist-cloud-demo, dist-demo">
<target name="jpf-cloud">
<java fork="true" classname="cz.cuni.mff.d3s.deeco.runtime.PreLauncher" dir="${dist}">
<arg value="cloud-demo.jar"/>
<classpath>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="lib/bcel-5.2.jar"/>
<pathelement location="${libs}/bcel-5.2.jar"/>
</classpath>
</java>
<java fork="true" jar="${dist}/jpf/jpf-core/build/RunJPF.jar" dir="${dist}">
<java fork="true" jar="${libs}/RunJPF.jar" dir="${dist}">
<jvmarg value="-Djdeeco-dist=${dist}"/>
<jvmarg value="-Djdeeco-src=${src}"/>
<jvmarg value="-Djdeeco-src-demo=${demo}"/>
<arg value="${demo}/cz/cuni/mff/d3s/deeco/demo/cloud/LocalLauncherCloudJPF.jpf"/>
</java>
</target>

<target name="ant-jdeeco-core">
<ant antfile="build.xml" dir="jdeeco-core" target="all"/>
</target>

<!-- prepare new setup -->
<target name="all"
description="Cleans the projects and creates a distribution of JDEECo, demos and sources from scratch">
<antcall target="clean"/>
<antcall target="dist-demo"/>
<antcall target="zip"/>
<antcall target="ant-jdeeco-core"/>
<antcall target="get-ar"/>
</target>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions .classpath → jdeeco-core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<classpathentry kind="src" output="bin/demo" path="demo"/>
<classpathentry kind="src" output="bin/test" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="lib" path="lib/jsk-lib.jar"/>
<classpathentry kind="lib" path="lib/jsk-platform.jar"/>
<classpathentry kind="lib" path="lib/testng-6.5.1.jar"/>
<classpathentry kind="lib" path="lib/bcel-5.2.jar"/>
<classpathentry kind="lib" path="../libs/bcel-5.2.jar"/>
<classpathentry kind="lib" path="../libs/jsk-lib.jar"/>
<classpathentry kind="lib" path="../libs/jsk-platform.jar"/>
<classpathentry kind="lib" path="../libs/testng-6.5.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
unbind="unsetScheduler"
cardinality="1..1"
policy="dynamic"/>
<<<<<<< HEAD
<reference name="KNOWLEDGE_MANAGER"
=======
<reference name="KNOWLEDGE_MANAGER"
>>>>>>> beffb1b354d9be70dac428be11477c54981346af
interface="cz.cuni.mff.d3s.deeco.knowledge.KnowledgeManager"
bind="setKnowledgeManager"
unbind="unsetKnowledgeManager"
Expand Down
54 changes: 54 additions & 0 deletions jdeeco-core/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<project name="JDEECo-Core" default="all" basedir=".">
<description>JDEECo build file</description>

<!-- compile subprojects -->
<target name="compile-jdeeco" description="Compiles the JDEECo runtime sources" >
<mkdir dir="${build}/jdeeco"/>
<javac srcdir="${src}" destdir="${build}/jdeeco" debug="${debug}">
<classpath>
<pathelement location="${libs}/jsk-lib.jar"/>
<pathelement location="${libs}/jsk-platform.jar"/>
<pathelement location="${libs}/bcel-5.2.jar"/>
</classpath>
</javac>
</target>

<target name="compile-demo" depends="dist-jdeeco"
description="Compiles the demos sources" >
<mkdir dir="${build}/demo"/>
<javac srcdir="${demo}" destdir="${build}/demo" debug="${debug}">
<classpath>
<pathelement location="${libs}/jsk-lib.jar"/>
<pathelement location="${libs}/jsk-platform.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
</classpath>
</javac>
</target>

<!-- package into jar files -->
<target name="dist-jdeeco" depends="compile-jdeeco"
description="Generates a jar with JDEECo runtime" >
<jar jarfile="${dist}/jdeeco.jar" basedir="${build}/jdeeco" manifest="${src}/../META-INF/MANIFEST.MF">
<fileset dir="." includes="${src}/../OSGI-INF/*.*"/>
</jar>
</target>

<target name="dist-demo" depends="compile-demo"
description="Generates a jar with the demos" >
<jar jarfile="${dist}/demo.jar" basedir="${build}/demo"/>
</target>

<!-- zip source files -->
<target name="zip" description="Creates a zip with the source files" >
<zip destfile="${dist}/sources.zip">
<zipfileset dir="${src}"/>
<zipfileset dir="${demo}"/>
</zip>
</target>

<target name="all">
<antcall target="dist-demo"/>
<antcall target="zip"/>
</target>

</project>
Loading

0 comments on commit 09f9994

Please sign in to comment.