1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/componentinjection/anagram-modular/build.xml Sat Jun 14 10:06:45 2008 +0200
1.3 @@ -0,0 +1,94 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<project name="Build Script" default="test" basedir=".">
1.6 + <target name="clean">
1.7 + <delete dir="build"/>
1.8 + </target>
1.9 +
1.10 + <target name="compile" depends="build"/>
1.11 + <target name="build" depends="-libraries">
1.12 + <antcall target="-build-one">
1.13 + <param name="version" value="api"/>
1.14 + </antcall>
1.15 +
1.16 + <antcall target="-build-one">
1.17 + <param name="version" value="test"/>
1.18 + <param name="cp" value="build/new-api/classes:${junit.jar}"/>
1.19 + </antcall>
1.20 + </target>
1.21 +
1.22 + <target name="test">
1.23 + <antcall target="-do-test">
1.24 + <param name="nodebug" value="true"/>
1.25 + </antcall>
1.26 + </target>
1.27 +
1.28 + <target name="-do-test" depends="build">
1.29 + <echo level="info" message="Running the tests with bridge enabled. This should succeeds."/>
1.30 + <antcall target="-run-one">
1.31 + <param name="test.cp" value="build/new-api/classes:build/bridge/classes"/>
1.32 + </antcall>
1.33 + <echo level="info" message="Running the tests without bridge module. This should fail."/>
1.34 + <antcall target="-run-one">
1.35 + <param name="test.cp" value="build/new-api/classes"/>
1.36 + </antcall>
1.37 + </target>
1.38 +
1.39 + <!-- support methods -->
1.40 +
1.41 + <target name="-libraries">
1.42 + <ant dir="../../libs/"/>
1.43 +
1.44 + <property name="junit.jar" location="../libs/dist/junit-4.4.jar"/>
1.45 + </target>
1.46 +
1.47 + <target name="-debug-one" if="netbeans.home" unless="nodebug">
1.48 + <nbjpdastart addressproperty="jpda.address" name="MessageDigest and Bridges" transport="dt_socket" >
1.49 + <sourcepath path="src-new-api:src-bridge:src-test:build/test/classes"/>
1.50 + <classpath path="build/new-api/classes:build/bridge/classes:build/test/classes"/>
1.51 + </nbjpdastart>
1.52 + <property name="debug1" value="-Xdebug"/>
1.53 + <property name="debug2" value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
1.54 + </target>
1.55 +
1.56 + <target name="-run-one" depends="-debug-one">
1.57 + <property name="debug1" value="-Dn1"/>
1.58 + <property name="debug2" value="-Dn2"/>
1.59 + <property name="include" value="**/*Test"/>
1.60 + <mkdir dir="build/testresults"/>
1.61 + <junit dir="build/test/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
1.62 + <batchtest todir="build/testresults">
1.63 + <fileset dir="build/test/classes">
1.64 + <filename name="${include}.class"/>
1.65 + </fileset>
1.66 + </batchtest>
1.67 + <classpath>
1.68 + <path path="${test.cp}"/>
1.69 + <path location="build/test/classes"/>
1.70 + <path location="${junit.jar}"/>
1.71 + </classpath>
1.72 + <formatter type="brief" usefile="false"/>
1.73 + <formatter type="xml"/>
1.74 + <jvmarg value="${debug1}"/>
1.75 + <jvmarg value="${debug2}"/>
1.76 + </junit>
1.77 + </target>
1.78 +
1.79 + <target name="-build-one">
1.80 + <fail message="You need to specify version number" unless="version"/>
1.81 +
1.82 + <mkdir dir="build/${version}/classes"/>
1.83 + <property name="cp" value=""/>
1.84 + <javac
1.85 + srcdir="src-${version}"
1.86 + destdir="build/${version}/classes"
1.87 + source="1.5" target="1.5"
1.88 + classpath="${cp}"
1.89 + debug="true" debuglevel="lines,vars,source"
1.90 + />
1.91 + <copy todir="build/${version}/classes">
1.92 + <fileset dir="src-${version}">
1.93 + <exclude name="**/*.java"/>
1.94 + </fileset>
1.95 + </copy>
1.96 + </target>
1.97 +</project>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/samples/componentinjection/anagram-modular/nbproject/project.xml Sat Jun 14 10:06:45 2008 +0200
2.3 @@ -0,0 +1,88 @@
2.4 +<?xml version="1.0" encoding="UTF-8"?>
2.5 +<project xmlns="http://www.netbeans.org/ns/project/1" xmlns:ns4="null">
2.6 + <type>org.netbeans.modules.ant.freeform</type>
2.7 + <configuration>
2.8 + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
2.9 + <name>Anagram Modular</name>
2.10 + </general-data>
2.11 + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
2.12 + <name>Anagram Modular</name>
2.13 + <properties/>
2.14 + <folders>
2.15 + <source-folder>
2.16 + <label>src-api</label>
2.17 + <type>java</type>
2.18 + <location>src-api</location>
2.19 + <encoding>UTF-8</encoding>
2.20 + </source-folder>
2.21 + <source-folder>
2.22 + <label>Anagram Modular</label>
2.23 + <location>.</location>
2.24 + <encoding>UTF-8</encoding>
2.25 + </source-folder>
2.26 + </folders>
2.27 + <ide-actions>
2.28 + <action name="build">
2.29 + <target>build</target>
2.30 + </action>
2.31 + <action name="clean">
2.32 + <target>clean</target>
2.33 + </action>
2.34 + <action name="test">
2.35 + <target>test</target>
2.36 + </action>
2.37 + <action name="rebuild">
2.38 + <target>clean</target>
2.39 + <target>build</target>
2.40 + </action>
2.41 + <action name="debug.single">
2.42 + <target>-do-test</target>
2.43 + <context>
2.44 + <property>include</property>
2.45 + <folder>src-test</folder>
2.46 + <format>relative-path-noext</format>
2.47 + <arity>
2.48 + <one-file-only/>
2.49 + </arity>
2.50 + </context>
2.51 + </action>
2.52 + </ide-actions>
2.53 + <export>
2.54 + <type>folder</type>
2.55 + <location>build/api/classes</location>
2.56 + <build-target>build</build-target>
2.57 + </export>
2.58 + <view>
2.59 + <items>
2.60 + <source-folder style="packages">
2.61 + <label>src-api</label>
2.62 + <location>src-api</location>
2.63 + </source-folder>
2.64 + <source-file>
2.65 + <location>build.xml</location>
2.66 + </source-file>
2.67 + </items>
2.68 + <context-menu>
2.69 + <ide-action name="build"/>
2.70 + <ide-action name="rebuild"/>
2.71 + <ide-action name="clean"/>
2.72 + <ide-action name="test"/>
2.73 + <ide-action name="debug"/>
2.74 + </context-menu>
2.75 + </view>
2.76 + <subprojects/>
2.77 + </general-data>
2.78 + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
2.79 + <compilation-unit>
2.80 + <package-root>src-api</package-root>
2.81 + <built-to>build/api/classes</built-to>
2.82 + <source-level>1.5</source-level>
2.83 + </compilation-unit>
2.84 + <compilation-unit>
2.85 + <package-root>src-test</package-root>
2.86 + <classpath mode="compile">src-new-api:../libs/dist/junit-4.4.jar</classpath>
2.87 + <source-level>1.5</source-level>
2.88 + </compilation-unit>
2.89 + </java-data>
2.90 + </configuration>
2.91 +</project>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/samples/componentinjection/anagram-modular/src-api/org/apidesign/anagram/api/Scrambler.java Sat Jun 14 10:06:45 2008 +0200
3.3 @@ -0,0 +1,7 @@
3.4 +
3.5 +package org.apidesign.anagram.api;
3.6 +
3.7 +
3.8 +public interface Scrambler {
3.9 + public String scramble(String word);
3.10 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/samples/componentinjection/anagram-modular/src-api/org/apidesign/anagram/api/UI.java Sat Jun 14 10:06:45 2008 +0200
4.3 @@ -0,0 +1,7 @@
4.4 +
4.5 +package org.apidesign.anagram.api;
4.6 +
4.7 +
4.8 +public interface UI {
4.9 + public void display();
4.10 +}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/samples/componentinjection/anagram-modular/src-api/org/apidesign/anagram/api/WordLibrary.java Sat Jun 14 10:06:45 2008 +0200
5.3 @@ -0,0 +1,7 @@
5.4 +
5.5 +package org.apidesign.anagram.api;
5.6 +
5.7 +
5.8 +public interface WordLibrary {
5.9 + public String[] getWords();
5.10 +}