Re: ant: embeded frameworks not added to the classpath

From: Susanne Schneider (susanne.schneide..nteractive-systems.de)
Date: Fri Jul 31 2009 - 04:19:22 EDT

  • Next message: Stefan Klein (JIRA): "[OS-JIRA] Created: (WOL-1048) Reverse Engineering broken in Eclipse 3.4.2 and WOLips 3.4.5873"

    Hi Chuck,

    Chuck Hill schrieb:
    >
    > On Jul 30, 2009, at 6:44 AM, Susanne Schneider wrote:
    >
    >> Hello,
    >>
    >> after help from the wodev-list I finally get my first test application
    >> in 5.4 build with Eclipse (3.5, WOLips 3.4.5872) and ant. Even the
    >> usage of different WO versions (5.2 and 5.4) is possible at last by
    >> using different wolips.properties files. The application builds and
    >> run fine from within Eclipse.
    >>
    >> Now I have problem with the feature to embed custom frameworks into an
    >> application ant build. To test this I have created two projects a
    >> WebObjects Application "TestApp" using a WebObjects Framework
    >> "TestFramework". The system and my custom frameworks will get
    >> transfered to the internal framework directory in the TestApp.woa and
    >> the build completes without problems. But starting of the application
    >> standalone is not possible as my custom framework "TestFramework" is
    >> not listed in the classpath.txt files (the system frameworks are
    >> correct referenced).
    >
    > Are there any Java classes in it?
    >
    This is the only class in the Framework:

    package my.pack;
    import com.webobjects.appserver.WOApplication;

    public class TestClass extends WOApplication {
            
            public TestClass() {
                    System.out.println("its me from the framework!");
                    System.out.println("wo version of framework: " +
    this.getWebObjectsVersion());
            }

    }

    And this is the only class in the Test-Application:

    // Generated by the WOLips Templateengine Plug-in at 29.07.2009 10:19:05
    package your.app;

    import my.pack.TestClass;

    import com.webobjects.foundation.NSLog;

    import com.webobjects.appserver.WOApplication;

    public class Application extends TestClass {
            public static void main(String[] argv) {
                    WOApplication.main(argv, Application.class);
            }

            public Application() {
                    NSLog.out.appendln("Welcome to " + name() + " !");
                    System.out.println("WO version: " + this.getWebObjectsVersion());
            }
    }

    You see, both as simple at could be but the application needs the
    framework to work.

    > What does the classpath.txt file look like?

    This is the resulting CLSSPATH.TXT content:

    # JVM == java
    # JVMOptions ==
    # JDB == jdb
    # JDBOptions ==
    # ApplicationClass == your.app.Application

    APPROOT\Resources\Java\
    APPROOT\Resources\Java\testapp.jar

    APPROOT/Frameworks/JavaEOAccess.framework/Resources/Java/javaeoaccess.jar
    APPROOT/Frameworks/JavaEOControl.framework/Resources/Java/javaeocontrol.jar
    APPROOT/Frameworks/JavaFoundation.framework/Resources/Java/javafoundation.jar
    APPROOT/Frameworks/JavaJDBCAdaptor.framework/Resources/Java/javajdbcadaptor.jar
    APPROOT/Frameworks/JavaWebObjects.framework/Resources/Java/javawebobjects.jar
    APPROOT/Frameworks/JavaXML.framework/Resources/Java/javaxml.jar

    The output of the ant build (with echoproperties):

    Buildfile: C:\Eclipse\test\TestApp\build.xml
    init.properties:
    [echoproperties] #Ant properties
    [echoproperties] #Fri Jul 31 10:09:07 CEST 2009
    [echoproperties]
    ant.core.lib=C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant.jar
    [echoproperties] ant.file=C\:\\Eclipse\\test\\TestApp\\build.xml
    [echoproperties] ant.file.TestApp=C\:\\Eclipse\\test\\TestApp\\build.xml
    [echoproperties]
    ant.home=C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145
    [echoproperties] ant.java.version=1.5
    [echoproperties]
    ant.library.dir=C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib
    [echoproperties] ant.project.name=TestApp
    [echoproperties] ant.version=Apache Ant version 1.7.1 compiled on June
    27 2008
    [echoproperties] awt.toolkit=sun.awt.windows.WToolkit
    [echoproperties] basedir=C\:\\Eclipse\\test\\TestApp
    [echoproperties] build.app.name=TestApp
    [echoproperties] build.app.name.lowercase=testapp
    [echoproperties] classes.dir=bin
    [echoproperties] customInfoPListContent=
    [echoproperties]
    eclipse.pdebuild.home=/C\:/Eclipse/Eclipse_3.5/plugins/org.eclipse.pde.build_3.5.0.v20090527-1800/./
    [echoproperties]
    eclipse.pdebuild.scripts=/C\:/Eclipse/Eclipse_3.5/plugins/org.eclipse.pde.build_3.5.0.v20090527-1800/scripts/
    [echoproperties]
    eclipse.pdebuild.templates=/C\:/Eclipse/Eclipse_3.5/plugins/org.eclipse.pde.build_3.5.0.v20090527-1800/templates/
    [echoproperties] embed.Local=true
    [echoproperties] embed.Project=true
    [echoproperties] embed.System=true
    [echoproperties] file.encoding=UTF-8
    [echoproperties] file.encoding.pkg=sun.io
    [echoproperties] file.separator=\\
    [echoproperties] java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
    [echoproperties] java.awt.printerjob=sun.awt.windows.WPrinterJob
    [echoproperties]
    java.class.path=C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-antlr.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-apache-bcel.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-apache-bsf.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-apache-log4j.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-apache-oro.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-apache-regexp.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-apache-resolver.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-commons-logging.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-commons-net.jar;C\
    :\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-jai.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-javamail.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-jdepend.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-jmf.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-jsch.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-junit.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-launcher.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-netrexx.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-nodeps.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-starteam.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090
    120-1145\\lib\\ant-stylebook.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-swing.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-trax.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.apache.ant_1.7.1.v20090120-1145\\lib\\ant-weblogic.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.objectstyle.wolips.woproject.ant_3.4.5872\\lib\\woproject.jar;C\:\\Eclipse\\Eclipse_3.5\\configuration\\org.eclipse.osgi\\bundles\\15\\1\\.cp\\lib\\remoteAnt.jar;C\:\\Eclipse\\Eclipse_3.5\\configuration\\org.eclipse.osgi\\bundles\\225\\1\\.cp\\lib\\cayenne-1.2M12.jar;C\:\\Program
    Files
    (x86)\\Java\\jdk1.5.0_12\\lib\\tools.jar;C\:\\Eclipse\\Eclipse_3.5\\plugins\\org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar
    [echoproperties] java.class.version=49.0
    [echoproperties] java.endorsed.dirs=C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\endorsed
    [echoproperties] java.ext.dirs=C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\ext
    [echoproperties] java.home=C\:\\Program Files (x86)\\Java\\jre1.5.0_12
    [echoproperties] java.io.tmpdir=C\:\\Users\\Susanne\\AppData\\Local\\Temp\\
    [echoproperties]
    java.library.path=C\:\\Eclipse\\Eclipse_3.5;.;C\:\\Windows\\system32;C\:\\Windows;c\:\\program
    files
    (x86)\\imagemagick-6.4.4-q16;C\:\\oracle\\product\\10.2.0\\db_1\\bin;C\:\\Windows\\system32;C\:\\Windows;C\:\\Windows\\System32\\Wbem;C\:\\PROGRA~2\\Java\\JDK15~1.0_1\\bin;C\:/Apple\\Library\\Executables;C\:/Apple\\bin;C\:/Apple\\Library\\JDK\\bin;C\:/Apple\\Library\\Executables;C\:/Apple\\bin;C\:/Apple\\Library\\JDK\\bin;C\:/Apple\\Library\\Executables;C\:/Apple\\bin;C\:/Apple\\Library\\JDK\\bin;C\:\\Program
    files
    (x86)\\Jad;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C\:\\Program
    Files (x86)\\QuickTime\\QTSystem\\;C\:\\Program Files
    (x86)\\CVSNT\\;C\:\\Eclipse\\Eclipse_3.5\\configuration\\org.eclipse.osgi\\bundles\\149\\1\\.cp
    [echoproperties] java.runtime.name=Java(TM) 2 Runtime Environment,
    Standard Edition
    [echoproperties] java.runtime.version=1.5.0_12-b04
    [echoproperties] java.specification.name=Java Platform API Specification
    [echoproperties] java.specification.vendor=Sun Microsystems Inc.
    [echoproperties] java.specification.version=1.5
    [echoproperties] java.vendor=Sun Microsystems Inc.
    [echoproperties] java.vendor.url=http\://java.sun.com/
    [echoproperties]
    java.vendor.url.bug=http\://java.sun.com/cgi-bin/bugreport.cgi
    [echoproperties] java.version=1.5.0_12
    [echoproperties] java.vm.info=mixed mode
    [echoproperties] java.vm.name=Java HotSpot(TM) Client VM
    [echoproperties] java.vm.specification.name=Java Virtual Machine
    Specification
    [echoproperties] java.vm.specification.vendor=Sun Microsystems Inc.
    [echoproperties] java.vm.specification.version=1.0
    [echoproperties] java.vm.vendor=Sun Microsystems Inc.
    [echoproperties] java.vm.version=1.5.0_12-b04
    [echoproperties] line.separator=\r\n
    [echoproperties] os.arch=x86
    [echoproperties] os.name=Windows Vista
    [echoproperties] os.version=6.0
    [echoproperties] path.separator=;
    [echoproperties] principalClass=your.app.Application
    [echoproperties] project.name=TestApp
    [echoproperties] project.name.lowercase=testapp
    [echoproperties] project.type=application
    [echoproperties] sun.arch.data.model=32
    [echoproperties] sun.boot.class.path=C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\rt.jar;C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\i18n.jar;C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\sunrsasign.jar;C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\jsse.jar;C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\jce.jar;C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\lib\\charsets.jar;C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\classes
    [echoproperties] sun.boot.library.path=C\:\\Program Files
    (x86)\\Java\\jre1.5.0_12\\bin
    [echoproperties] sun.cpu.endian=little
    [echoproperties] sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx
    pentium i486 i386 i86
    [echoproperties] sun.desktop=windows
    [echoproperties] sun.io.unicode.encoding=UnicodeLittle
    [echoproperties] sun.java.launcher=SUN_STANDARD
    [echoproperties] sun.jnu.encoding=Cp1252
    [echoproperties] sun.management.compiler=HotSpot Client Compiler
    [echoproperties] sun.os.patch.level=Service Pack 2
    [echoproperties] user.country=DE
    [echoproperties] user.dir=C\:\\Eclipse\\test\\TestApp
    [echoproperties] user.home=C\:\\Users\\Susanne
    [echoproperties] user.language=de
    [echoproperties] user.name=Susanne
    [echoproperties] user.timezone=
    [echoproperties] user.variant=
    [echoproperties] webXML=false
    [echoproperties] webXML_CustomContent=
    [echoproperties] wo.apps.root=C\:/Apple/5.4/Local
    [echoproperties]
    wo.bootstrap.jar=C\:/Apple/5.4/Library/JavaApplications/wotaskd.woa/WOBootstrap.jar
    [echoproperties]
    wo.extensions=C\:/Apple/5.4/Local/Library/WebObjects/Extensions
    [echoproperties] wo.local.frameworks=C\:/Apple/5.4/Local/Library/Frameworks
    [echoproperties]
    wo.local.frameworks.root=C\:/Apple/5.4/Local/Library/Frameworks
    [echoproperties] wo.local.root=C\:/Apple/5.4/Local
    [echoproperties] wo.system.frameworks=C\:/Apple/5.4/Library/Frameworks
    [echoproperties] wo.system.root=C\:/Apple/5.4
    [echoproperties] wo.user.root=C\:/Users/Susanne
    [echoproperties]
    wolips.properties=C\:\\Users\\Susanne\\Library\\WOLips\\wolips_5.4.properties
    init.build:
    compile:
    build.woapp:
    [woapplication] Installing TestApp in dist
    [woapplication] Copying 4525 files to
    C:\Eclipse\test\TestApp\dist\TestApp.woa\Contents\Frameworks
    [woapplication] Copied 306 empty directories to 8 empty directories
    under C:\Eclipse\test\TestApp\dist\TestApp.woa\Contents\Frameworks
    [woapplication] 'Windows Vista' is some kind of windows, skipping chmod.
    build:
    BUILD SUCCESSFUL
    Total time: 1 minute 15 seconds

    The framework was build and installed in
    C:/Apple/5.4/Local/Library/Frameworks before.

    The Eclipse project TestApp has set the Framework in the
    JavaBuild-properties as a required project. The application works fine
    from within Eclipse.

    >
    > Chuck
    >
    >>
    >> The woapplication task I used is:
    >>
    >> <target name="build.woapp" depends="compile">
    >> <taskdef name="woapplication"
    >> classname="org.objectstyle.woproject.ant.WOApplication"/>
    >>
    >> <woapplication name="${build.app.name}"
    >> frameworksBaseURL="/WebObjects/${build.app.name}.woa/Frameworks"
    >> destDir="${dest.dir}" customInfoPListContent="${customInfoPListContent}"
    >> principalClass="${principalClass}" webXML="${webXML}"
    >> webXML_CustomContent="${webXML_CustomContent}"
    >> servletAdaptor="com.webobjects.jspservlet.WOServletAdaptor">
    >> <classes dir="${classes.dir}">
    >> <includesfile name="woproject/classes.include.patternset" />
    >> <excludesfile name="woproject/classes.exclude.patternset" />
    >> <exclude if="javaClient" name="**/client/**/*.*"/>
    >> </classes>
    >>
    >> <wsresources dir=".">
    >> <includesfile
    >> name="woproject/wsresources.include.patternset" />
    >> <excludesfile
    >> name="woproject/wsresources.exclude.patternset" />
    >> </wsresources>
    >> <resources dir=".">
    >> <includesfile
    >> name="woproject/resources.include.patternset" />
    >> <excludesfile
    >> name="woproject/resources.exclude.patternset" />
    >> <exclude if="javaClient" name="**/client/**/*.*"/>
    >> </resources>
    >>
    >> <frameworks root="ProjectLocal" embed="${embed.ProjectLocal}"
    >> eclipse="true" />
    >> <frameworks root="External" embed="${embed.External}"
    >> eclipse="true" />
    >> <frameworks root="Local" embed="${embed.Local}" eclipse="true"
    >> bundles="TestFramework"/>
    >> <frameworks root="User" embed="${embed.User}" eclipse="true" />
    >> <frameworks root="System" embed="${embed.System}"
    >> eclipse="true" />
    >> <frameworks root="Network" embed="${embed.Network}"
    >> eclipse="true" />
    >>
    >> <lib dir="Libraries">
    >> <include name="*.jar" />
    >> </lib>
    >> </woapplication>
    >> </target>
    >>
    >> with all "embed" properties set to true. I tested an <include> but
    >> that makes no difference. What do I do wrong??
    >>
    >> Regards,
    >> Susanne
    >> --
    >> Susanne Schneider
    >> Coordinator secuTrial Development
    >>
    >> iAS interActive Systems GmbH
    >> Dieffenbachstraße 33 c, D-10967 Berlin
    >>
    >> fon +49(0)30 22 50 50 - 498
    >> fax +49(0)30 22 50 50 - 451
    >> mail susanne.schneide..nterActive-Systems.de
    >> web http://www.interActive-Systems.de
    >>
    >> ----------------------------------------------------
    >> Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
    >> Sitz der Gesellschaft: Berlin
    >> Amtsgericht Berlin Charlottenburg, HRB 106103B
    >> ----------------------------------------------------
    >>
    >>
    >>
    >

    Again, thank you for your support :-)

    Susanne

    -- 
    Susanne Schneider
    Coordinator secuTrial Development
    

    iAS interActive Systems GmbH Dieffenbachstraße 33 c, D-10967 Berlin

    fon +49(0)30 22 50 50 - 498 fax +49(0)30 22 50 50 - 451 mail susanne.schneide..nterActive-Systems.de web http://www.interActive-Systems.de

    ---------------------------------------------------- Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche Sitz der Gesellschaft: Berlin Amtsgericht Berlin Charlottenburg, HRB 106103B ----------------------------------------------------



    This archive was generated by hypermail 2.0.0 : Fri Jul 31 2009 - 04:20:48 EDT