Hi all,I've been putting in some work to get ptII into maven. Currently I've got it compiling but am still working on some problems getting it to run.
I've created a pom.xml a patch for the ptII tree which can be found, along with install instructions, here: https://www.hpc.jcu.edu.au/git/?p=jc124742/ptII-maven.git;a=summary you can either get it by downloading the snapshot from the above site or get it with git: git clone git://git.hpc.jcu.edu.au/jc124742/ptII-maven.git One problem with converting to maven is there is no way (please correct me if i'm wrong, please!) to exclude specific source files if the jar dependencies are missing. maven just wants to compile everything. This is the reason i made a make target to copy all the compilable code into a maven source structure. I don't think this is a bad thing, as most of the optional dependencies are for actor libraries and other optional stuff which i think should eventually be separated out into their own maven projects. For those interested or willing to help with the execution: i've been playing with the following pluging http://mojo.codehaus.org/exec-maven-plugin/ the attached text file contains the build plugin to add to the pom.xml (i've not pushed my changes to the central server yet, cause they don't work) along with the stack trace produced by "mvn exec:exec". Any help or suggestions are more than welcome. -- Tristan King Research Officer, eResearch Centre James Cook University, Townsville Qld 4811 Australia Phone: +61747816902 E-mail: [EMAIL PROTECTED] www: http://eresearch.jcu.edu.au
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <executable>java</executable> <arguments> <argument>-classpath</argument> <classpath/> <argument>ptolemy.vergil.VergilApplication</argument> </arguments> <workingDirectory>${basedir}/src/main/other</workingDirectory> <environmentVariables> <environmentVariable> <key>CLASSPATH</key> <value>${basedir}/src/main/other</value> </environmentVariable> </environmentVariables> </configuration> </plugin> [INFO] java.lang.Exception: Failed to parse "" [INFO] at ptolemy.actor.gui.MoMLApplication.throwArgsException(MoMLApplication.java:584) [INFO] at ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:245) [INFO] at ptolemy.vergil.VergilApplication.<init>(VergilApplication.java:98) [INFO] at ptolemy.vergil.VergilApplication$1.run(VergilApplication.java:141) [INFO] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) [INFO] at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) [INFO] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) [INFO] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) [INFO] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) [INFO] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) [INFO] at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) [INFO] Caused by: java.lang.Exception: Failed to read configuration 'file:/home/tristan/projects/none/ptII/src/main/other/ptolemy/configs/full/configuration.xml' [INFO] at ptolemy.vergil.VergilApplication._createDefaultConfiguration(VergilApplication.java:233) [INFO] at ptolemy.vergil.VergilApplication._createEmptyConfiguration(VergilApplication.java:269) [INFO] at ptolemy.actor.gui.MoMLApplication._parseArgs(MoMLApplication.java:998) [INFO] at ptolemy.vergil.VergilApplication._parseArgs(VergilApplication.java:357) [INFO] at ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:215) [INFO] ... 9 more [INFO] Caused by: com.microstar.xml.XmlException: XML element "input" triggers exception. in file:/home/tristan/projects/none/ptII/src/main/other/ptolemy/configs/defaultFullConfiguration.xml at line 76 and column 67 [INFO] Caused by: [INFO] ptolemy.kernel.util.IllegalActionException: Error evaluating expression: $CLASSPATH/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif [INFO] in .configuration.icon editor library.image.source [INFO] Because: [INFO] Cannot read file 'xxxxxxCLASSPATHxxxxxx/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' [INFO] in .configuration.icon editor library.image.source [INFO] Because: [INFO] Cannot find file 'ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' in classpath [INFO] at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:3293) [INFO] at com.microstar.xml.XmlParser.parseElement(XmlParser.java:931) [INFO] at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104) [INFO] at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924) [INFO] at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481) [INFO] at com.microstar.xml.XmlParser.doParse(XmlParser.java:159) [INFO] at com.microstar.xml.XmlParser.parse(XmlParser.java:132) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1336) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1294) [INFO] at ptolemy.moml.MoMLParser._parse(MoMLParser.java:5480) [INFO] at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2573) [INFO] at com.microstar.xml.XmlParser.parseElement(XmlParser.java:931) [INFO] at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104) [INFO] at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924) [INFO] at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481) [INFO] at com.microstar.xml.XmlParser.doParse(XmlParser.java:159) [INFO] at com.microstar.xml.XmlParser.parse(XmlParser.java:132) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1336) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1294) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1267) [INFO] at ptolemy.actor.gui.MoMLApplication.readConfiguration(MoMLApplication.java:361) [INFO] at ptolemy.vergil.VergilApplication._createDefaultConfiguration(VergilApplication.java:231) [INFO] ... 13 more [INFO] Caused by: ptolemy.kernel.util.IllegalActionException: Error evaluating expression: $CLASSPATH/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif [INFO] in .configuration.icon editor library.image.source [INFO] Because: [INFO] Cannot read file 'xxxxxxCLASSPATHxxxxxx/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' [INFO] in .configuration.icon editor library.image.source [INFO] Because: [INFO] Cannot find file 'ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' in classpath [INFO] at ptolemy.data.expr.Variable._evaluate(Variable.java:1622) [INFO] at ptolemy.data.expr.Variable.getToken(Variable.java:576) [INFO] at ptolemy.data.expr.StringParameter.stringValue(StringParameter.java:95) [INFO] at ptolemy.data.expr.FileParameter.asURL(FileParameter.java:210) [INFO] at ptolemy.vergil.kernel.attributes.ImageAttribute.attributeChanged(ImageAttribute.java:127) [INFO] at ptolemy.data.expr.Variable.validate(Variable.java:1444) [INFO] at ptolemy.moml.MoMLParser.endDocument(MoMLParser.java:643) [INFO] at com.microstar.xml.XmlParser.doParse(XmlParser.java:162) [INFO] at com.microstar.xml.XmlParser.parse(XmlParser.java:132) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1336) [INFO] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1294) [INFO] at ptolemy.moml.MoMLParser._parse(MoMLParser.java:5480) [INFO] at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2573) [INFO] ... 34 more [INFO] Caused by: ptolemy.kernel.util.IllegalActionException: Cannot read file 'xxxxxxCLASSPATHxxxxxx/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' [INFO] in .configuration.icon editor library.image.source [INFO] Because: [INFO] Cannot find file 'ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' in classpath [INFO] at ptolemy.data.expr.FileParameter.asURL(FileParameter.java:216) [INFO] at ptolemy.vergil.kernel.attributes.ImageAttribute.attributeChanged(ImageAttribute.java:127) [INFO] at ptolemy.data.expr.Variable._setTokenAndNotify(Variable.java:1940) [INFO] at ptolemy.data.expr.Variable._evaluate(Variable.java:1619) [INFO] ... 46 more [INFO] Caused by: java.io.IOException: Cannot find file 'ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif' in classpath [INFO] at ptolemy.util.FileUtilities.nameToURL(FileUtilities.java:295) [INFO] at ptolemy.data.expr.FileParameter.asURL(FileParameter.java:213) [INFO] ... 49 more