mocklib-checkins Mailing List for mocklib (Page 19)
Brought to you by:
bittwidler,
fastdragon
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(1) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
(46) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(54) |
Feb
(120) |
Mar
(31) |
Apr
(11) |
May
(8) |
Jun
(5) |
Jul
|
Aug
(22) |
Sep
(295) |
Oct
(6) |
Nov
(10) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
(8) |
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
(8) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(17) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jay <ja...@us...> - 2006-02-22 14:14:57
|
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27081/input/javasrc/biz/xsoftware/test/mock2 Modified Files: Tag: branchForOffice TestMockCreator.java Log Message: make testThrowException and make it passed Index: TestMockCreator.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestMockCreator.java,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -C2 -d -r1.1.2.12 -r1.1.2.13 *** TestMockCreator.java 18 Feb 2006 08:09:16 -0000 1.1.2.12 --- TestMockCreator.java 22 Feb 2006 14:14:45 -0000 1.1.2.13 *************** *** 1,4 **** --- 1,5 ---- package biz.xsoftware.test.mock2; + import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; *************** *** 166,169 **** --- 167,192 ---- } + + public void testExceptionThrows() throws Exception{ + MockObject m=MockObjectFactory.createMock(ListenerOne.class); + ListenerOne l=(ListenerOne)m; + + String methodName="callMeSecond"; + String message="Make sure systemUnderTest handles exception"; + CalledMethod calledMethod=m.expect(methodName,new IOException(message)); + + + String param="params"; + try{ + l.callMeSecond(param); + m.verify(); + fail("Exception should be thrown earlier, try to find why it did not!!!"); + } catch (IOException e) { + assertEquals(message,e.getMessage()); + + } + + + } } |
From: Jay <ja...@us...> - 2006-02-22 14:14:21
|
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26542/input/javasrc/biz/xsoftware/mock2 Modified Files: Tag: branchForOffice MockObject.java Log Message: verify() method add throws Exception Index: MockObject.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/MockObject.java,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -C2 -d -r1.2.2.4 -r1.2.2.5 *** MockObject.java 18 Jan 2006 09:45:32 -0000 1.2.2.4 --- MockObject.java 22 Feb 2006 14:14:00 -0000 1.2.2.5 *************** *** 143,149 **** * @param timeout * the time set for waitting the call * @throws InterruptedException */ ! public void verify() throws InterruptedException; /** --- 143,151 ---- * @param timeout * the time set for waitting the call + * @throws Throwable * @throws InterruptedException + * @throws Throwable */ ! public void verify() throws Exception; /** |
From: Nobody <fas...@us...> - 2006-02-21 11:33:07
|
Update of /cvsroot/mocklib/osgimgr/tools/ant/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4638/tools/ant/bin Log Message: Directory /cvsroot/mocklib/osgimgr/tools/ant/bin added to the repository |
From: Nobody <fas...@us...> - 2006-02-21 10:48:14
|
Update of /cvsroot/mocklib/osgimgr/tools/osgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/osgi Added Files: bcel-head.jar osgi-ant.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: bcel-head.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: osgi-ant.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:14
|
Update of /cvsroot/mocklib/osgimgr/tools/ant-contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/ant-contrib Added Files: ant-contrib.jar bcel-head.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: bcel-head.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-contrib.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:14
|
Update of /cvsroot/mocklib/osgimgr/tools/package-list/jdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/package-list/jdk Added Files: package-list Log Message: add osgimgr to mocklib project for now. --- NEW FILE: package-list --- java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd java.awt.event java.awt.font java.awt.geom java.awt.im java.awt.im.spi java.awt.image java.awt.image.renderable java.awt.print java.beans java.beans.beancontext java.io java.lang java.lang.ref java.lang.reflect java.math java.net java.nio java.nio.channels java.nio.channels.spi java.nio.charset java.nio.charset.spi java.rmi java.rmi.activation java.rmi.dgc java.rmi.registry java.rmi.server java.security java.security.acl java.security.cert java.security.interfaces java.security.spec java.sql java.text java.util java.util.jar java.util.logging java.util.prefs java.util.regex java.util.zip javax.accessibility javax.crypto javax.crypto.interfaces javax.crypto.spec javax.imageio javax.imageio.event javax.imageio.metadata javax.imageio.plugins.jpeg javax.imageio.spi javax.imageio.stream javax.naming javax.naming.directory javax.naming.event javax.naming.ldap javax.naming.spi javax.net javax.net.ssl javax.print javax.print.attribute javax.print.attribute.standard javax.print.event javax.rmi javax.rmi.CORBA javax.security.auth javax.security.auth.callback javax.security.auth.kerberos javax.security.auth.login javax.security.auth.spi javax.security.auth.x500 javax.security.cert javax.sound.midi javax.sound.midi.spi javax.sound.sampled javax.sound.sampled.spi javax.sql javax.swing javax.swing.border javax.swing.colorchooser javax.swing.event javax.swing.filechooser javax.swing.plaf javax.swing.plaf.basic javax.swing.plaf.metal javax.swing.plaf.multi javax.swing.table javax.swing.text javax.swing.text.html javax.swing.text.html.parser javax.swing.text.rtf javax.swing.tree javax.swing.undo javax.transaction javax.transaction.xa javax.xml.parsers javax.xml.transform javax.xml.transform.dom javax.xml.transform.sax javax.xml.transform.stream org.ietf.jgss org.omg.CORBA org.omg.CORBA.DynAnyPackage org.omg.CORBA.ORBPackage org.omg.CORBA.TypeCodePackage org.omg.CORBA.portable org.omg.CORBA_2_3 org.omg.CORBA_2_3.portable org.omg.CosNaming org.omg.CosNaming.NamingContextExtPackage org.omg.CosNaming.NamingContextPackage org.omg.Dynamic org.omg.DynamicAny org.omg.DynamicAny.DynAnyFactoryPackage org.omg.DynamicAny.DynAnyPackage org.omg.IOP org.omg.IOP.CodecFactoryPackage org.omg.IOP.CodecPackage org.omg.Messaging org.omg.PortableInterceptor org.omg.PortableInterceptor.ORBInitInfoPackage org.omg.PortableServer org.omg.PortableServer.CurrentPackage org.omg.PortableServer.POAManagerPackage org.omg.PortableServer.POAPackage org.omg.PortableServer.ServantLocatorPackage org.omg.PortableServer.portable org.omg.SendingContext org.omg.stub.java.rmi org.w3c.dom org.xml.sax org.xml.sax.ext org.xml.sax.helpers |
From: Nobody <fas...@us...> - 2006-02-21 10:48:14
|
Update of /cvsroot/mocklib/osgimgr/input/osgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/input/osgi Added Files: osgiminimum.zip Log Message: add osgimgr to mocklib project for now. --- NEW FILE: osgiminimum.zip --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:14
|
Update of /cvsroot/mocklib/osgimgr/tools/ant-junit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/ant-junit Added Files: ant-junit.jar junit.jar README.txt Log Message: add osgimgr to mocklib project for now. --- NEW FILE: junit.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-junit.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: README.txt --- Why put ant optional tasks here. Well first read the FAQ at ant.apache.org http://ant.apache.org/faq.html#delegating-classloader. I am following option 2. If I don't, I have to put junit.jar in two places tools/ant/lib with the ant-junit task AND input/lib for application developers to use the junit.jar Instead, I separate out the ant-junit.jar and put it in the tools/ant-optional folder. Then I taskdef junit against the ant-junit.jar with junit in it's classpath which I put in input/lib/tools If anyone has a better suggestion, I am all ears as this is not the optimal solution I think. nonetheless, it works for now. Also, junit.jar is a special version of junit. It is 3.8.1 plus a change that Kent Beck made for me. IT should be checked into cvs though the change he checked in was not mine and broke junit very badly. I have to request a fix from him. The break was every test passing no matter what. thanks, dean |
Update of /cvsroot/mocklib/osgimgr/tools/findbugs/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/findbugs/lib Added Files: annotations.jar bcel.jar buggy.icns dom4j-full.jar findbugs-ant.jar findbugs.jar findbugsGUI.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: findbugs.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: findbugs-ant.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: buggy.icns --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bcel.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: findbugsGUI.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dom4j-full.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: annotations.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:14
|
Update of /cvsroot/mocklib/osgimgr/tools/package-list/junit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/package-list/junit Added Files: package-list Log Message: add osgimgr to mocklib project for now. --- NEW FILE: package-list --- junit.awtui junit.extensions junit.framework junit.runner junit.samples junit.samples.money junit.swingui junit.tests junit.tests.extensions junit.tests.framework junit.tests.runner junit.textui |
From: Nobody <fas...@us...> - 2006-02-21 10:48:13
|
Update of /cvsroot/mocklib/osgimgr/tools/emma In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/emma Added Files: emma.jar emma_ant.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: emma.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: emma_ant.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:08
|
Update of /cvsroot/mocklib/osgimgr/tools/findbugs/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/findbugs/bin Added Files: addMessages computeBugHistory convertXmlToText defectDensity fbwrap filterBugs findbugs findbugs.bat listBugDatabaseInfo mineBugHistory printAppVersion setBugDatabaseInfo unionBugs xpathFind Log Message: add osgimgr to mocklib project for now. --- NEW FILE: computeBugHistory --- #! /bin/sh # Merge a historical bug collection and a bug collection, producing an updated # historical bug collection program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.Update fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: unionBugs --- #! /bin/sh # Deprecated # Create the union of two results files, preserving # annotations in both files in the result. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: setBugDatabaseInfo --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.SetBugDatabaseInfo fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: xpathFind --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.xml.XPathFind fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: defectDensity --- #! /bin/sh # Generate a defect density table from a bug collection program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.DefectDensity fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: listBugDatabaseInfo --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.ListBugDatabaseInfo fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: mineBugHistory --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.MineBugHistory fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs --- NEW FILE: findbugs.bat --- @echo off :: Launch FindBugs on a Windows system. :: Adapted from scripts found at http://www.ericphelps.com/batch/ :: This will only work on Windows NT or later! :: Don't affect environment outside of this invocation setlocal :: ---------------------------------------------------------------------- :: Set up default values :: ---------------------------------------------------------------------- set appjar=findbugsGUI.jar set javahome= set launcher=javaw.exe set start=start "FindBugs" set jvmargs= set debugArg= set conserveSpaceArg= set workHardArg= set args= set javaProps= set maxheap=256 :: Try finding the default FINDBUGS_HOME directory :: from the directory path of this script set default_findbugs_home=%~dp0.. :: Honor JAVA_HOME environment variable if it is set if "%JAVA_HOME%"=="" goto nojavahome if not exist "%JAVA_HOME%\bin\javaw.exe" goto nojavahome set javahome=%JAVA_HOME%\bin\ :nojavahome goto loop :: ---------------------------------------------------------------------- :: Process command-line arguments :: ---------------------------------------------------------------------- :shift2 shift :shift1 shift :loop :: Remove surrounding quotes from %1 and %2 set firstArg=%~1 set secondArg=%~2 if not "%firstArg%"=="-gui" goto notGui set appjar=findbugsGUI.jar set launcher=javaw.exe goto shift1 :notGui if not "%firstArg%"=="-textui" goto notTextui set appjar=findbugs.jar set launcher=java.exe set start= goto shift1 :notTextui if not "%firstArg%"=="-debug" goto notDebug set launcher=java.exe set start= set debugArg=-Dfindbugs.debug=true goto shift1 :notDebug if "%firstArg%"=="-home" set FINDBUGS_HOME=%secondArg% if "%firstArg%"=="-home" goto shift2 if "%firstArg%"=="-jvmArgs" set jvmargs=%secondArg% if "%firstArg%"=="-jvmArgs" goto shift2 if "%firstArg%"=="-maxHeap" set maxheap=%secondArg% if "%firstArg%"=="-maxHeap" goto shift2 if "%firstArg%"=="-conserveSpace" set conserveSpaceArg=-Dfindbugs.conserveSpace=true if "%firstArg%"=="-conserveSpace" goto shift1 if "%firstArg%"=="-workHard" set workHardArg=-Dfindbugs.workHard=true if "%firstArg%"=="-workHard" goto shift1 if "%firstArg%"=="-javahome" set javahome=%secondArg%\bin\ if "%firstArg%"=="-javahome" goto shift2 if "%firstArg%"=="-property" set javaProps=-D%secondArg% %javaProps% if "%firstArg%"=="-property" goto shift2 if "%firstArg%"=="-help" goto help if "%firstArg%"=="" goto launch set args=%args% "%firstArg%" goto shift1 :: ---------------------------------------------------------------------- :: Launch FindBugs :: ---------------------------------------------------------------------- :launch :: Make sure FINDBUGS_HOME is set. :: If it isn't, try using the default value based on the :: directory path of the invoked script. :: Note that this will fail miserably if the value of FINDBUGS_HOME :: has quote characters in it. if not "%FINDBUGS_HOME%"=="" goto checkHomeValid set FINDBUGS_HOME=%default_findbugs_home% :checkHomeValid if not exist "%FINDBUGS_HOME%\lib\%appjar%" goto homeNotSet :found_home :: Launch FindBugs! %start% "%javahome%%launcher%" %debugArg% %conserveSpaceArg% %workHardArg% %javaProps% "-Dfindbugs.home=%FINDBUGS_HOME%" -Xmx%maxheap%m %jvmargs% -jar "%FINDBUGS_HOME%\lib\%appjar%" %args% goto end :: ---------------------------------------------------------------------- :: Display usage information :: ---------------------------------------------------------------------- :help echo Usage: findbugs [options] echo -home dir Use dir as FINDBUGS_HOME echo -gui Use the Graphical UI (default behavior) echo -textui Use the Text UI echo -jvmArgs args Pass args to JVM echo -maxHeap size Set maximum Java heap size in megabytes (default %maxheap%) echo -javahome dir Specify location of JRE echo -help Display this message echo -debug Enable debug tracing in FindBugs echo -conserveSpace Conserve memory at the expense of precision echo All other options are passed to the FindBugs application goto end :: ---------------------------------------------------------------------- :: Report that FINDBUGS_HOME is not set (and was not specified) :: ---------------------------------------------------------------------- :homeNotSet echo Could not find FindBugs home directory. There may be a problem echo with the FindBugs installation. Try setting FINDBUGS_HOME, or echo re-installing. goto end :end --- NEW FILE: filterBugs --- #! /bin/sh # General purpose utility for filtering/transforming # bug collection and/or historical bug collections program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.Filter fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: addMessages --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.AddMessages fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs --- NEW FILE: convertXmlToText --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.PrintingBugReporter fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs --- NEW FILE: printAppVersion --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.PrintAppVersion fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: findbugs --- #! /bin/sh # Launch FindBugs from the command line. escape_arg() { echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g" } program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi maxheap=768 ShowHelpAndExit() { fb_appjar="$findbugs_home/lib/findbugsGUI.jar" fb_mainclass="edu.umd.cs.findbugs.ShowHelp" fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs exit 0 } # Set defaults fb_appjar="$findbugs_home/lib/findbugsGUI.jar" fb_mainclass="edu.umd.cs.findbugs.gui.FindBugsFrame" user_jvmargs='' debug_arg='' conservespace_arg='' workhard_arg='' user_props='' # Handle command line arguments. while [ $# -gt 0 ]; do case $1 in -gui) fb_appjar="$findbugs_home/lib/findbugsGUI.jar" fb_mainclass="edu.umd.cs.findbugs.gui.FindBugsFrame" ;; -textui) fb_appjar="$findbugs_home/lib/findbugs.jar" fb_mainclass="edu.umd.cs.findbugs.FindBugs" ;; -jvmArgs) shift user_jvmargs="$1" ;; -maxHeap) shift maxheap="$1" ;; -javahome) shift fb_javacmd="$1/bin/java" ;; -debug) debug_arg="-Dfindbugs.debug=true" ;; -conserveSpace) conservespace_arg="-Dfindbugs.conserveSpace=true" ;; -property) shift user_props="-D$1 $user_props" ;; -D*=*) user_props="$1 $user_props" ;; -version) fb_mainclass=edu.umd.cs.findbugs.Version fb_appargs="-release" while [ $# -gt 0 ]; do shift done fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs exit 0 ;; -help) ShowHelpAndExit ;; # All unrecognized arguments will be accumulated and # passed to the application. *) fb_appargs="$fb_appargs `escape_arg "$1"`" ;; esac shift done fb_jvmargs="$user_jvmargs $debug_arg $conservespace_arg $workhard_arg $user_props" fb_maxheap="-Xmx${maxheap}m" # Extra JVM args for MacOSX. if [ $fb_osname = "Darwin" ]; then fb_jvmargs="$fb_jvmargs \ -Xdock:name=FindBugs -Xdock:icon=${findbugs_home}/lib/buggy.icns \ -Dapple.laf.useScreenMenuBar=true" fi fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: fbwrap --- #! /bin/sh # A convenient way to call the main() method of a class # in findbugs.jar. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi if [ $# -eq 0 ]; then echo "Usage: fbwrap <main class name> <args...>" exit 1 fi fb_mainclass="$1" shift fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 |
From: Nobody <fas...@us...> - 2006-02-21 10:48:07
|
Update of /cvsroot/mocklib/osgimgr/input/libinclude In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/input/libinclude Added Files: mx4j-tools.jar platform-api.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: mx4j-tools.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: platform-api.jar --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/mocklib/osgimgr/tools/ant/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/ant/lib Added Files: ant-antlr.jar ant-apache-bcel.jar ant-apache-bsf.jar ant-apache-log4j.jar ant-apache-oro.jar ant-apache-regexp.jar ant-apache-resolver.jar ant-commons-logging.jar ant-commons-net.jar ant-icontract.jar ant-jai.jar ant-jakarta-bcel.jar ant-jakarta-log4j.jar ant-jakarta-oro.jar ant-jakarta-regexp.jar ant-javamail.jar ant-jdepend.jar ant-jmf.jar ant-jsch.jar ant-launcher.jar ant-netrexx.jar ant-nodeps.jar ant-starteam.jar ant-stylebook.jar ant-swing.jar ant-testutil.jar ant-trax.jar ant-vaj.jar ant-weblogic.jar ant-xalan1.jar ant-xalan2.jar ant-xslp.jar ant.jar commons-net-1.2.2.jar crimson.jar example.jar gnu-regexp-110.jar jaxp.jar jdom-1.0b8.jar jsch-0.1.17.jar README xerces-130.jar xercesImpl.jar xml-apis.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: ant-nodeps.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-netrexx.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: commons-net-1.2.2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-stylebook.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-weblogic.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-apache-resolver.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-xalan1.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jaxp.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jsch-0.1.17.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jakarta-regexp.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-swing.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-apache-regexp.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xercesImpl.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xml-apis.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: crimson.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xerces-130.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-commons-net.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-testutil.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: README --- Please refer to the Ant manual under Installing Ant / Library Dependencies for a list of the jar requirements for various optional tasks and features. This directory contains xercesImpl.jar from the 2.5.0 release of Apache Xerces. For more information or newer releases see <http://xml.apache.org/xerces2-j/>. See the file LICENSE.xerces for the terms of distribution. It also contains xml-apis.jar, an Apache-controlled collection of standard classes from the 1.0b2 release of the Apache XML-Commons release. For more information or newer releases see <http://xml.apache.org/commons/>. See the files LICENSE.dom and LICENSE.sax for the terms of distribution. --- NEW FILE: ant-jakarta-bcel.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-apache-log4j.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gnu-regexp-110.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jmf.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-xalan2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-xslp.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-commons-logging.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jdepend.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-apache-bsf.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-apache-oro.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-vaj.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jai.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jakarta-log4j.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-starteam.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: example.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jsch.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jdom-1.0b8.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-icontract.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-antlr.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-apache-bcel.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-trax.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-javamail.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-jakarta-oro.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ant-launcher.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:07
|
Update of /cvsroot/mocklib/osgimgr/tools/findbugs/bin/deprecated In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/findbugs/bin/deprecated Added Files: bugHistory unionBugs unionResults updateBugs Log Message: add osgimgr to mocklib project for now. --- NEW FILE: updateBugs --- #! /bin/sh # Merge a historical bug collection and a bug collection, producing an updated # historical bug collection program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.Update fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: unionResults --- #! /bin/sh # Deprecated # Create the union of two results files, preserving # annotations in both files in the result. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: bugHistory --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.BugHistory fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: unionBugs --- #! /bin/sh # Create the union of two results files, preserving # annotations in both files in the result. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.UnionResults fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 |
From: Nobody <fas...@us...> - 2006-02-21 10:48:06
|
Update of /cvsroot/mocklib/osgimgr/tools/findbugs/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/findbugs/plugin Added Files: coreplugin.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: coreplugin.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:05
|
Update of /cvsroot/mocklib/osgimgr/tools/checkstyle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/checkstyle Added Files: checkstyle-all-4.1.jar config.xml Log Message: add osgimgr to mocklib project for now. --- NEW FILE: config.xml --- <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> <!-- Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices Checkstyle is very configurable. Be sure to read the documentation at http://checkstyle.sf.net (or in your downloaded distribution). Most Checks are configurable, be sure to consult the documentation. To completely disable a check, just comment it out or delete it from the file. Finally, it is worth reading the documentation. --> <module name="Checker"> <!-- Checks that a package.html file exists for each package. --> <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> <!--module name="PackageHtml"/--> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> <!--module name="NewlineAtEndOfFile"/--> <!-- Checks that property files contain the same keys. --> <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> <module name="Translation"/> <module name="TreeWalker"> <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> <!--module name="JavadocMethod"/> <module name="JavadocType"/> <module name="JavadocVariable"/> <module name="JavadocStyle"/--> <!-- Checks for Naming Conventions. --> <!-- See http://checkstyle.sf.net/config_naming.html --> <module name="ConstantName"> <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$|^log$|^apiLog$"/> </module> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="MemberName"/> <module name="MethodName"/> <module name="PackageName"/> <module name="ParameterName"/> <module name="StaticVariableName"/> <module name="TypeName"/> <!-- Checks for Headers --> <!-- See http://checkstyle.sf.net/config_header.html --> <!-- <module name="Header"> --> <!-- The follow property value demonstrates the ability --> <!-- to have access to ANT properties. In this case it uses --> <!-- the ${basedir} property to allow Checkstyle to be run --> <!-- from any directory within a project. See property --> <!-- expansion, --> <!-- http://checkstyle.sf.net/config.html#properties --> <!-- <property --> <!-- name="headerFile" --> <!-- value="${basedir}/java.header"/> --> <!-- </module> --> <!-- Following interprets the header file as regular expressions. --> <!-- <module name="RegexpHeader"/> --> <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"/> <module name="IllegalImport"/> <!-- defaults to sun.* packages --> <module name="RedundantImport"/> <module name="UnusedImports"/> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"> <property name="max" value="700"/> </module> <!--module name="LineLength"> <property name="max" value="120"/> </module--> <module name="MethodLength"> <property name="max" value="75"/> </module> <module name="ParameterNumber"/> <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <!--module name="EmptyForIteratorPad"/> <module name="MethodParamPad"/> <module name="NoWhitespaceAfter"/> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="ParenPad"/> <module name="TypecastParenPad"/> <module name="TabCharacter"/> <module name="WhitespaceAfter"/> <module name="WhitespaceAround"/--> <!-- Modifier Checks --> <!-- See http://checkstyle.sf.net/config_modifiers.html --> <module name="ModifierOrder"/> <!--module name="RedundantModifier"/--> <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <!--module name="AvoidNestedBlocks"/> <module name="EmptyBlock"/> <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"/--> <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="AvoidInlineConditionals"/> <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <!--module name="HiddenField"/--> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> <!--module name="MagicNumber"/--> <module name="MissingSwitchDefault"/> <module name="RedundantThrows"/> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <!-- Checks for class design --> <!-- See http://checkstyle.sf.net/config_design.html --> <!--module name="DesignForExtension"/--> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> <module name="VisibilityModifier"/> <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> <module name="ArrayTypeStyle"/> <!--module name="FinalParameters"/--> <!--module name="GenericIllegalRegexp"> <property name="format" value="System\.out\.println"/> <property name="message" value="User Logger class instead."/> </module--> <!--module name="GenericIllegalRegexp"> <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module--> <!--module name="TodoComment"/--> <module name="UpperEll"/> </module> </module> --- NEW FILE: checkstyle-all-4.1.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:01
|
Update of /cvsroot/mocklib/osgimgr/tools/ant/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/ant/bin Added Files: ant ant.bat ant.cmd antenv.cmd antRun antRun.bat antRun.pl complete-ant-cmd.pl envset.cmd lcp.bat runant.pl runant.py runrc.cmd Log Message: add osgimgr to mocklib project for now. --- NEW FILE: antRun.bat --- @echo off REM REM Copyright 2001-2002,2004 The Apache Software Foundation REM REM Licensed under the Apache License, Version 2.0 (the "License"); REM you may not use this file except in compliance with the License. REM You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an "AS IS" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. REM REM if "%OS%"=="Windows_NT" @setlocal if ""%1""=="""" goto runCommand rem Change drive and directory to %1 if "%OS%"=="Windows_NT" cd /d ""%1"" if not "%OS%"=="Windows_NT" cd ""%1"" shift rem Slurp the command line arguments. This loop allows for an unlimited number rem of agruments (up to the command line limit, anyway). set ANT_RUN_CMD=%1 if ""%1""=="""" goto runCommand shift :loop if ""%1""=="""" goto runCommand set ANT_RUN_CMD=%ANT_RUN_CMD% %1 shift goto loop :runCommand rem echo %ANT_RUN_CMD% %ANT_RUN_CMD% if "%OS%"=="Windows_NT" @endlocal --- NEW FILE: runrc.cmd --- /* Copyright 2003-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Run RC file, name is in the first arg, second arg is either PATH ENV or -r or nothing */ parse arg name path rest if name = '' then do say 'RC file name is missing' exit 1 end if rest \= '' then do say 'Too many parameters' exit 1 end call runit name path exit 0 runit: procedure parse arg name path dir if path \= '' & path \= '-r' then do dir = value(translate(path),,'OS2ENVIRONMENT') if dir = '' then return dir = translate(dir, '\', '/') /* change UNIX-like path to OS/2 */ end if dir = '' then dir = directory() if path = '-r' then do /* recursive call */ subdir = filespec('path', dir) if subdir \= '\' then do subdir = left(subdir, length(subdir)-1) call runit name path filespec('drive', dir) || subdir end end /* Look for the file and run it */ if right(dir, 1) \= '\' then dir = dir || '\' rcfile = stream(dir || name, 'c', 'query exists') if rcfile \= '' then interpret 'call "' || rcfile || '"' return --- NEW FILE: runant.py --- #!/usr/bin/python # Copyright 2001,2003-2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ runant.py This script is a translation of the runant.pl written by Steve Loughran. It runs ant with/out arguments, it should be quite portable (thanks to the python os library) This script has been tested with Python2.0/Win2K created: 2001-04-11 author: Pierre Dittgen pie...@cr... Assumptions: - the "java" executable/script is on the command path """ import os, os.path, string, sys # Change it to 1 to get extra debug information debug = 0 ####################################################################### # If ANT_HOME is not set default to script's parent directory if os.environ.has_key('ANT_HOME'): ANT_HOME = os.environ['ANT_HOME'] else: ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) # set ANT_LIB location ANT_LIB = os.path.join(ANT_HOME, 'lib') # set JAVACMD (check variables JAVACMD and JAVA_HOME) JAVACMD = None if not os.environ.has_key('JAVACMD'): if os.environ.has_key('JAVA_HOME'): if not os.path.exists(os.environ['JAVA_HOME']): print "Warning: JAVA_HOME is not defined correctly." else: JAVACMD = os.path.join(os.environ['JAVA_HOME'], 'bin', 'java') else: print "Warning: JAVA_HOME not set." else: JAVACMD = os.environ['JAVACMD'] if not JAVACMD: JAVACMD = 'java' launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar') if not os.path.exists(launcher_jar): print 'Unable to locate ant-launcher.jar. Expected to find it in %s' % \ ANT_LIB # Build up standard classpath (LOCALCLASSPATH) LOCALCLASSPATH = launcher_jar if os.environ.has_key('LOCALCLASSPATH'): LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH'] ANT_OPTS = "" if os.environ.has_key('ANT_OPTS'): ANT_OPTS = os.environ['ANT_OPTS'] OPTS = "" if os.environ.has_key('JIKESPATH'): OPTS = '-Djikes.class.path=\"%s\"' % os.environ['JIKESPATH'] ANT_ARGS = "" if os.environ.has_key('ANT_ARGS'): ANT_ARGS = os.environ['ANT_ARGS'] CLASSPATH = "" if os.environ.has_key('CLASSPATH'): CLASSPATH = os.environ['CLASSPATH'] # Builds the commandline cmdline = ('%s %s -classpath %s -Dant.home=%s %s ' + \ 'org.apache.tools.ant.launch.Launcher %s -lib %s %s') \ % (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \ CLASSPATH, string.join(sys.argv[1:], ' ')) if debug: print '\n%s\n\n' % (cmdline) # Run the biniou! os.system(cmdline) --- NEW FILE: antRun.pl --- #!/usr/bin/perl # # Copyright 2001,2003-2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ####################################################################### # # antRun.pl # # wrapper script for invoking commands on a platform with Perl installed # this is akin to antRun.bat, and antRun the SH script # # created: 2001-10-18 # author: Jeff Tulley jt...@no... ####################################################################### #be fussy about variables use strict; #turn warnings on during dev; generates a few spurious uninitialised var access warnings #use warnings; #and set $debug to 1 to turn on trace info (currently unused) my $debug=1; ####################################################################### # change drive and directory to "%1" my $ANT_RUN_CMD = @ARGV[0]; # assign current run command to "%2" chdir (@ARGV[0]) || die "Can't cd to $ARGV[0]: $!\n"; if ($^O eq "NetWare") { # There is a bug in Perl 5 on NetWare, where chdir does not # do anything. On NetWare, the following path-prefixed form should # always work. (afaict) $ANT_RUN_CMD .= "/".@ARGV[1]; } else { $ANT_RUN_CMD = @ARGV[1]; } # dispose of the first two arguments, leaving only the command's args. shift; shift; # run the command my $returnValue = system $ANT_RUN_CMD, @ARGV; if ($returnValue eq 0) { exit 0; } else { # only 0 and 1 are widely recognized as exit values # so change the exit value to 1 exit 1; } --- NEW FILE: envset.cmd --- /* Copyright 2003-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SET environment variables First optional parameter: ; parameters are considered parts of a path variable, semicolons are appended to each element if not already present -D parameters are properties for Java or Makefile etc., -D will be prepended and the parameters will be separated by a space =D the same as above but equal sign is not required , parameters should be comma separated in the environment variable - parameters should be separated by the next parameter Other values mean that the first parameter is missing and the environment variable will be set to the space separated parameters Second parameter: name of the environment variable Next parameters: values ; implies that the equal sign is considered a part of the parameter and is not interpreted -D requires parameters in the form name=value. If the equal sign is not found, the parameters are changed to name=expanded_name Other options have optional equal sign. If it is found, only the part after the equal sign will be oprionally expanded. If the parameter is the minus sign, the next parameter will not be expanded. If the parameter is a single dot, it will be replaced with the value of the environment variable as it existed before envset was invoked. For other parameters the batch looks for the environment variable with the same name (in uppercase). If it is found, it forms the expanded_name. If the environment variable with such a name does not exist, the expanded_name will hold the parameter name without case conversion. */ parse arg mode envar args equal = 0 sep = ' ' /* Parse command line parameters */ select when mode='-' then do sep = envar parse var args envar args end when mode=';' then do sep = '' equal = -1 end when mode='-D' then equal = 1 when mode='=D' then mode = '-D' when mode=',' then sep = ',' otherwise args = envar args envar = mode mode = '' end env = 'OS2ENVIRONMENT' envar = translate(envar) orig = value(envar,,env) newval = '' expand = 1 /* for each parameter... */ do i = 1 to words(args) if expand > 0 & word(args, i) = '-' then expand = 0 else call addval word(args, i) end /* Optionally enclose path variable by quotes */ if mode = ';' & pos(' ', newval) > 0 then newval = '"' || newval || '"' /* Set the new value, 'SET' cannot be used since it does not allow '=' */ x = value(envar, newval, env) exit 0 addval: procedure expose sep equal orig expand newval mode env parse arg var if var = '.' then expvar = orig else do if equal >= 0 then do parse var var name '=' val if val = '' then var = name else var = val end if expand = 0 then expvar = var else expvar = value(translate(var),,env) if expvar = '' then expvar = var if equal >= 0 then do if val = '' then do parse var expvar key '=' val if val <> '' then name = key else do if equal > 0 then val = key else name = key end end else val = expvar if pos(' ', val) > 0 | pos('=', val) > 0 then val = '"' || val || '"' if val = '' then expvar = name else expvar = name || '=' || val end if mode = '-D' then expvar = '-D' || expvar if mode = ';' then do if right(expvar, 1) <> ';' then expvar = expvar || ';' end end if newval = '' then newval = expvar else newval = newval || sep || expvar expand = 1 return --- NEW FILE: ant --- #! /bin/sh # Copyright 2001-2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Extract launch and ant arguments, (see details below). ant_exec_args= no_config=false use_jikes_default=false ant_exec_debug=false show_help=false for arg in "$@" ; do if [ "$arg" = "--noconfig" ] ; then no_config=true elif [ "$arg" = "--usejikes" ] ; then use_jikes_default=true elif [ "$arg" = "--execdebug" ] ; then ant_exec_debug=true elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then show_help=true ant_exec_args="$ant_exec_args -h" else if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then show_help=true fi ant_exec_args="$ant_exec_args \"$arg\"" fi done # Source/default ant configuration if $no_config ; then rpm_mode=false usejikes=$use_jikes_default else # load system-wide ant configuration if [ -f "/etc/ant.conf" ] ; then . /etc/ant.conf fi # load user ant configuration if [ -f "$HOME/.ant/ant.conf" ] ; then . $HOME/.ant/ant.conf fi if [ -f "$HOME/.antrc" ] ; then . "$HOME/.antrc" fi # provide default configuration values if [ -z "$rpm_mode" ] ; then rpm_mode=false fi if [ -z "$usejikes" ] ; then usejikes=$use_jikes_default fi fi # Setup Java environment in rpm mode if $rpm_mode ; then if [ -f /usr/share/java-utils/java-functions ] ; then . /usr/share/java-utils/java-functions set_jvm set_javacmd fi fi # OS specific support. $var _must_ be set to either true or false. cygwin=false; darwin=false; case "`uname`" in CYGWIN*) cygwin=true ;; Darwin*) darwin=true if [ -z "$JAVA_HOME" ] ; then JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home fi ;; esac if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then # try to find ANT if [ -d /opt/ant ] ; then ANT_HOME=/opt/ant fi if [ -d "${HOME}/opt/ant" ] ; then ANT_HOME="${HOME}/opt/ant" fi ## resolve links - $0 may be a link to ant's home PRG="$0" progname=`basename "$0"` # need this for relative symlinks while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done ANT_HOME=`dirname "$PRG"`/.. # make it fully qualified ANT_HOME=`cd "$ANT_HOME" && pwd` fi # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then [ -n "$ANT_HOME" ] && ANT_HOME=`cygpath --unix "$ANT_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` fi # set ANT_LIB location ANT_LIB="${ANT_HOME}/lib" if [ -z "$JAVACMD" ] ; then if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi else JAVACMD=`which java 2> /dev/null ` if [ -z "$JAVACMD" ] ; then JAVACMD=java fi fi fi if [ ! -x "$JAVACMD" ] ; then echo "Error: JAVA_HOME is not defined correctly." echo " We cannot execute $JAVACMD" exit 1 fi # Build local classpath using just the launcher in non-rpm mode or # use the Jpackage helper in rpm mode with basic and default jars # specified in the ant.conf configuration. Because the launcher is # used, libraries linked in ANT_HOME will also be include, but this # is discouraged as it is not java-version safe. A user should # request optional jars and their dependencies via the OPT_JAR_LIST # variable if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)" # If the user requested to try to add some other jars to the classpath if [ -n "$OPT_JAR_LIST" ] ; then _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)" if [ -n "$_OPTCLASSPATH" ] ; then LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH" fi fi # Explicitly add javac path to classpath, assume JAVA_HOME set # properly in rpm mode if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar" fi if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip" fi # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be # user CLASSPATH first and ant-found jars after. # In that case, the user CLASSPATH will override ant-found jars # # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour # with ant-found jars first and user CLASSPATH after if [ -n "$CLASSPATH" ] ; then # merge local and specified classpath if [ -z "$LOCALCLASSPATH" ] ; then LOCALCLASSPATH="$CLASSPATH" elif [ -n "$CLASSPATH_OVERRIDE" ] ; then LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH" else LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH" fi # remove class path from launcher -lib option CLASSPATH="" fi else # not using rpm_mode; use launcher to determine classpaths if [ -z "$LOCALCLASSPATH" ] ; then LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar else LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH fi fi if [ -n "$JAVA_HOME" ] ; then # OSX hack to make Ant work with jikes if $darwin ; then OSXHACK="${JAVA_HOME}/../Classes" if [ -d "${OSXHACK}" ] ; then for i in "${OSXHACK}"/*.jar do JIKESPATH="$JIKESPATH:$i" done fi fi fi # Allow Jikes support (off by default) if $usejikes; then ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" fi # For Cygwin, switch paths to appropriate format before running java if $cygwin; then if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then format=mixed else format=windows fi ANT_HOME=`cygpath --$format "$ANT_HOME"` ANT_LIB=`cygpath --$format "$ANT_LIB"` JAVA_HOME=`cygpath --$format "$JAVA_HOME"` LOCALCLASSPATH=`cygpath --path --$format "$LOCALCLASSPATH"` if [ -n "$CLASSPATH" ] ; then CLASSPATH=`cygpath --path --$format "$CLASSPATH"` fi CYGHOME=`cygpath --$format "$HOME"` fi # Show script help if requested if $show_help ; then echo $0 '[script options] [options] [target [target2 [target3] ..]]' echo 'Script Options:' echo ' --help, --h print this message and ant help' echo ' --noconfig suppress sourcing of /etc/ant.conf,' echo ' $HOME/.ant/ant.conf, and $HOME/.antrc' echo ' configuration files' echo ' --usejikes enable use of jikes by default, unless' echo ' set explicitly in configuration files' echo ' --execdebug print ant exec line generated by this' echo ' launch script' echo ' ' fi # add a second backslash to variables terminated by a backslash under cygwin if $cygwin; then case "$ANT_HOME" in *\\ ) ANT_HOME="$ANT_HOME\\" ;; esac case "$CYGHOME" in *\\ ) CYGHOME="$CYGHOME\\" ;; esac case "$JIKESPATH" in *\\ ) JIKESPATH="$JIKESPATH\\" ;; esac case "$LOCALCLASSPATH" in *\\ ) LOCALCLASSPATH="$LOCALCLASSPATH\\" ;; esac case "$CLASSPATH" in *\\ ) CLASSPATH="$CLASSPATH\\" ;; esac fi # Execute ant using eval/exec to preserve spaces in paths, # java options, and ant args ant_sys_opts= if [ -n "$CYGHOME" ]; then if [ -n "$JIKESPATH" ]; then ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\"" else ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\"" fi else if [ -n "$JIKESPATH" ]; then ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\"" fi fi ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -lib \"$CLASSPATH\" $ant_exec_args" if $ant_exec_debug ; then echo $ant_exec_command fi eval $ant_exec_command --- NEW FILE: antRun --- #!/bin/sh # # Copyright 2001-2002,2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # # Args: DIR command cd "$1" CMD="$2" shift shift exec "$CMD" "$@" --- NEW FILE: lcp.bat --- REM REM Copyright 2001-2004 The Apache Software Foundation REM REM Licensed under the Apache License, Version 2.0 (the "License"); REM you may not use this file except in compliance with the License. REM You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an "AS IS" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. REM REM set _CLASSPATHCOMPONENT=%1 if ""%1""=="""" goto gotAllArgs shift :argCheck if ""%1""=="""" goto gotAllArgs set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1 shift goto argCheck :gotAllArgs set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH% --- NEW FILE: antenv.cmd --- /* Copyright 2003-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Ant environment */ '@echo off' call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" call SysLoadFuncs /* Prepare the parameters for later use */ parse arg argv mode = '' args = '' opts = '' cp = '' lcp = '' do i = 1 to words(argv) param = word(argv, i) select when param='-lcp' then mode = 'l' when param='-cp' | param='-classpath' then mode = 'c' when abbrev('-opts', param, 4) then mode = 'o' when abbrev('-args', param, 4) then mode = 'a' otherwise select when mode = 'a' then args = space(args param, 1) when mode = 'c' then cp = space(cp param, 1) when mode = 'l' then lcp = space(lcp param, 1) when mode = 'o' then opts = space(opts param, 1) otherwise say 'Option' param 'ignored' end end end env="OS2ENVIRONMENT" antconf = _getenv_('antconf' 'antconf.cmd') runrc = _getenv_('runrc') interpret 'call "' || runrc || '"' '"' || antconf || '"' 'ETC' ANT_HOME = value('ANT_HOME',,env) JAVA_HOME = value('JAVA_HOME',,env) classpath = value('CLASSPATH',,env) classes = stream(JAVA_HOME || "\lib\classes.zip", "C", "QUERY EXISTS") if classes \= '' then classpath = prepend(classpath classes) classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS") if classes \= '' then classpath = prepend(classpath classes) classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar') 'SET CLASSPATH=' || classpath /* Setting classpathes, options and arguments */ envset = _getenv_('envset') if cp\='' then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"' if lcp\='' then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"' if opts\='' then interpret 'call "' || envset || '"' '"-D ANT_OPTS"' '"' || opts || '"' if args\='' then interpret 'call "' || envset || '"' '"ANT_ARGS"' '"' || args || '"' exit 0 addpath: procedure parse arg path elem if elem = '' then do if path\='' & right(path, 1)\=';' then path = path || ';' return path end if substr(path, length(path)) = ';' then glue = '' else glue = ';' if pos(translate(elem), translate(path)) = 0 then path = path || glue || elem || ';' return path prepend: procedure parse arg path elem if elem = '' then do if path\='' & right(path, 1)\=';' then path = path || ';' return path end if pos(translate(elem), translate(path)) = 0 then path = elem || ';' || path return path _getenv_: procedure expose env parse arg envar default if default = '' then default = envar var = value(translate(envar),,env) if var = '' then var = default return var --- NEW FILE: ant.bat --- @echo off REM Copyright 2001,2004 The Apache Software Foundation REM REM Licensed under the Apache License, Version 2.0 (the "License"); REM you may not use this file except in compliance with the License. REM You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an "AS IS" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat" if "%OS%"=="Windows_NT" @setlocal rem %~dp0 is expanded pathname of the current script under NT set DEFAULT_ANT_HOME=%~dp0.. if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME% set DEFAULT_ANT_HOME= rem Slurp the command line arguments. This loop allows for an unlimited number rem of arguments (up to the command line limit, anyway). set ANT_CMD_LINE_ARGS=%1 if ""%1""=="""" goto doneStart shift :setupArgs if ""%1""=="""" goto doneStart set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1 shift goto setupArgs rem This label provides a place for the argument list loop to break out rem and for NT handling to skip to. :doneStart rem find ANT_HOME if it does not exist due to either an invalid value passed rem by the user or the %0 problem on Windows 9x if exist "%ANT_HOME%\lib\ant.jar" goto checkJava rem check for ant in Program Files if not exist "%ProgramFiles%\ant" goto checkSystemDrive set ANT_HOME=%ProgramFiles%\ant goto checkJava :checkSystemDrive rem check for ant in root directory of system drive if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive set ANT_HOME=%SystemDrive%\ant goto checkJava :checkCDrive rem check for ant in C:\ant for Win9X users if not exist C:\ant\lib\ant.jar goto noAntHome set ANT_HOME=C:\ant goto checkJava :noAntHome echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME. goto end :checkJava set _JAVACMD=%JAVACMD% if "%JAVA_HOME%" == "" goto noJavaHome if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe goto checkJikes :noJavaHome if "%_JAVACMD%" == "" set _JAVACMD=java.exe :checkJikes if not "%JIKESPATH%"=="" goto runAntWithJikes :runAnt if not "%CLASSPATH%"=="" goto runAntWithClasspath "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS% goto end :runAntWithClasspath "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS% goto end :runAntWithJikes if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS% goto end :runAntWithJikesAndClasspath "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS% goto end :end set _JAVACMD= set ANT_CMD_LINE_ARGS= if "%OS%"=="Windows_NT" @endlocal :mainEnd if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat" --- NEW FILE: runant.pl --- #!/usr/bin/perl # # Copyright 2000-2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ####################################################################### # # runant.pl # # wrapper script for invoking ant in a platform with Perl installed # this may include cgi-bin invocation, which is considered somewhat daft. # (slo: that should be a separate file which can be derived from this # and returns the XML formatted output) # # the code is not totally portable due to classpath and directory splitting # issues. oops. (NB, use File::Spec::Functions will help and the code is # structured for the catfile() call, but because of perl version funnies # the code is not included. # # created: 2000-8-24 # author: Steve Loughran st...@so... ####################################################################### # # Assumptions: # # - the "java" executable/script is on the command path # - ANT_HOME has been set # - target platform uses ":" as classpath separator or perl indicates it is dos/win32 # - target platform uses "/" as directory separator. #be fussy about variables use strict; #platform specifics (disabled) #use File::Spec::Functions; #turn warnings on during dev; generates a few spurious uninitialised var access warnings #use warnings; #and set $debug to 1 to turn on trace info my $debug=1; ####################################################################### # # check to make sure environment is setup # my $HOME = $ENV{ANT_HOME}; if ($HOME eq "") { die "\n\nANT_HOME *MUST* be set!\n\n"; } my $JAVACMD = $ENV{JAVACMD}; $JAVACMD = "java" if $JAVACMD eq ""; my $onnetware = 0; if ($^O eq "NetWare") { $onnetware = 1; } my $oncygwin = ($^O eq "cygwin"); #ISSUE: what java wants to split up classpath varies from platform to platform #and perl is not too hot at hinting which box it is on. #here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed. my $s=":"; if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") || ($onnetware == 1)) { $s=";"; } #build up standard classpath my $localpath = "$HOME/lib/ant-launcher.jar"; #set JVM options and Ant arguments, if any my @ANT_OPTS=split(" ", $ENV{ANT_OPTS}); my @ANT_ARGS=split(" ", $ENV{ANT_ARGS}); #jikes if($ENV{JIKESPATH} ne "") { push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}"; } #construct arguments to java my @ARGS; push @ARGS, @ANT_OPTS; my $CYGHOME = ""; my $classpath=$ENV{CLASSPATH}; if ($oncygwin == 1) { $localpath = `cygpath --path --windows $localpath`; chomp ($localpath); if (! $classpath eq "") { $classpath = `cygpath --path --windows "$classpath"`; chomp ($classpath); } $HOME = `cygpath --path --windows $HOME`; chomp ($HOME); $CYGHOME = `cygpath --path --windows $ENV{HOME}`; chomp ($CYGHOME); } push @ARGS, "-classpath", "$localpath"; push @ARGS, "-Dant.home=$HOME"; if ( ! $CYGHOME eq "" ) { push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\"" } push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS; push @ARGS, @ARGV; if (! $classpath eq "") { if ($onnetware == 1) { # make classpath literally $CLASSPATH # this is to avoid pushing us over the 512 character limit # even skip the ; - that is already in $localpath push @ARGS, "-lib", "\$CLASSPATH"; } else { push @ARGS, "-lib", "$classpath"; } } print "\n $JAVACMD @ARGS\n\n" if ($debug); my $returnValue = system $JAVACMD, @ARGS; if ($returnValue eq 0) { exit 0; } else { # only 0 and 1 are widely recognized as exit values # so change the exit value to 1 exit 1; } --- NEW FILE: ant.cmd --- /* Copyright 2003-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Run ant */ '@echo off' parse arg mode envarg '::' antarg if mode\='.' & mode\='..' & mode\='/' then do envarg = mode envarg mode = '' end if antarg = '' then do antarg = envarg envarg = '' end x = setlocal() env="OS2ENVIRONMENT" antenv = _getenv_('antenv') if _testenv_() = 0 then interpret 'call "' || antenv || '"' '"' || envarg || '"' if mode = '' then mode = _getenv_('ANT_MODE' '..') if mode \= '/' then do runrc = _getenv_('runrc') antrc = _getenv_('antrc' 'antrc.cmd') if mode = '..' then mode = '-r' else mode = '' interpret 'call "' || runrc || '"' antrc '"' || mode || '"' end if _testenv_() = 0 then do say 'Ant environment is not set properly' x = endlocal() exit 16 end settings = '-Dant.home=' || ANT_HOME '-Djava.home=' || JAVA_HOME java = _getenv_('javacmd' 'java') opts = value('ANT_OPTS',,env) args = value('ANT_ARGS',,env) lcp = value('LOCALCLASSPATH',,env) cp = value('CLASSPATH',,env) if value('ANT_USE_CP',,env) \= '' then do if lcp \= '' & right(lcp, 1) \= ';' then lcp = lcp || ';' lcp = lcp || cp 'SET CLASSPATH=' end if lcp\='' then lcp = '-classpath' lcp cmd = java opts lcp '-jar' ANT_HOME ||'\lib\ant-launcher.jar' settings args antarg launcher = stream(ANT_HOME ||'\lib\ant-launcher.jar', 'C', 'query exists') if launcher = '' then entry = 'org.apache.tools.ant.Main' else entry = 'org.apache.tools.ant.launch.Launcher' java opts lcp entry settings args antarg x = endlocal() return rc _testenv_: procedure expose env ANT_HOME JAVA_HOME ANT_HOME = value('ANT_HOME',,env) if ANT_HOME = '' then return 0 JAVA_HOME = value('JAVA_HOME',,env) if JAVA_HOME = '' then return 0 cp = translate(value('CLASSPATH',,env)) if pos(translate(ANT_HOME), cp) = 0 then return 0 if pos(translate(JAVA_HOME), cp) = 0 then return 0 return 1 _getenv_: procedure expose env parse arg envar default if default = '' then default = envar var = value(translate(envar),,env) if var = '' then var = default return var --- NEW FILE: complete-ant-cmd.pl --- #!/usr/bin/perl # # Copyright 2001,2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # A script to allow Bash or Z-Shell to complete an Ant command-line. # # To install for Bash 2.0 or better, add the following to ~/.bashrc: # # $ complete -C complete-ant-cmd ant build.sh # # To install for Z-Shell 2.5 or better, add the following to ~/.zshrc: # # function ant_complete () { # local args_line args # read -l args_line # set -A args $args_line # set -A reply $(COMP_LINE=$args_line complete-ant-cmd ${args[1]} $1) # } # compctl -K ant_complete ant build.sh # # @author Mike Williams <mi...@co...> my $cmdLine = $ENV{'COMP_LINE'}; my $antCmd = $ARGV[0]; my $word = $ARGV[1]; my @completions; if ($word =~ /^-/) { list( restrict( $word, getArguments() )); } elsif ($cmdLine =~ /-(f|buildfile)\s+\S*$/) { list( getBuildFiles($word) ); } else { list( restrict( $word, getTargets() )); } exit(0); sub list { for (@_) { print "$_\n"; } } sub restrict { my ($word, @completions) = @_; grep( /^\Q$word\E/, @completions ); } sub getArguments { qw(-buildfile -debug -emacs -f -find -help -listener -logfile -logger -projecthelp -quiet -verbose -version); } sub getBuildFiles { my ($word) = @_; grep( /\.xml$/, glob( "$word*" )); } sub getTargets { # Look for build-file my $buildFile = 'build.xml'; if ($cmdLine =~ /-(f|buildfile)\s+(\S+)/) { $buildFile = $2; } return () unless (-f $buildFile); # Run "ant -projecthelp" to list targets. Keep a cache of results in a # cache-file. my $cacheFile = $buildFile; $cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|; if ((!-e $cacheFile) || (-M $buildFile) < (-M $cacheFile)) { open( CACHE, '>'.$cacheFile ) || die "can\'t write $cacheFile: $!\n"; open( HELP, "$antCmd -projecthelp -f '$buildFile'|" ) || return(); my %targets; while( <HELP> ) { if (/^\s+(\S+)/) { $targets{$1}++; } } my @targets = sort keys %targets; for (@targets) { print CACHE "$_\n"; } return @targets; } # Read the target-cache open( CACHE, $cacheFile ) || die "can\'t read $cacheFile: $!\n"; my @targets; while (<CACHE>) { chop; s/\r$//; # for Cygwin push( @targets, $_ ); } close( CACHE ); @targets; } |
From: Nobody <fas...@us...> - 2006-02-21 10:48:01
|
Update of /cvsroot/mocklib/osgimgr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023 Added Files: .classpath .cvsignore .project build build.bat Log Message: add osgimgr to mocklib project for now. --- NEW FILE: .cvsignore --- output --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>osgimgr</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> <linkedResources> </linkedResources> </projectDescription> --- NEW FILE: build --- #************************************ # Generated file. Do not modify # # TODO: check for JAVA_HOME. if not set show error as this is # the one and only thing that has to be set!!!! #************************************ export ANT_HOME=$PWD/tools/ant tools/ant/bin/ant -f bldfiles/build.xml $@ --- NEW FILE: build.bat --- rem ************************************** rem Generated file, do not modify!!!! rem rem rem ************************************** @echo off if "%JAVA_HOME%" == "" goto noJavaHome set ANT_HOME=%CD%\tools\ant tools\ant\bin\ant -f bldfiles\build.xml %1 %2 %3 %4 %5 %6 %7 %8 %9 goto end :noJavaHome if "%_JAVACMD%" == "" set _JAVACMD=java echo. echo Error: JAVA_HOME environment variable is not set. echo It must be set to the jdk1.4 directory echo. :end pause --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="input/javasrc"/> <classpathentry kind="lib" path="input/libexclude/framework.jar"/> <classpathentry kind="lib" path="tools/ant-junit/junit.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="input/libexclude/mocklib.jar"/> <classpathentry kind="lib" path="input/libinclude/mx4j-tools.jar"/> <classpathentry kind="lib" path="input/libexclude/servicebinder.jar"/> <classpathentry kind="lib" path="input/libinclude/platform-api.jar"/> <classpathentry kind="output" path="output/eclipsegen"/> </classpath> |
From: Nobody <fas...@us...> - 2006-02-21 10:48:01
|
Update of /cvsroot/mocklib/osgimgr/tools/ant-optional In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools/ant-optional Added Files: optional.jar README.txt Log Message: add osgimgr to mocklib project for now. --- NEW FILE: optional.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: README.txt --- Why put ant optional tasks here. Well first read the FAQ at ant.apache.org http://ant.apache.org/faq.html#delegating-classloader. I am following option 2. If I don't, I have to put junit.jar in two places tools/ant/lib with the ant-junit task AND input/lib for application developers to use the junit.jar Instead, I separate out the ant-junit.jar and put it in the tools/ant-optional folder. Then I taskdef junit against the ant-junit.jar with junit in it's classpath which I put in input/lib/tools If anyone has a better suggestion, I am all ears as this is not the optimal solution I think. nonetheless, it works for now. thanks, dean |
From: Nobody <fas...@us...> - 2006-02-21 10:48:00
|
Update of /cvsroot/mocklib/osgimgr/input/javasrc/biz/xsoftware/manifest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/input/javasrc/biz/xsoftware/manifest Added Files: ManifestInfo.java ManifestUtilImpl.java TestManifestInfo.java Log Message: add osgimgr to mocklib project for now. --- NEW FILE: ManifestUtilImpl.java --- /* * Created on Sep 19, 2004 * */ package biz.xsoftware.manifest; import java.io.File; import java.net.URL; import java.util.jar.Attributes; import java.util.jar.Manifest; import java.util.logging.Logger; /** * @author Dean Hiller * */ public class ManifestUtilImpl implements ManifestInfo.ManifestUtil { private static final Logger log = Logger.getLogger(ManifestUtilImpl.class.getName()); public File getFile(URL url) { log.finest("url="+url); String filePart = url.getFile(); log.finest("filePart from url="+filePart); String nameWithClass = filePart.substring(5, filePart.length()); log.finest("nameWithClass="+nameWithClass); int index = nameWithClass.indexOf("!"); log.finest("index="+index); String fileName = nameWithClass.substring(0, index); log.finest("fileName of buildtemplate="+fileName); File f = new File(fileName); if(!f.exists()) { log.warning("Bug, Exiting System. Could not find file="+fileName); System.exit(1); } log.finer("returning file="+f.getAbsolutePath()); return f; } /* (non-Javadoc) * @see biz.xsoftware.manifest.ManifestInfo.SystemInterface#exit(int) */ public void exit(int code) { System.exit(code); } public String getMainClass(Manifest manifest) { Attributes attr = manifest.getMainAttributes(); String s = attr.getValue("SubMain-Class"); return s.trim(); } //dummy main for testing purposes!!! public static void main(String[] args) { log.fine("just throwing an exception for testing purposes"); throw new RuntimeException("Just for testing only"); } } --- NEW FILE: TestManifestInfo.java --- /* * Created on Sep 11, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package biz.xsoftware.manifest; import java.io.File; import java.net.URL; import java.util.jar.Manifest; import junit.framework.TestCase; /** * This is purely so emma always always reports code coverage * numbers on everything */ public class TestManifestInfo extends TestCase { private static final String DUMMY = "dummy"; private File jarFile; /** * @param arg0 */ public TestManifestInfo(String arg0) { super(arg0); } public void setUp() { String jarLoc = System.getProperty("jar.name"); if(jarLoc != null) //for tests run from ant jarFile = new File(jarLoc); else //for tests run from eclipse jarFile = new File("output/jardist/projectname.jar"); } public void testManifestInfo() throws Throwable { FakeJarLocator mock = new FakeJarLocator(jarFile, "should.not.matter.class"); ManifestInfo.setJarLocator(mock); ManifestInfo.main(new String[] {"-version"}); ManifestInfo.main(new String[] {"-manifest"}); String version = new ManifestInfo().getVersion(); assertEquals("version from build.xml should equal version in jar", System.getProperty("version"), version); } public void testRunMainClass() throws Throwable { FakeJarLocator mock = new FakeJarLocator(jarFile, TestManifestInfo.class.getName()); ManifestInfo.setJarLocator(mock); ManifestInfo.main(new String[] {DUMMY}); assertTrue("should have one argument", argsLen == 1); assertEquals("variable should have been passed through", DUMMY, dummyArg); } public void testExceptionFromMainClass() throws Throwable { FakeJarLocator mock = new FakeJarLocator(jarFile, ManifestUtilImpl.class.getName()); ManifestInfo.setJarLocator(mock); ManifestInfo.main(new String[0]); } public void testClassNotFound() throws Throwable { FakeJarLocator mock = new FakeJarLocator(jarFile, "this.class.is.not.found"); ManifestInfo.setJarLocator(mock); ManifestInfo.main(new String[0]); } public void testTOOLSJAVAMain() throws Throwable { FakeJarLocator mock = new FakeJarLocator(jarFile, " TOOLS.JAVA.Main "); ManifestInfo.setJarLocator(mock); ManifestInfo.main(new String[0]); } public void testNullClassName() throws Throwable { FakeJarLocator mock = new FakeJarLocator(jarFile, null); ManifestInfo.setJarLocator(mock); ManifestInfo.main(new String[0]); } public void testGetMainClass() { Manifest mf = new Manifest(); mf.getMainAttributes().putValue("SubMain-Class", " xx "); ManifestUtilImpl util = new ManifestUtilImpl(); String s = util.getMainClass(mf); assertEquals("should have trimmed the value", "xx", s); } public void testGetFile() throws Exception { File f = jarFile; assertTrue("file should exist before we test this", f.exists()); URL url = f.toURL(); URL urlToClassFile = new URL("file", null, -1, url+"!/biz/xsoftware/buildtemplate/Util.class"); File tmp = new ManifestUtilImpl().getFile(urlToClassFile); assertNotNull("Should return a real file", tmp); assertTrue("file should still exist", tmp.exists()); } private class FakeJarLocator implements ManifestInfo.ManifestUtil { private File file; private String mainClass; public FakeJarLocator(File f, String mainClass) { this.file = f; this.mainClass = mainClass; } public File getFile(URL url) { return file; } public void exit(int code) { //do nothing!!! } public String getMainClass(Manifest manifest) { return mainClass; } } //dummy main method for testing!!! public static void main(String[] args) { argsLen = args.length; dummyArg = args[0]; } private static int argsLen; private static String dummyArg; } --- NEW FILE: ManifestInfo.java --- /* * Created on Jul 9, 2004 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package biz.xsoftware.manifest; import java.io.File; import java.io.IOException; import java.lang.reflect.Method; import java.net.URL; import java.util.Iterator; import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.logging.Level; import java.util.logging.Logger; /** * Miscellaneous class that just prints the version of the mock object jar * getting it from the manifest file. * * @author Dean Hiller */ public class ManifestInfo { private static final Logger log = Logger.getLogger(ManifestInfo.class.getName()); private static ManifestUtil util = new ManifestUtilImpl(); //private Package thePackage; private Manifest manifest; /** * The main program for Version that prints the version info from * the manifest file. * * java -jar xxx.jar * 1. runs SubMain-Class in manifest file * 2. If SubMain-Class is default value or "", prints usage info * for -manifest and -version * * java -jar xxx.jar -version * 1. prints version info * * java -jar xxx.jar -manifest * 1. prints all manifest contents. * * @param args Ignores all arguments. */ public static void main(String[] args) throws Throwable { try { run(args); } catch(Throwable e) { log.log(Level.WARNING, "Exception occurred", e); throw e; } } public static void run(String[] args) throws IOException { ManifestInfo manifestInfo = new ManifestInfo(); if(args.length > 0) { if("-manifest".equals(args[0])) { System.out.println(""+manifestInfo); return; } else if("-version".equals(args[0])) { System.out.println(manifestInfo.getFullVersionInfo()); return; } } String className = util.getMainClass(manifestInfo.getManifest()); if(className == null) className = ""; if("TOOLS.JAVA.Main".equals(className.trim()) || "".equals(className)) { System.err.println("Usage:"); System.err.println("1. java -jar <jarfile> -version"); System.err.println("2. java -jar <jarfile> -manifest"); } else { runProgram(className, args); } util.exit(1); } static void runProgram(String className, String[] args) { String msg = ""; ClassLoader cl = ManifestInfo.class.getClassLoader(); try { Class c = cl.loadClass(className); log.finest("class="+c); Method m = c.getMethod("main", new Class[] {String[].class}); m.invoke(null, new Object[] { args }); } catch(ClassNotFoundException e) { msg = "Class in manifest not found in classpath\n" +"Fix the ant.properties file to refer to the\n" +"main class or refer to nothing\n" +"class="+className; System.out.println(msg); } catch(NoSuchMethodException e) { msg = "You have specified a class that doesn't" +"have a main method in ant.properties file." +"class="+className; System.out.println(msg); } catch(Exception e) { msg = "\n\n2. Unknown failure. Contact buildtemplate owner"; log.log(Level.WARNING, "Exception occurred", e); System.out.println(msg); } util.exit(1); } public static void setJarLocator(ManifestUtil l) { util = l; } /** * Constructor that takes a class to get the version information * from out of the manifest. Uses the class's package to retrieve * the manifest version info. * @param c The Class on whose package to use to get version info. */ public ManifestInfo() throws IOException { URL url = ManifestInfo.class.getResource("ManifestInfo.class"); //set manifest from jar file File f = util.getFile(url); JarFile jarFile = new JarFile(f); manifest = jarFile.getManifest(); //set the package of this guy(not really needed as we could get all this info //directly from manifest) //String name = ManifestInfo.class.getName(); //int index = name.lastIndexOf("."); //String packageName = name.substring(0, index); //thePackage = Package.getPackage(packageName); } private Manifest getManifest() { return manifest; } public String getVersion() { Attributes attr = manifest.getMainAttributes(); String version = attr.getValue("Implementation-Version"); version = version.trim(); int index = version.indexOf(" "); version = version.substring(0, index); return version; } public String getFullVersionInfo() { Attributes attr = manifest.getMainAttributes(); String retVal = attr.getValue("Implementation-Title")+" information..."; retVal += "\nwebsite= "+attr.getValue("Implementation-Vendor"); retVal += "\nbuilt by= "+attr.getValue("Built-By"); retVal += "\nclasspath= "+attr.getValue("Class-Path"); retVal += "\nversion= "+attr.getValue("Implementation-Version")+"\n"; return retVal; } /** * Prints the version info the Version represents. * * @see java.lang.Object#toString() */ public String toString() { String manifestInfo = "\nManifest information...\n"; Attributes attr = manifest.getMainAttributes(); Set s = attr.keySet(); Iterator iter = s.iterator(); while(iter.hasNext()) { Object o = iter.next(); manifestInfo += o+"="+attr.get(o)+"\n"; } return manifestInfo; } public interface ManifestUtil { public File getFile(URL url); /** * @param manifest * @return */ public String getMainClass(Manifest manifest); public void exit(int code); } } |
From: Nobody <fas...@us...> - 2006-02-21 10:48:00
|
Update of /cvsroot/mocklib/osgimgr/input/javasrc/osgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/input/javasrc/osgi Added Files: Activator.java BundleManager.java BundleManagerMBean.java Lifecycle.java LifecycleMBean.java Log Message: add osgimgr to mocklib project for now. --- NEW FILE: LifecycleMBean.java --- package osgi; import java.util.Dictionary; import org.osgi.framework.BundleException; import org.osgi.framework.ServiceReference; import biz.xsoftware.api.mgmt.Documentation; @Documentation("LifecycleMBean controls the lifecycle of a bundle as well as exposing it's manifest properties") public interface LifecycleMBean { @Documentation("Returns the unique bundle id of this bundle") public abstract long getBundleId(); @Documentation("Starts the service this bundle represents") public abstract void start() throws BundleException; @Documentation("Stops the service this bean represents") public abstract void stop() throws BundleException; @Documentation("Upgrades the bundle from the location it was installed at") public abstract void update() throws BundleException; @Documentation("Uninstalls the bundle") public abstract void uninstall() throws BundleException; @Documentation("Gets the current state's name") public abstract String getStateName(); @Documentation("Gets the current state") public abstract int getState(); @Documentation("Gets the location the bundle was loaded from") public abstract String getLocation(); @Documentation("Gets the registered Services") public abstract ServiceReference[] getRegisteredServices(); @Documentation("The names of the registered services") public String[] getRegisteredServiceNames(); @Documentation("The Services in use") public abstract ServiceReference[] getServicesInUse(); @Documentation("The names of the services in use") public String[] getServicesInUseNames(); @Documentation("The manifest") public abstract Dictionary getManifest(); @Documentation("The class name of the BundleActivator") public abstract String getBundleActivator(); @Documentation("The Bundle Category that was in the manifest") public abstract String getBundleCategory(); @Documentation("The contact address that was in the manifest") public abstract String getContactAddress(); @Documentation("The copyright from the manifest") public abstract String getCopyright(); @Documentation("The description of this bundle") public abstract String getDescription(); @Documentation("Link to the documentation on this bundle") public abstract String getDocURL(); @Documentation("The name of this bundle") public abstract String getName(); @Documentation("The native code property from the manifest") public abstract String getNativeCode(); @Documentation("The native code language from the manifest") public abstract String getNativeCodeLanguage(); @Documentation("The native code OS from the manifest") public abstract String getNativeCodeOS(); public abstract String getNativeCodeOSVersion(); public abstract String getNativeCodeProcessor(); public abstract String getRequiredExecutionEnvironment(); @Documentation("The location which is used to update the bundle") public abstract String getUpdateLocation(); @Documentation("The vendor of this bundle") public abstract String getVendor(); @Documentation("The version of this bundle") public abstract String getVersion(); @Documentation("The value of dynamice import in the manifest") public abstract String getDynamicImport(); @Documentation("The packages that are exported by this bundle") public abstract String getExportPackage(); public abstract String getExportService(); @Documentation("The packages that are imported by this bundle") public abstract String getImportPackage(); public abstract String getImportService(); public abstract String getObjectClass(); public abstract String getPackageSpecificationVersion(); @Documentation("The manifest version") String getManifestVersion(); } --- NEW FILE: BundleManagerMBean.java --- package osgi; import java.util.Map; import org.osgi.framework.BundleException; import org.osgi.framework.InvalidSyntaxException; public interface BundleManagerMBean { public static final String NULL_STR = "@@NULL@@"; public String getUserDir(); public long installBundle(String location) throws BundleException; public long getBundle(); public String getBundleContextProperty(String key); // (bid) public long[] getBundles(); // (sid, bid) public long[] getServiceReferences(String filter) throws InvalidSyntaxException; public long[] getServiceReferences2(String clazz, String filter) throws InvalidSyntaxException; // // (bid, type) // public long[] getBundleEvents(); // // // (sid, type) // public long[] getServiceEvents(); // // // (bid, type) // public long[] getFrameworkEvents(); // (key, value) public Map getServiceProperties(long sid) throws InvalidSyntaxException; // public int getStartLevel(); // public void setStartLevel(int level); // public void setBundleStartLevel(long bid, int level); // public int getBundleStartLevel(long bid); // public void setInitialBundleStartLevel(int level); // public int getInitialBundleStartLevel(); // public boolean isBundlePersistentlyStarted(long bid); // public Map getExportedPackage(String name); // public Map[] getExportedPackages(long bid); // public void refreshPackages(long[] bids) ; public Map getSystemProperties(); } --- NEW FILE: Activator.java --- package osgi; import java.util.ArrayList; import java.util.Dictionary; import java.util.Hashtable; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.management.MalformedObjectNameException; import javax.management.NotCompliantMBeanException; import javax.management.ObjectName; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleEvent; import org.osgi.framework.BundleListener; import org.ungoverned.gravity.servicebinder.ConfigurationService; import org.ungoverned.gravity.servicebinder.InstanceMetadata; import org.ungoverned.gravity.servicebinder.SvcBinderActivator; import biz.xsoftware.api.osgimgr.Bootstrap; import biz.xsoftware.api.osgimgr.ConfigService; import biz.xsoftware.api.osgimgr.GetComponent; public class Activator extends SvcBinderActivator { private static final Logger log = Logger.getLogger(Activator.class.getName()); public static final String PLATFORM_NAME = "Zeus"; private static final String LIFEBEAN_DOMAIN = PLATFORM_NAME+".Level2.Lifecycle"; public static final String SERVICES_DOMAIN = PLATFORM_NAME+".Level3.Service."; private BundleContext ctx; private GetComponent getter; public Activator(GetComponent getter) throws Exception { this(); this.getter = getter; } public Activator() throws Exception { getter = Bootstrap.createGetComponent(); List<InstanceMetadata> list = new ArrayList<InstanceMetadata>(); InstanceMetadata data = new InstanceMetadata(Bootstrap.CONFIG_NAME, null); data.addInterface(ConfigurationService.class.getName()); // DependencyMetadata depMeta = new DependencyMetadata(InstanceManager.ALL_SERVICES, "1..n", "dynamic", "", "addService", "removeService"); // data.addDependency(depMeta); // DependencyMetadata depMeta2 = new DependencyMetadata() // data.addDependency() list.add(data); setDescriptors(list); } @Override public void start(BundleContext ctx) throws Exception { this.ctx = ctx; super.start(ctx); MyBundleListener bundleList = new MyBundleListener(); long id = ctx.getBundle().getBundleId(); BundleManager mgr = new BundleManager(ctx); ObjectName bundleName = new ObjectName(ConfigService.SERVER_LEVEL1+"BundleManager"); getter.getConfigService().registerBean(BundleManagerMBean.class, bundleName, mgr); // Lifecycle lifeBean = new Lifecycle(id, ctx); registerLifecycle(ctx.getBundle()); // ObjectName lifeName = new ObjectName(LIFEBEAN_PREFIX+"Lifecycle"); // getter.getConfigService().registerBean(LifecycleMBean.class, lifeName, lifeBean); ctx.addBundleListener(bundleList); Bundle[] bundles = ctx.getBundles(); for(Bundle b : bundles) { if(b.getBundleId() == id) continue; registerLifecycle(b); } if(log.isLoggable(Level.FINER)) log.finer("Started"); } @Override public void stop(BundleContext ctx) throws Exception { super.stop(ctx); this.ctx = null; } private class MyBundleListener implements BundleListener { /* (non-Javadoc) * @see org.osgi.framework.BundleListener#bundleChanged(org.osgi.framework.BundleEvent) */ public void bundleChanged(BundleEvent evt) { if(log.isLoggable(Level.FINER)) log.finer("evt Type"+evt.getType()); switch(evt.getType()) { case BundleEvent.INSTALLED: registerLifecycle(evt.getBundle()); break; case BundleEvent.UNINSTALLED: unregisterLifecycle(evt.getBundle()); break; default: break; } } } private String getLogId(Bundle b) { String name = getName(b); long id = b.getBundleId(); return "["+name+"]["+id+"]"; } private String getName(Bundle bundle) { Dictionary dic = bundle.getHeaders(); long id = bundle.getBundleId(); String name = dic.get("Bundle-Name")+""; if(name == null) name = ""+id; return name; } private void registerLifecycle(Bundle bundle) { long id = bundle.getBundleId(); String name = getName(bundle); // ObjectName beanName; try { //beanName = new ObjectName(prefix+name); Lifecycle lifeBean = new Lifecycle(id, ctx); if(log.isLoggable(Level.FINE)) log.fine(getLogId(bundle)+"register Lifecycle MBean"); registerImpl(bundle, lifeBean, LifecycleMBean.class); // OsgiStandardMBean osgiBean = new OsgiStandardMBean(lifeBean, LifecycleMBean.class); // registrar.registerBean(beanName, osgiBean); } catch (MalformedObjectNameException e) { log.log(Level.WARNING, "Failed to register MBean="+name, e); } catch (NotCompliantMBeanException e) { log.log(Level.WARNING, "Failed to register MBean="+name, e); } } private ObjectName registerImpl(Bundle b, Object bean, Class c) throws MalformedObjectNameException, NotCompliantMBeanException { Hashtable<String, String> table = new Hashtable<String, String>(); table.put("name", getName(b)); table.put("BundleId", b.getBundleId()+""); ObjectName beanName = new ObjectName(LIFEBEAN_DOMAIN, table); if(log.isLoggable(Level.FINE)) log.fine(getLogId(b)+"registering MBean="+c.getName()+" name="+beanName); getter.getConfigService().registerBean(c, beanName, bean); if(log.isLoggable(Level.FINE)) log.fine(getLogId(b)+"registered MBean="+c.getName()+" name="+beanName); return beanName; } private void unregisterLifecycle(Bundle bundle) { String name = getName(bundle); try { Hashtable<String, String> table = new Hashtable<String, String>(); table.put("name", name); table.put("BundleId", bundle.getBundleId()+""); ObjectName beanName = new ObjectName(LIFEBEAN_DOMAIN, table); getter.getConfigService().unregisterBean(beanName); } catch (MalformedObjectNameException e) { log.log(Level.WARNING, getLogId(bundle)+"Failed to unregister MBean", e); } } } --- NEW FILE: BundleManager.java --- package osgi; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import java.util.Properties; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; import org.osgi.framework.Constants; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; public class BundleManager implements BundleManagerMBean { private BundleContext bc; public BundleManager(BundleContext bc) { this.bc = bc; } public String getUserDir() { return System.getProperty("user.dir"); } public long installBundle(String location) throws BundleException { Bundle b = bc.installBundle(location); return b.getBundleId(); } public long getBundle() { return bc.getBundle().getBundleId(); } public long[] getBundles() { Bundle[] bl = bc.getBundles(); long[] bids = new long[bl.length]; for (int i = 0; i < bl.length; i++) { bids[i] = bl[i].getBundleId(); } return bids; } public String getBundleContextProperty(String key) { String v = bc.getProperty(key); if(v == null) return NULL_STR; else return v; } public long[] getServiceReferences(String filter) throws InvalidSyntaxException { return getServiceReferences2(null, filter); } public long[] getServiceReferences2(String clazz, String filter) throws InvalidSyntaxException { if (NULL_STR.equals(clazz)) { clazz = null; } if (NULL_STR.equals(filter)) { filter = null; } ServiceReference[] srl = bc.getServiceReferences(clazz, filter); /* * System.out.println("server:getServiceReferences2 class=" + clazz + ", * filter=" + filter + ", srl=" + (srl != null ? ("" + srl.length) : * "null")); */ if (srl == null) { return new long[0]; } long[] r = new long[srl.length * 2]; int n = 0; for (int i = 0; i < srl.length; i++) { r[n * 2] = ((Long) srl[i].getProperty(Constants.SERVICE_ID)) .longValue(); r[n * 2 + 1] = srl[i].getBundle().getBundleId(); n++; } return r; } // public long[] getFrameworkEvents() { // synchronized (frameworkEvents) { // try { // // long[] r = new long[frameworkEvents.size() * 2]; // if (bDebug) { // System.out.println("server: getFrameworkEvents size=" // + r.length / 2); // } // int i = 0; // // for (Iterator it = frameworkEvents.iterator(); it.hasNext();) { // FrameworkEvent ev = (FrameworkEvent) it.next(); // Bundle b = ev.getBundle(); // long bid = -1; // if (b == null) { // if (bDebug) { // System.out.println("fw event: " + ev // + " - no bundle"); // } // } else { // bid = b.getBundleId(); // } // r[i * 2] = bid; // r[i * 2 + 1] = ev.getType(); // i++; // } // // frameworkEvents.clear(); // if (bDebug) { // System.out.println("server: getFrameworkEvents -> " + r); // } // return r; // } catch (Exception e) { // if (bDebug) { // e.printStackTrace(); // } // } // } // return null; // } // public long[] getBundleEvents() { // synchronized (bundleEvents) { // long[] r = new long[bundleEvents.size() * 2]; // int i = 0; // // for (Iterator it = bundleEvents.iterator(); it.hasNext();) { // BundleEvent ev = (BundleEvent) it.next(); // r[i * 2] = ev.getBundle().getBundleId(); // r[i * 2 + 1] = ev.getType(); // i++; // } // bundleEvents.clear(); // return r; // } // } // public long[] getServiceEvents() { // synchronized (serviceEvents) { // long[] r = new long[serviceEvents.size() * 2]; // int i = 0; // // for (Iterator it = serviceEvents.iterator(); it.hasNext();) { // ServiceEvent ev = (ServiceEvent) it.next(); // r[i * 2] = ((Long) ev.getServiceReference().getProperty( // Constants.SERVICE_ID)).longValue(); // r[i * 2 + 1] = ev.getType(); // i++; // } // // serviceEvents.clear(); // return r; // } // } public Map getServiceProperties(long sid) throws InvalidSyntaxException { ServiceReference[] srl = bc.getServiceReferences(null, "(service.id=" + sid + ")"); String[] keys = srl[0].getPropertyKeys(); Map<String, Object> result = new HashMap<String, Object>(); for (int i = 0; i < keys.length; i++) { String key = keys[i]; Object val = srl[0].getProperty(keys[i]); // Object strVal = Util.encodeAsString(val); result.put(key, val); } return result; } // public int getStartLevel() { // return ((StartLevel) slTracker.getService()).getStartLevel(); // } // // public void setStartLevel(int level) { // ((StartLevel) slTracker.getService()).setStartLevel(level); // } // // public void setBundleStartLevel(long bid, int level) { // Bundle b = bc.getBundle(bid); // ((StartLevel) slTracker.getService()).setBundleStartLevel(b, level); // } // // public int getBundleStartLevel(long bid) { // Bundle b = bc.getBundle(bid); // return ((StartLevel) slTracker.getService()).getBundleStartLevel(b); // } // // public void setInitialBundleStartLevel(int level) { // ((StartLevel) slTracker.getService()).setInitialBundleStartLevel(level); // } // // public int getInitialBundleStartLevel() { // return ((StartLevel) slTracker.getService()) // .getInitialBundleStartLevel(); // } // // public boolean isBundlePersistentlyStarted(long bid) { // Bundle b = bc.getBundle(bid); // return ((StartLevel) slTracker.getService()) // .isBundlePersistentlyStarted(b); // } // // public Map getExportedPackage(String name) { // Map map = new HashMap(); // ExportedPackage pkg = ((PackageAdmin) pkgTracker.getService()) // .getExportedPackage(name); // // putExportPackage(map, pkg); // return map; // } // // public Map[] getExportedPackages(long bid) { // Bundle b = bc.getBundle(bid); // ExportedPackage[] pkgs = ((PackageAdmin) pkgTracker.getService()) // .getExportedPackages(b); // // if (pkgs == null) { // return new Map[0]; // } // // Map[] maps = new Map[pkgs.length]; // for (int i = 0; i < pkgs.length; i++) { // maps[i] = new HashMap(); // putExportPackage(maps[i], pkgs[i]); // } // return maps; // } // // public void refreshPackages(long[] bids) { // if (bids.length == 0) { // ((PackageAdmin) pkgTracker.getService()).refreshPackages(null); // bids = null; // } else { // Bundle[] bl = new Bundle[bids.length]; // for (int i = 0; i < bids.length; i++) { // bl[i] = bc.getBundle(bids[i]); // } // ((PackageAdmin) pkgTracker.getService()).refreshPackages(bl); // } // // } // void putExportPackage(Map<String, Object> map, ExportedPackage pkg) { // if (pkg != null) { // Long[] bids; // Bundle[] bl = pkg.getImportingBundles(); // if (bl == null) { // bids = new Long[0]; // } else { // bids = new Long[bl.length]; // for (int i = 0; i < bids.length; i++) { // bids[i] = new Long(bl[i].getBundleId()); // } // } // map.put("getExportingBundle", new Long(pkg.getExportingBundle() // .getBundleId())); // map.put("getImportingBundles", bids); // map.put("getName", pkg.getName()); // map.put("getSpecificationVersion", pkg.getSpecificationVersion()); // map.put("isRemovalPending", pkg.isRemovalPending() ? Boolean.TRUE // : Boolean.FALSE); // } // } public Map getSystemProperties() { Map<String, String> map = new HashMap<String, String>(); Properties props = System.getProperties(); for (Enumeration e = props.keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); String val = (String) props.get(key); map.put(key, val); } return map; } } --- NEW FILE: Lifecycle.java --- package osgi; import java.util.Dictionary; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; import org.osgi.framework.Constants; import org.osgi.framework.ServiceReference; public class Lifecycle implements LifecycleMBean { private long id; private BundleContext bc; public Lifecycle(long id, BundleContext bc) { this.id = id; this.bc = bc; } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getBundleId() */ public long getBundleId() { return id; } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#start() */ public void start() throws BundleException { bc.getBundle(id).start(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#stop() */ public void stop() throws BundleException { bc.getBundle(id).stop(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#update() */ public void update() throws BundleException { bc.getBundle(id).update(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#uninstall() */ public void uninstall() throws BundleException { bc.getBundle(id).uninstall(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getStateName() */ public String getStateName() { switch(bc.getBundle(id).getState()) { case Bundle.ACTIVE: return "active"; case Bundle.INSTALLED: return "installed"; case Bundle.RESOLVED: return "resolved"; case Bundle.STARTING: return "starting"; case Bundle.STOPPING: return "stopping"; case Bundle.UNINSTALLED: return "uninstalled"; default: return "unknown state"; } } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getState() */ public int getState() { return bc.getBundle(id).getState(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getLocation() */ public String getLocation() { return bc.getBundle(id).getLocation(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getRegisteredServices() */ public ServiceReference[] getRegisteredServices() { return bc.getBundle(id).getRegisteredServices(); } public String[] getRegisteredServiceNames() { ServiceReference[] refs = getRegisteredServices(); if(refs == null) return null; String[] names = new String[refs.length]; for(int i = 0; i < refs.length; i++) { Object o = bc.getService(refs[i]); names[i] = o.getClass().getName(); } return names; } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getServicesInUse() */ public ServiceReference[] getServicesInUse() { return bc.getBundle(id).getServicesInUse(); } public String[] getServicesInUseNames() { ServiceReference[] refs = getServicesInUse(); if(refs == null) return null; String[] names = new String[refs.length]; for(int i = 0; i < refs.length; i++) { Object o = bc.getService(refs[i]); names[i] = o.getClass().getName(); } return names; } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getManifest() */ public Dictionary getManifest() { return bc.getBundle(id).getHeaders(); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getBundleActivator() */ public String getBundleActivator() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_ACTIVATOR); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getBundleCategory() */ public String getBundleCategory() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_CATEGORY); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getContactAddress() */ public String getContactAddress() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_CONTACTADDRESS); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getCopyright() */ public String getCopyright() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_COPYRIGHT); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getDescription() */ public String getDescription() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_DESCRIPTION); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getDocURL() */ public String getDocURL() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_DOCURL); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getName() */ public String getName() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_NAME); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getNativeCode() */ public String getNativeCode() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_NATIVECODE); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getNativeCodeLanguage() */ public String getNativeCodeLanguage() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_NATIVECODE_LANGUAGE); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getNativeCodeOS() */ public String getNativeCodeOS() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_NATIVECODE_OSNAME); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getNativeCodeOSVersion() */ public String getNativeCodeOSVersion() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_NATIVECODE_OSVERSION); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getNativeCodeProcessor() */ public String getNativeCodeProcessor() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_NATIVECODE_PROCESSOR); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getRequiredExecutionEnvironment() */ public String getRequiredExecutionEnvironment() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getUpdateLocation() */ public String getUpdateLocation() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_UPDATELOCATION); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getVendor() */ public String getVendor() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_VENDOR); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getVersion() */ public String getVersion() { return (String)bc.getBundle(id).getHeaders().get(Constants.BUNDLE_VERSION); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getDynamicImport() */ public String getDynamicImport() { return (String)bc.getBundle(id).getHeaders().get(Constants.DYNAMICIMPORT_PACKAGE); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getExportPackage() */ public String getExportPackage() { String packs = (String)bc.getBundle(id).getHeaders().get(Constants.EXPORT_PACKAGE); if(packs == null) return null; packs = packs.replace(',','\n'); return packs; } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getExportService() */ public String getExportService() { return (String)bc.getBundle(id).getHeaders().get(Constants.EXPORT_SERVICE); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getImportPackage() */ public String getImportPackage() { String packs = (String)bc.getBundle(id).getHeaders().get(Constants.IMPORT_PACKAGE); if(packs == null) return null; packs = packs.replace(',','\n'); return packs; } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getImportService() */ public String getImportService() { return (String)bc.getBundle(id).getHeaders().get(Constants.IMPORT_SERVICE); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getObjectClass() */ public String getObjectClass() { return (String)bc.getBundle(id).getHeaders().get(Constants.OBJECTCLASS); } /* (non-Javadoc) * @see biz.xsoftware.osgi.mgr.Temp#getPackageSpecificationVersion() */ public String getPackageSpecificationVersion() { return (String)bc.getBundle(id).getHeaders().get(Constants.PACKAGE_SPECIFICATION_VERSION); } public String getManifestVersion() { return (String)bc.getBundle(id).getHeaders().get("Manifest-Version"); } } |
From: Nobody <fas...@us...> - 2006-02-21 10:48:00
|
Update of /cvsroot/mocklib/osgimgr/bldfiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/bldfiles Added Files: ant.properties build.xml checkin.xml design.xml directory.properties Log Message: add osgimgr to mocklib project for now. --- NEW FILE: design.xml --- <design> <!-- See the documentation of the ant-contrib project to fill in the package design here ant-contrib is at http://sourceforge.net/projects/ant-contrib. Currently, this template is using a version from the CVS head, and the docs are up to date on the CVS head, but not in the latest download yet as I have not asked for a new release on ant-contrib yet(wanted to finish a few more things), but this is stable and works. I just want to add one more feature--> <!-- DO NOT MODIFY THE NEXT LINES --> <package name="manifest" package="biz.xsoftware.manifest" needdeclarations="true" subpackages="include" needdepends="false"/> <package name="junit" package="junit" subpackages="include" needdeclarations="false"/> <package name="mock" package="biz.xsoftware.mock" needdeclarations="false"/> <!-- this is a jmx bundle and everyone depends on jmx so allow not having to declare dependencies on jmx --> <package name="jmx" package="javax.management" subpackages="include" needdeclarations="false"/> <package name="mx4j" package="mx4j.tools.adaptor.http"/> <package name="servicebinder" package="org.ungoverned.gravity.servicebinder" subpackages="include"/> <package name="osgimgrapi" package="biz.xsoftware.api.osgimgr"> <depends>servicebinder</depends> </package> <package name="mgmtapi" package="biz.xsoftware.api.mgmt"/> <package name="osgimgr" package="biz.xsoftware.osgimgr"> <depends>mgmtapi</depends> <depends>osgimgrapi</depends> <depends>mx4j</depends> </package> <package name="osgi" package="org.osgi.framework"/> <package name="activator" package="osgi" subpackages="include"> <depends>servicebinder</depends> <depends>osgimgrapi</depends> <depends>osgi</depends> </package> <package name="test" package="biz.xsoftware.test" subpackages="include"> <depends>osgimgrapi</depends> </package> </design> --- NEW FILE: ant.properties --- #----------------------------------------------------------------------- # MANIFEST and JAR properties - Make sure you change these to your settings. #----------------------------------------------------------------------- name = osgimgr #used as the jar file name(ie. ${name}.jar) #used as zip file name(ie. ${name}-version.jar) #used as the directory staging name #version info may be retrieved using java -jar ${name}.jar -version imports =org.ungoverned.gravity.servicebinder exports =biz.xsoftware.api.osgimgr impl.pattern =biz/xsoftware/osgi/mgr/**,biz/xsoftware/test/** #The packages to make private build.source=5 manifest.mainclass = TOOLS.JAVA.Main #The class that is run when java -jar xxxx.jar is run manifest.title = Ant Build Template manifest.vendor = http://www.xsoftware.biz manifest.builder = Dean Hiller manifest.description = Put a project description here manifest.icon = copyright = Copyright © 2000 Dean Hiller All Rights Reserved. javadoc.title = Build Template javadoc.bottom = http://www.xsoftware.biz #----------------------------------------------------------------------- # Properties to run the program using the "run" target in build.xml(ie. build run) # Just try ./build run to execute org.NO.MAIN.YET below(of course, that class # doesn't exist, so I would suggest changing that. #----------------------------------------------------------------------- client.to.run = org.NO.MAIN.YET #Class run when "build run" target is used client.args = #params to the java app for the run target to run the application client.jvm.args = -enableassertions #params to the JVM for the run target to run the application ########################################################### # If you need JNI header files, uncomment the following property # and put the classes that need to generate header files # in this property(a comma delimted list) ########################################################## # #javah.classes=com.avaya.example.callinfo.mci.MCI # ########################################################### #If you need to use castor set 'xsd.start' to the name #of your main xsd file, and uncomment the line ########################################################## # #xsd.start=yourName.xsd # --- NEW FILE: checkin.xml --- <?xml version="1.0"?> <!-- Run "ant -projecthelp" to view all the possible targets and descriptions. --> <project name="std_buildfile" default="testall" basedir=".."> <target name="checkinApi"> <cvs command="commit -m Delivery-of-new-release input/libinclude" failonerror="true"/> </target> <target name="checkinFramework"> <cvs command="commit -m Delivery-of-new-release input/libexclude" failonerror="true"/> </target> <target name="checkinServiceBinder"> <cvs command="commit -m Delivery-of-new-release input/libexclude" failonerror="true"/> </target> </project> --- NEW FILE: build.xml --- <?xml version="1.0"?> <!-- Run "ant -projecthelp" to view all the possible targets and descriptions. --> <project name="std_buildfile" default="all" basedir=".."> <!-- Now allow any of the properties to be overridden --> <property file="${user.home}/ant.properties" /> <property file="bldfiles/ant.properties"/> <property file="bldfiles/directory.properties"/> <available property="makeExists" file="${native}/Makefile"/> <!--convert the lib file separators to this file system for later use in pathconvert to put together the manifest file --> <!--we can't do this if there are tool jars in the lib as we don't want tool jars in the manifest classpath???? or do we? --> <property name="full.lib.path" location="${lib}"/> <property name="jar.name" value="${name}.jar"/> <description> This is a generic build file template. All the customizable properties are in ant.properties file. All the directories used by this template are in directory.properties file. </description> <!-- *********************************************************************** TASK DEFINITIONS *********************************************************************** --> <property name="junit.location" location="${tool.dir}/ant-junit"/> <path id="junit.lib"> <pathelement path="${junit.location}/ant-junit.jar"/> <pathelement path="${junit.location}/junit.jar"/> </path> <property name="antcontrib.location" location="${tool.dir}/ant-contrib"/> <path id="antcontrib.lib"> <fileset dir="${antcontrib.location}"> <include name="**/*.jar"/> </fileset> </path> <!-- directory that contains emma.jar and emma_ant.jar: --> <property name="emma.dir" value="${tool.dir}/emma" /> <path id="emma.lib" > <fileset dir="${emma.dir}"> <include name="**/*.jar"/> </fileset> </path> <property name="findbugs.dir" value="${tool.dir}/findbugs" /> <path id="findbugs.lib" > <fileset dir="${findbugs.dir}/lib"> <include name="**/*.jar"/> </fileset> </path> <property name="checkstyle.dir" value="${tool.dir}/checkstyle" /> <!-- directory that contains osgi ant tasks --> <property name="osgi.dir" value="${tool.dir}/osgi" /> <path id="osgi.lib" > <fileset dir="${osgi.dir}"> <include name="**/*.jar"/> </fileset> </path> <!-- *********************************************************************** PATH DEFINITIONS *********************************************************************** --> <path id="lib.include"> <fileset dir="${lib}"> <include name="**/*.jar"/> </fileset> </path> <!-- all Third Party jars and tool jars this module needs to compile --> <path id="lib.jars"> <path refid="lib.include"/> <fileset dir="${libexclude}"> <include name="**/*.jar"/> </fileset> </path> <!-- must keep junit jars separate for ease of creating classpath in manifest --> <path id="tool.and.lib"> <path refid="lib.jars"/> <fileset dir="${junit.location}"> <include name="**/*.jar"/> </fileset> </path> <path id="classes.classpath" > <pathelement location="${build}" /> </path> <path id="testall.classpath"> <fileset dir="${codecov.jar}" includes="**/*.jar"/> <!--pathelement location="${codecov.temp}"/--> <path refid="tool.and.lib"/> <path refid="classes.classpath"/> </path> <!-- *********************************************************************** INIT TASKS *********************************************************************** --> <target name="taskdefs"> <tstamp> <format property="manifest.date" pattern ="EE MMMM d yyyy, HH:mm:ss" locale ="en"/> </tstamp> <!-- Override this property to build official release --> <property name="version" value="Developer-Build"/> <echo message="***************************USING THIS ANT************************"/> <echo message="ant.home=${ant.home}"/> <echo message="*****************************************************************"/> <!--Just a convenient pathconvert to debug paths above by converting to string and printing --> <pathconvert dirsep="/" pathsep=" " property="temp.somepath" refid="junit.lib" setonempty="true"/> <echo message="junit.lib=${temp.somepath}"/> <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" classpathref="junit.lib"/> <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="antcontrib.lib"/> <taskdef resource="emma_ant.properties" classpathref="emma.lib" /> <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/> <!-- for some reason, I can't use resource="checkstyletask.properties" as it fails here--> <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"> <classpath> <fileset dir="${checkstyle.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </taskdef> <taskdef name="bundleinfo" classname="org.knopflerfish.ant.taskdefs.bundle.BundleInfoTask" classpathref="osgi.lib"/> <taskdef name="bundlemanifest" classname="org.knopflerfish.ant.taskdefs.bundle.BundleManifestTask" classpathref="osgi.lib"/> <taskdef name="bundlehtml" classname="org.knopflerfish.ant.taskdefs.bundle.BundleHTMLExtractorTask" classpathref="osgi.lib"/> <taskdef name="bundleobr" classname="org.knopflerfish.ant.taskdefs.bundle.OBRExtractorTask" classpathref="osgi.lib"/> </target> <!-- *********************************************************************** BEGIN TARGETS *********************************************************************** --> <!-- Just creates the input directories this build file uses if they are not already created --> <target name="create-src" depends="taskdefs" description="Create src directories for a new project"> <mkdir dir="${javacode}"/> <mkdir dir="${lib}"/> <mkdir dir="${staging.in}"/> <mkdir dir="${properties}"/> <mkdir dir="${scripts}"/> <mkdir dir="${test.input}"/> <mkdir dir="${native}"/> <mkdir dir="${schemas}"/> <mkdir dir="${jardist}"/> <!-- classpath for the jars needed to run application Used in testall, test, and run targets--> <path id="classpath.application"> <fileset dir="${jardist}"> <include name="**/*.jar"/> </fileset> <pathelement path="${jardist}"/> </path> </target> <!-- *********************************************************************** COMPILE TARGET *********************************************************************** --> <target name="compile" depends="create-src" description="Compile code"> <mkdir dir="${build}"/> <pathconvert property="compile.classpath" pathsep=":"> <path refid="tool.and.lib"/> </pathconvert> <echo message="Compiling files in ${javacode}"/> <echo message="Putting the class files in ${build}"/> <echo message="classpath=${compile.classpath}"/> <!-- Compile the java code from ${javacode} into ${build} --> <javac srcdir="${javacode}" destdir="${build}" deprecation="yes" debug="on"> <classpath> <path refid="tool.and.lib"/> </classpath> </javac> <!-- copy all misc. files over(config.jaas, etc.) from the ${javacode} directory--> <!-- Will not copy over *.jpg, *.gif, *.html for here(those are for javadoc)--> <copy todir="${build}"> <fileset dir="${javacode}"> <exclude name="**/*.java"/> <exclude name="**/*.htm"/> <exclude name="**/*.html"/> <exclude name="**/*.jpg"/> <exclude name="**/*.gif"/> <exclude name="**/*.bak"/> <exclude name="**/*~"/> <exclude name="**/vssver*.*"/> <exclude name="**/.nbattrs"/> </fileset> <!-- copy all *.property files or other misc. files over(*.gif, *.jpg, etc.) from the ${properties} directory --> <fileset dir="${properties}"> <exclude name="**/*.java"/> <exclude name="**/*.bak"/> <exclude name="**/*~"/> </fileset> </copy> <!-- convert any asian languages from UTF-8 to ascii so they can be used--> <native2ascii encoding="UTF-8" src="${properties}" dest="${build}" includes="**/*.utf8-properties" ext=".properties"/> <!--check for rmi stubs so if there are we will do the next target--> <fileset dir="${build}" id="rmi.fileset"> <include name="**/RMI*.class"/> </fileset> <pathconvert pathsep="\r\n" property="have.rmi.files" refid="rmi.fileset" setonempty="false"/> </target> <!-- *********************************************************************** RMI TARGET - This target is automatically skipped if there are no RMI files *********************************************************************** --> <target name="rmi-stubs" depends="compile" if="have.rmi.files" description="Create rmi stubs"> <echo message="******************RMI FILES TO COMPILE********************"/> <echo message="rmifiles=${have.rmi.files}"/> <echo message="**********************************************************"/> <mkdir dir="${rmi.stubs}"/> <rmic base="${build}" includes="**\RMI*.class" debug="yes"> <classpath> <pathelement path="${build}"/> <fileset dir="${lib}"> <include name="**/*.jar"/> </fileset> </classpath> </rmic> <copy todir="${rmi.stubs}"> <fileset dir="${build}" includes="**\Remote*.class"/> <fileset dir="${build}" includes="**\*_Stub.class"/> <fileset dir="${build}" includes="**\*_Skel.class"/> </copy> </target> <!-- *********************************************************************** OSGI specific stuff *********************************************************************** --> <target name="key1" if="exports" depends="compile"> <property name="export" value="Export-Package"/> </target> <target name="key2" unless="exports" depends="key1"> <property name="export" value="No-Export-Package"/> </target> <target name="manifest" depends="key2"> <mkdir dir="${manifest}"/> <property name="bundle.uuid" value="biz.xsoftware:${name}:${version}:all"/> <property name="ee.check.foundation" value="false"/> <property name="bundle.emptystring" value="[bundle.emptystring]"/> <!--generate classpath to add to manifest using all jars in lib and main jar--> <pathconvert dirsep="/" pathsep="," property="osgi.classpath" refid="lib.include" setonempty="true"> <!--The map takes away the beginning of the path just leaving the jar file name --> <map from="${full.lib.path}${file.separator}" to=""/> </pathconvert> <property name="bundle.classpath" value=".,${osgi.classpath}"/> <echo message="bundle.classpath=${bundle.classpath}"/> <bundleinfo exports = "export.package" checkFoundationEE = "${ee.check.foundation}"> <fileset dir="${build}" includes="${api.pattern}"/> </bundleinfo> <property name="bundle.activator" value="osgi.Activator"/> <bundleinfo activator = "bundle.activator" imports = "import.package" stdimports = "${ignore.imports}" checkFoundationEE = "${ee.check.foundation}"> <fileset dir="${build}" includes="${impl.pattern}"/> </bundleinfo> <echo message="export=${export}"/> <bundlemanifest file = "${manifest}/MANIFEST.MF"> <attribute name="Bundle-Name" value="${name}"/> <attribute name="Bundle-SymbolicName" value="${name}"/> <attribute name="Bundle-Version" value="${version}"/> <attribute name="Bundle-Description" value="${manifest.description}"/> <attribute name="Bundle-Vendor" value="${manifest.vendor}"/> <attribute name="Bundle-DocURL" value="${manifest.vendor}"/> <attribute name="Bundle-ContactAddress" value="${manifest.vendor}"/> <attribute name="Bundle-Activator" value="${bundle.activator}"/> <attribute name="Bundle-Category" value="${bundle.emptystring}"/> <attribute name="Bundle-Config" value="${bundle.emptystring}"/> <attribute name="Bundle-Classpath" value="${bundle.classpath}"/> <attribute name="Export-Service" value="${bundle.emptystring}"/> <attribute name="Import-Service" value="${bundle.emptystring}"/> <attribute name="${export}" value="${exports}"/> <attribute name="Import-Package" value="${imports}"/> <attribute name="Bundle-UUID" value="${bundle.uuid}"/> <attribute name="Built-From" value="${manifest.builder}"/> <attribute name="Build-Date" value="${manifest.date}"/> <attribute name="Application-Icon" value="${manifest.icon}"/> <attribute name="Bundle-SubversionURL" value="${manifest.vendor}"/> <attribute name="Bundle-APIVendor" value="${manifest.vendor}"/> <attribute name="Built-By" value="${manifest.builder}"/> <attribute name="Main-Class" value="biz.xsoftware.manifest.ManifestInfo"/> <attribute name="Class-Path" value="${manifest.classpath}"/> <!-- <attribute name="Specification-Title" value="${spec.title}"/> <attribute name="Specification-Version" value="${spec.version}"/> <attribute name="Specification-Vendor" value="${spec.vendor}"/> --> <attribute name="Implementation-Title" value="${manifest.title}"/> <attribute name="Implementation-Version" value="${version} ${TODAY}"/> <attribute name="Implementation-Vendor" value="${manifest.vendor}"/> <!-- non-standard manifest attributes --> <attribute name="SubMain-Class" value="${manifest.mainclass}"/> <attribute name="JarVersion" value="${version} ${TODAY}"/> <!-- <section name="common/class1.class"> <attribute name="Sealed" value="false"/> </section> --> </bundlemanifest> </target> <!-- *********************************************************************** JAR TARGET *********************************************************************** --> <target name="jar" depends="manifest, make" description="Create distribution"> <!-- Create the distribution directory --> <mkdir dir="${jardist}"/> <!-- copy all jars that need to be in this osgi bundle jar into the directory that will be jarred up--> <copy todir="${build}"> <fileset dir="${lib}" includes="**"/> </copy> <!-- Put all implementation classes from ${build} into the jar file --> <jar jarfile="${jardist}/${jar.name}" basedir="${build}" manifest="${manifest}/MANIFEST.MF"/> <verifydesign jar="${jardist}/${jar.name}" design="bldfiles/design.xml"/> </target> <!-- ================================================================================ Creates the distribution ================================================================================ --> <target name="createdist" depends="jar" description="Creates the distribution"> <mkdir dir="${dist}"/> <mkdir dir="${staging}"/> <copy todir="${staging}"> <fileset dir="${staging.in}" includes="**/*"/> </copy> </target> <!-- *********************************************************************** START APPLICATION TARGET *********************************************************************** --> <target name="run" depends="jar" description="Run Java application after compiling code"> <pathconvert property="application.classpath" pathsep=":"> <path refid="classpath.application"/> </pathconvert> <echo message="Forking of the program...${client.to.run}"/> <echo message="classpath=${application.classpath}"/> <echo message="codebase=${basedir}\${rmi.stubs}"/> <echo message="jvmargs=${client.jvm.args}"/> <echo message="program args=${client.args}"/> <java classname="${client.to.run}" fork="yes" dir="."> <jvmarg line="${client.jvm.args}"/> <arg line="${client.args}"/> <classpath> <path refid="classpath.application"/> </classpath> </java> </target> <!-- *********************************************************************** INSTRUMENTATION TARGET *********************************************************************** --> <target name="instrumentation" depends="jar"> <property name="emma.enabled" value="true"/> <mkdir dir="${codecov.temp}"/> <mkdir dir="${codecov.classes}"/> <mkdir dir="${codecov.jar}"/> <mkdir dir="${codecov.report}"/> <pathconvert property="instr.classpath" pathsep=":"> <path refid="classes.classpath"/> </pathconvert> <echo message="instr.classpath=${instr.classpath}"/> <emma enabled="${emma.enabled}" > <instr instrpathref="classes.classpath" destdir="${codecov.classes}" metadatafile="${codecov.temp}/metadata.emma" merge="true" /> </emma> <jar destfile="${codecov.jar}/${name}-instrumented.jar" duplicate="preserve" manifest="${manifest}/MANIFEST.MF"> <fileset dir="${codecov.classes}" includes="**"/> <fileset dir="${build}" includes="**"/> </jar> </target> <!-- *********************************************************************** OSGI TARGET *********************************************************************** --> <target name="osgi"> <unzip src="${input}/osgi/osgiminimum.zip" dest="${generated}/osgigen"/> </target> <!-- *********************************************************************** TEST TARGET *********************************************************************** --> <target name="test" depends="osgi, createdist" description="Run ONE Junit test"> <input message="Input test class name. (ie. org.awt.TestEdgeLayout):" addproperty="test"/> <echo message="looking for file named ${test}"/> <available classname="${test}" property="test.exists"> <classpath> <path refid="classpath.application"/> </classpath> </available> <echo message="value=${test.exists}"/> <pathconvert property="search.classpath" pathsep=":"> <path refid="classpath.application"/> </pathconvert> <fail unless="test.exists"> The test case '${test}.class' cannot be found in the classpath. Check all files in the classpath and make sure the appropriate class file exists. The classpath is=${search.classpath} </fail> <mkdir dir="${junit.results}"/> <pathconvert property="junit.classpath" pathsep=":"> <path refid="classpath.application"/> </pathconvert> <echo message="About to run JUnit test(${test})..."/> <echo message="current directory=${basedir}"/> <echo message="classpath=${junit.classpath}"/> <junit fork="yes" haltonfailure="yes" dir="${basedir}"> <classpath> <path refid="classpath.application"/> </classpath> <jvmarg value="-Djar.name=${jardist}/${jar.name}"/> <jvmarg value="-Dversion=${version}"/> <formatter type="plain" usefile="false"/> <formatter type="xml"/> <test name="${test}" todir="${junit.results}"/> </junit> </target> <!-- *********************************************************************** TEST ALL TARGET *********************************************************************** --> <target name="testall" depends="osgi, instrumentation" description="Run ALL junit and abbot tests after compiling code"> <mkdir dir="${junit.results}"/> <pathconvert property="junit.classpath" pathsep=":"> <path refid="classpath.application"/> </pathconvert> <echo message="About to run JUnit tests..."/> <echo message="pattern1=${junit.pattern1}"/> <echo message="pattern2=${junit.pattern2}"/> <echo message="current directory=${basedir}"/> <echo message="classpath=${junit.classpath}"/> <!-- must be forked for instrumentation to work!!! --> <junit fork="yes" haltonfailure="yes" failureproperty="is.test.fail" dir="${basedir}" printsummary="withOutAndErr"> <classpath> <path refid="testall.classpath"/> <path refid="emma.lib" /> </classpath> <jvmarg value="-Demma.coverage.out.file=${codecov.temp}/coverage.emma" /> <jvmarg value="-Demma.coverage.out.merge=true" /> <jvmarg value="-Djar.name=${jardist}/${jar.name}"/> <jvmarg value="-Dversion=${version}"/> <formatter type="plain" usefile="false"/> <formatter type="xml"/> <batchtest todir="${junit.results}"> <fileset dir="${build}"> <patternset> <include name="biz/xsoftware/manifest/Test*.class"/> <include name="${junit.pattern1}"/> <include name="${junit.pattern2}"/> <exclude name="**/*$$*.class"/> </patternset> </fileset> </batchtest> </junit> <!-- not used because this is good for automated build but bad for developer. Developer doesn't want to look through 100 test cases to see which one is failing. To use this gain haltonfailure above needs to be off--> <!-- after all tests are run, this makes the build fail--> <fail if="is.test.fail"/> <!--autobuilds will not work without this while normal build will because for some reason basedir was not being used property--> <property name="report.tmp" location="${codecov.report}"/> <echo message="report=${report.tmp}"/> <emma enabled="${emma.enabled}" > <report sourcepath="${javacode}:${versioning.src}" > <fileset dir="${codecov.temp}" > <include name="*.emma" /> </fileset> <txt outfile="${report.tmp}/coverage.txt" /> <html outfile="${report.tmp}/index.html" /> </report> </emma> <!--delete dir="${codecov.temp}"/--> </target> <!-- *********************************************************************** FINDBUGS TARGET *********************************************************************** --> <target name="findbugs" depends="jar"> <mkdir dir="${findbugs.report}"/> <findbugs home="${findbugs.dir}" output="html" outputFile="${findbugs.report}/index.html"> <class location="${jardist}/${jar.name}"/> </findbugs> </target> <!-- *********************************************************************** CHECKSTYLE TARGET *********************************************************************** --> <target name="checkstyle" depends="create-src" description="Runs checkstyle against the code"> <mkdir dir="${checkstyle.report}"/> <checkstyle config="${checkstyle.dir}/config.xml"> <classpath> <path refid="lib.jars"/> </classpath> <fileset dir="${javacode}" includes="**/*.java"/> <formatter type="plain" toFile="${checkstyle.report}/index.html"/> </checkstyle> </target> <!-- *********************************************************************** ALL TARGET *********************************************************************** --> <target name="all" depends="testall,checkstyle,findbugs,javadoc"> </target> <!-- *********************************************************************** RELEASE TARGET *********************************************************************** --> <target name="release" depends="testall" description="Builds official release"> <ant antfile="${config}/release.xml" inheritRefs="true"/> </target> <!-- *********************************************************************** JAVADOC TARGET *********************************************************************** --> <target name="javadoc" description="Generate JavaDoc"> <mkdir dir="${javadoc}"/> <!-- copy all package.html files, img's etc for javadoc --> <copy todir="${javadoc}"> <fileset dir="${javacode}" excludes="**/*.java"/> </copy> <echo message="package lists in=${package.list}"/> <javadoc sourcepath="${javacode}" destdir="${javadoc}" author="true" version="true" use="true" public="yes" overview="${javacode}/overview.html" windowtitle="${javadoc.title} ${version}" doctitle="${javadoc.title} ${version}" Verbose="true"> <!-- classpath needed to link up to third_party libs without 100's of warnings --> <classpath> <path refid="tool.and.lib"/> </classpath> <fileset dir="${javacode}"> <include name="${javadoc.pattern}"/> </fileset> <doctitle><![CDATA[<h1>${javadoc.title} ${version}</h1>]]></doctitle> <bottom><![CDATA[<i>${copyright}</i><br> ${javadoc.bottom}]]> </bottom> <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api" packagelistLoc="${package.list}/jdk"/> <link offline="true" href="http://www.junit.org/junit/javadoc/3.8.1" packagelistLoc="${package.list}/junit"/> </javadoc> </target> <!-- *********************************************************************** JAVAH TARGET - Creates JNI C header files if needed *********************************************************************** --> <target name="javah" depends="compile" if="javah.classes" description="Creates C header files"> <javah class="${javah.classes}" destdir="${native}"> <classpath refid="build.classpath"/> </javah> </target> <!-- *********************************************************************** Runs make on the C++/C code if a Makefile exists in the proper directory *********************************************************************** --> <target name="make" depends="javah" if="makeExists" description="runs make"> <echo message="make in ${native}"/> <exec executable="make" dir="${native}"/> </target> <!-- *********************************************************************** GENERATE CASTOR OBJECTS TARGET *********************************************************************** --> <!--target name="castor" depends="create-src" description="Generates class files from xsd"> <echo message="build=${build}"/> <echo message="generating source from ${schemas}/${xsd.start}"/> <echo message="putting generated source in ${basedir}/${src.gen}"/> <castor bindingfile="${basedir}/bldfiles/binding.file" dest="${basedir}/${src.gen}"> <i dir="${basedir}/${schemas}"> <include name="${xsd.start}"/> </i> </castor> </target--> <!-- *********************************************************************** AUTOBUILD TARGET *********************************************************************** --> <target name="autobuild" depends="clean, all"> <cvs command="tag -R ${version}" failonerror="true"/> <!-- need to deliver new delivery to other modules --> </target> <!-- *********************************************************************** CLEAN TARGET *********************************************************************** --> <target name="clean" depends="create-src" description="Clean all generated files"> <!-- Delete everything in the ${generated} directory tree --> <delete dir="${generated}"/> </target> </project> --- NEW FILE: directory.properties --- #---------------------------------------------------------------------- #DO NOT MAKE CHANGES TO THIS FILE, this file is overwriten #every time build is run. To personalize make changes to #ant.properties, dependencies.xml, and #release.xml. All which are in the [basedir]/bldfiles directory #---------------------------------------------------------------------- #----------------------------------------------------------------------- # OUTPUT DIRECTORIES #----------------------------------------------------------------------- generated =output manifest =${generated}/manifest #will contain a generated manifest build =${generated}/classes #will contain all the *.class files after compile #will contain all the *.jpg files from ${properties} #will contain all the *.properties files from ${properties} #will contain all the *.gif files from ${properties} #will contain all the *.html files from ${properties} #will contain all the *.* files from ${properties} #will NOT contain *.html, *.htm, *.jpg, *.gif from ${javacode} jardist =${generated}/jardist #will contain a *.jar containing everything in ${build} dist =${generated}/dist #contains the release that gets released to the world reports =${generated}/reports codecov.report =${reports}/codecoverage #contains the code coverage reports of what the unit tests #covered findbugs.report =${reports}/findbugs checkstyle.report=${reports}/checkstyle javadoc =${reports}/javadoc #contains the javadoc of biz.xsoftware.api allcodecov =${generated}/codecoverage codecov.temp =${allcodecov}/misc codecov.classes =${allcodecov}/instrumented-classes #intermediate directory that contains instrumented classes to #run testall against so a code coverage report can be spit out. codecov.jar =${allcodecov}/instrumented-jar junit.results =${generated}/test_results #contains junit test results staging =${generated}/staging projstaging =${generated}/staging/${name} #will contain all *.html generated by javadoc #will contain all *.html from ${javacode} directory(such as package.html) #will contain all *.jpg from ${javacode} directory #will contain all *.gif from ${javacode} directory rmi.stubs =${generated}/rmistubs #contains all Remote*.class files copied from ${build} #contains all *_stub.class files copied from ${build} #contains all *_skel.class files copied from ${build} #this directory is only created if RMI*.class exists test.area =${generated}/tests #This is sometimes created by JUnit tests to do temporary #testing. It usually gets deleted afterwards. src.gen =${generated}/src #generated source code #----------------------------------------------------------------------- # INPUT DIRECTORIES - don't change these after the project is started. #----------------------------------------------------------------------- input =input #contains all stuff that is an input into the build config =bldfiles #contains build.xml for the module, and any other build scripts #plus build property files javacode =${input}/javasrc #Contains all *.java source files #Contains all *.html files needed by javadoc #Contains all *.jpg files needed by javadoc #Contains all *.gif files needed by javadoc #Contains all *.* files needed by javadoc #Will NOT contain any *.jpg, *.gif, *.html, *.htm needed by application #Use ${properties} for *.jpg, *.gif, *.html, *.htm needed by application properties =${input}/properties #contains *.property files for i18n #contains *.gif needed for application #contains *.* any other resource files needed for application lib =${input}/libinclude #contains all *.jar needed to run the app and that need to be deployed with the app #does not contain *.jars needed to compile the app(such as junit.jar) libexclude =${input}/libexclude #contains all the *.jar that are not needed to run the app. They are for testing or #would already be deployed as services in the framework as in the case of an osgi logging #service for example staging.in =${input}/staging #build copies everything from here to ${staging} so staging area can just be #zipped up or rpm'd up or whatever during the dist target. #typically, there will be another directory in here called <project> #or something. Some projects won't but most will. scripts =${input}/tests/scripts #DO NOT MODIFY. This is hardcoded in TestSuiteAllScripts.java. #contains all *.xml abbot scripts to do GUI testing. test.input =${input}/tests/input #for miscellaneous input to junit tests. native =${input}/native #contains JNI C header file schemas =${javacode}/schemas #contains xsd schemas #----------------------------------------------------------------------- # MISCELLANEOUS #----------------------------------------------------------------------- junit.pattern1=biz/xsoftware/test/**/Test*.class junit.pattern2=**/test/Test*.class javadoc.pattern=**/*.java tool.dir=tools package.list=${tool.dir}/package-list build.sysclasspath=ignore # Change this value and I call you a complete idiot(cp = classpath) # ignore - trust build file to get the cp right # first - concatenate build file cp AFTER build runners cp # last - concatenate build runners cp AFTER build file cp #output = build.log #uncomment this to activate the logging |
From: Nobody <fas...@us...> - 2006-02-21 10:48:00
|
Update of /cvsroot/mocklib/osgimgr/input/libexclude In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/input/libexclude Added Files: framework.jar mocklib.jar servicebinder.jar Log Message: add osgimgr to mocklib project for now. --- NEW FILE: servicebinder.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: framework.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mocklib.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-21 10:48:00
|
Update of /cvsroot/mocklib/osgimgr/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023/tools Added Files: version-r1-0-1.txt Log Message: add osgimgr to mocklib project for now. --- NEW FILE: version-r1-0-1.txt --- |