Spring version that compiles, but does not run
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 10:07:08 +0200
changeset 22557ae32a47ccd
parent 224 7a15b5efae6a
child 226 ff094afa4a5d
Spring version that compiles, but does not run
samples/componentinjection/anagram-modular/build.xml
samples/componentinjection/anagram-modular/nbproject/project.xml
samples/componentinjection/anagram-modular/src-app-spring/org/apidesign/anagram/app/spring/Main.java
samples/libs/build.xml
     1.1 --- a/samples/componentinjection/anagram-modular/build.xml	Sat Jun 14 10:07:05 2008 +0200
     1.2 +++ b/samples/componentinjection/anagram-modular/build.xml	Sat Jun 14 10:07:08 2008 +0200
     1.3 @@ -27,6 +27,10 @@
     1.4              <param name="version" value="app-property"/>
     1.5              <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes"/>
     1.6          </antcall>
     1.7 +        <antcall target="-build-one">
     1.8 +            <param name="version" value="app-spring"/>
     1.9 +            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/spring-2.5.jar"/>
    1.10 +        </antcall>
    1.11          
    1.12      </target>
    1.13      
    1.14 @@ -43,6 +47,12 @@
    1.15              <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes"/>
    1.16              <param name="main" value="org.apidesign.anagram.app.property.Main"/>
    1.17          </antcall>
    1.18 +        <echo level="info" message="Running spring version"/>
    1.19 +        <antcall target="-run-one">
    1.20 +            <param name="version" value="app-spring"/>
    1.21 +            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/spring-2.5.jar"/>
    1.22 +            <param name="main" value="org.apidesign.anagram.app.spring.Main"/>
    1.23 +        </antcall>
    1.24      </target>
    1.25      
    1.26      <!-- support methods -->
     2.1 --- a/samples/componentinjection/anagram-modular/nbproject/project.xml	Sat Jun 14 10:07:05 2008 +0200
     2.2 +++ b/samples/componentinjection/anagram-modular/nbproject/project.xml	Sat Jun 14 10:07:08 2008 +0200
     2.3 @@ -46,6 +46,12 @@
     2.4                      <encoding>UTF-8</encoding>
     2.5                  </source-folder>
     2.6                  <source-folder>
     2.7 +                    <label>src-app-spring</label>
     2.8 +                    <type>java</type>
     2.9 +                    <location>src-app-spring</location>
    2.10 +                    <encoding>UTF-8</encoding>
    2.11 +                </source-folder>
    2.12 +                <source-folder>
    2.13                      <label>Anagram Modular</label>
    2.14                      <location>.</location>
    2.15                      <encoding>UTF-8</encoding>
    2.16 @@ -108,6 +114,10 @@
    2.17                          <label>src-app-property</label>
    2.18                          <location>src-app-property</location>
    2.19                      </source-folder>
    2.20 +                    <source-folder style="packages">
    2.21 +                        <label>src-app-spring</label>
    2.22 +                        <location>src-app-spring</location>
    2.23 +                    </source-folder>
    2.24                      <source-file>
    2.25                          <location>build.xml</location>
    2.26                      </source-file>
    2.27 @@ -159,6 +169,12 @@
    2.28                  <source-level>1.5</source-level>
    2.29              </compilation-unit>
    2.30              <compilation-unit>
    2.31 +                <package-root>src-app-spring</package-root>
    2.32 +                <classpath mode="compile">src-api:src-scrambler-simple:src-word-static:src-gui:../../libs/dist/spring-2.5.jar</classpath>
    2.33 +                <built-to>build/app-spring/classes</built-to>
    2.34 +                <source-level>1.5</source-level>
    2.35 +            </compilation-unit>
    2.36 +            <compilation-unit>
    2.37                  <package-root>src-test</package-root>
    2.38                  <classpath mode="compile">src-new-api:../libs/dist/junit-4.4.jar</classpath>
    2.39                  <source-level>1.5</source-level>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/samples/componentinjection/anagram-modular/src-app-spring/org/apidesign/anagram/app/spring/Main.java	Sat Jun 14 10:07:08 2008 +0200
     3.3 @@ -0,0 +1,18 @@
     3.4 +package org.apidesign.anagram.app.spring;
     3.5 +
     3.6 +import org.apidesign.anagram.api.UI;
     3.7 +import org.springframework.context.ApplicationContext;
     3.8 +import org.springframework.context.support.ClassPathXmlApplicationContext;
     3.9 +
    3.10 +public final class Main {
    3.11 +    private Main() { }
    3.12 +    
    3.13 +    public static void main(String[] args) throws Exception {
    3.14 +        ApplicationContext context = new ClassPathXmlApplicationContext("org/apidesign/anagram/app/spring/conf.xml");
    3.15 +        
    3.16 +        UI ui = (UI)context.getBean("ui", UI.class);
    3.17 +        ui.display();
    3.18 +    }
    3.19 +    
    3.20 +    
    3.21 +}
     4.1 --- a/samples/libs/build.xml	Sat Jun 14 10:07:05 2008 +0200
     4.2 +++ b/samples/libs/build.xml	Sat Jun 14 10:07:08 2008 +0200
     4.3 @@ -25,6 +25,11 @@
     4.4              <param name="library.include" value="**/org-netbeans-insane.jar"/>
     4.5              <param name="url" value="http://deadlock.netbeans.org/hudson/job/javadoc-nbms/lastSuccessfulBuild/artifact/nbbuild/nbms/ide9/org-netbeans-insane.nbm"/>
     4.6          </antcall>
     4.7 +        <antcall target="-library-from-zip">
     4.8 +            <param name="library" value="spring-2.5"/>
     4.9 +            <param name="library.include" value="**/*spring*.jar"/>
    4.10 +            <param name="url" value="http://deadlock.netbeans.org/hudson/job/javadoc-nbms/lastSuccessfulBuild/artifact/nbbuild/nbms/java2/org-netbeans-libs-springframework.nbm"/>
    4.11 +        </antcall>
    4.12      </target>
    4.13      
    4.14      <!-- support methods -->