hammant 2003/04/27 08:53:56
Modified: . build.xml
src/example/org/apache/altrmi/examples/blockpublishing
AltrmiHelloWorldServer.java
AltrmiHelloWorldServerImpl.java
Added: src/example/org/apache/altrmi/examples/blockpublishing
AltrmiHelloWorldServerImpl.xinfo
HelloWorldServerImpl.xinfo
src/conf publishing-demo-assembly.xml
publishing-demo-config.xml
publishing-demo-environment.xml
Removed: src/example/org/apache/altrmi/examples/blockpublishing
AltrmiHelloWorldServerImpl.xml
HelloWorldServerImpl.xml
Log:
SAR file built correctly
Revision Changes Path
1.13 +87 -5 incubator-altrmi/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/incubator-altrmi/build.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- build.xml 18 Apr 2003 09:41:45 -0000 1.12
+++ build.xml 27 Apr 2003 15:53:55 -0000 1.13
@@ -141,6 +141,32 @@
</target>
+ <!-- Compiles the example source code -->
+ <target name="compile-examples" depends="prepare" description="Compiles
the example source code">
+
+ <mkdir dir="${build.dir}/example-classes"/>
+
+ <!-- Compile all classes excluding the tests. -->
+ <javac srcdir="${src.dir}/example"
+ destdir="${build.dir}/example-classes"
+ debug="${build.debug}"
+ optimize="${build.optimize}"
+ deprecation="${build.deprecation}"
+ target="1.2">
+ <classpath refid="clover.classpath"/>
+ <classpath refid="project.class.path"/>
+ <include name="**/*.java"/>
+ </javac>
+
+ <!-- copy resources to same location as .class files -->
+ <copy todir="${build.dir}/example-classes">
+ <fileset dir="${src.dir}/example">
+ <include name="**/*.xinfo"/>
+ </fileset>
+ </copy>
+
+ </target>
+
<!-- Compiles the unit test source code -->
<target name="compile-test" depends="compile" description="Compiles the
source code">
<mkdir dir="${build.testsrc}"/>
@@ -214,7 +240,7 @@
</target>
<!-- Creates all the .jar file -->
- <target name="jar" depends="compile, metagenerate, block-jar"
description="Generates the jar files">
+ <target name="jars" depends="compile, metagenerate, block-jar"
description="Generates the jar files">
<mkdir dir="${build.lib}"/>
@@ -469,7 +495,7 @@
<!-- Creates the distribution -->
<target name="dist"
- depends="jar, test-reports, checkstyle-report, docs, javadocs"
+ depends="jars, test-reports, checkstyle-report, docs, javadocs"
description="Generates a distribution (jar + docs + javadocs + unit
tests + checkstyle reports)">
<mkdir dir="${dist.dir}"/>
@@ -513,7 +539,7 @@
</target>
<!-- Creates a mini jar-only distribution -->
- <target name="dist-jar" depends="jar">
+ <target name="dist-jar" depends="jars">
<mkdir dir="${dist.dir}"/>
<copy todir="${dist.dir}">
<fileset dir="${build.lib}">
@@ -522,6 +548,62 @@
</copy>
</target>
+ <target name="publishing-demo-sar" depends="jars, compile-examples"
description="Create the AltRMI demo SAR">
+
+ <mkdir dir="${build.dir}/demo-genjava"/>
+ <mkdir dir="${build.dir}/demo-genclasses"/>
+
+ <taskdef name="altrmiproxies"
classname="org.apache.altrmi.generator.ant.ProxyGenerationTask">
+ <classpath refid="project.class.path"/>
+ </taskdef>
+
+ <altrmiproxies genname="helloworld"
srcgendir="${build.dir}/demo-genjava"
+
interfaces="org.apache.altrmi.examples.blockpublishing.HelloWorldServer"
+ classgendir="${build.dir}/demo-genclasses">
+ <classpath refid="project.class.path"/>
+ <classpath>
+ <pathelement path="${build.dir}/example-classes"/>
+ </classpath>
+ </altrmiproxies>
+
+ <jar jarfile="${build.lib}/publishing-helloworld.jar">
+ <fileset dir="${build.dir}/example-classes">
+ <include
name="org/apache/altrmi/examples/blockpublishing/*"/>
+ <exclude
name="org/apache/altrmi/examples/blockpublishing/AltrmiHelloWorldServerTester"/>
+ </fileset>
+ <fileset dir="${build.dir}/demo-genclasses">
+ <include name="*"/>
+ </fileset>
+
+ </jar>
+
+ <taskdef name="sar"
classname="org.apache.avalon.phoenix.tools.tasks.Sar">
+ <classpath refid="project.class.path"/>
+ </taskdef>
+
+ <sar sarfile="${build.lib}/publishing-demo.sar"
+ config="${src.dir}/conf/publishing-demo-config.xml"
+ environment="${src.dir}/conf/publishing-demo-environment.xml"
+ assembly="${src.dir}/conf/publishing-demo-assembly.xml">
+
+ <lib dir="${build.lib}/">
+ <include name="publishing-helloworld.jar"/>
+ </lib>
+
+ <lib dir="${build.lib}">
+ <include name="altrmi-common-${altrmi.ver}.jar"/>
+ <include name="altrmi-server-interfaces-${altrmi.ver}.jar"/>
+ <include name="altrmi-server-impl-${altrmi.ver}.jar"/>
+ <include name="altrmi-generator-${altrmi.ver}.jar"/>
+ <include name="altrmi-blocks-${altrmi.ver}.jar"/>
+ <include name="altrmi-registry-${altrmi.ver}.jar"/>
+ </lib>
+
+ </sar>
+
+ </target>
+
+
<!-- Creates a minimal distribution -->
<target name="dist.lite"
depends="dist-jar, test, javadocs"
@@ -555,12 +637,12 @@
<mkdir dir="../incubator-site/build/site/projects/altrmi"/>
<copy todir="../incubator-site/build/site/projects/altrmi">
- <fileset dir="build/site">
+ <fileset dir="${build.dir}/site">
<include name="**"/>
</fileset>
<!--
** pending resolution on api docs on site issue **
- <fileset dir="build/docs">
+ <fileset dir="${build.dir}/docs">
<include name="api/**"/>
</fileset>
-->
1.2 +1 -1
incubator-altrmi/src/example/org/apache/altrmi/examples/blockpublishing/AltrmiHelloWorldServer.java
Index: AltrmiHelloWorldServer.java
===================================================================
RCS file:
/home/cvs/incubator-altrmi/src/example/org/apache/altrmi/examples/blockpublishing/AltrmiHelloWorldServer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AltrmiHelloWorldServer.java 26 Apr 2003 13:05:25 -0000 1.1
+++ AltrmiHelloWorldServer.java 27 Apr 2003 15:53:55 -0000 1.2
@@ -60,5 +60,5 @@
*/
public interface AltrmiHelloWorldServer
{
- String ROLE = AltrmiHelloWorldServer.class.getName();
+ String ROLE =
"org.apache.altrmi.examples.blockpublishing.AltrmiHelloWorldServer";
}
1.2 +0 -3
incubator-altrmi/src/example/org/apache/altrmi/examples/blockpublishing/AltrmiHelloWorldServerImpl.java
Index: AltrmiHelloWorldServerImpl.java
===================================================================
RCS file:
/home/cvs/incubator-altrmi/src/example/org/apache/altrmi/examples/blockpublishing/AltrmiHelloWorldServerImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AltrmiHelloWorldServerImpl.java 26 Apr 2003 13:05:25 -0000 1.1
+++ AltrmiHelloWorldServerImpl.java 27 Apr 2003 15:53:56 -0000 1.2
@@ -65,8 +65,6 @@
import org.apache.altrmi.server.Publisher;
/**
- * @phoenix:block
- *
* This demo Server applications shows the use of AltRMI to publish the
* HelloWorld block's API to clients over TCP/IP.
*
@@ -96,7 +94,6 @@
public void initialize() throws Exception
{
- // being phased out.
m_publisher.publish( m_helloWorldServer, m_publicationName,
HelloWorldServer.class );
getLogger().info( "HelloWorldServer published as " +
m_publicationName );
// This is only to help newbies.....
1.1
incubator-altrmi/src/example/org/apache/altrmi/examples/blockpublishing/AltrmiHelloWorldServerImpl.xinfo
Index: AltrmiHelloWorldServerImpl.xinfo
===================================================================
<?xml version="1.0"?>
<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
"http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">
<blockinfo>
<!-- section to describe block -->
<block>
<version>1.0</version>
</block>
<!-- No services are offered by this block -->
<services/>
<dependencies>
<dependency>
<service name="org.apache.excalibur.altrmi.server.Publisher"/>
</dependency>
<dependency>
<service
name="org.apache.altrmi.examples.blockpublishing.HelloWorldServer"/>
</dependency>
</dependencies>
</blockinfo>
1.1
incubator-altrmi/src/example/org/apache/altrmi/examples/blockpublishing/HelloWorldServerImpl.xinfo
Index: HelloWorldServerImpl.xinfo
===================================================================
<?xml version="1.0"?>
<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
"http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">
<blockinfo>
<!-- section to describe block -->
<block>
<version>1.0</version>
</block>
<!-- No services are offered by this block -->
<services/>
<dependencies>
</dependencies>
</blockinfo>
1.1 incubator-altrmi/src/conf/publishing-demo-assembly.xml
Index: publishing-demo-assembly.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE assembly PUBLIC "-//PHOENIX/Assembly DTD Version 1.0//EN"
"http://jakarta.apache.org/avalon/dtds/phoenix/assembly_1_0.dtd">
<assembly>
<!-- The Connection Manager block -->
<block
class="org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager"
name="connections">
<provide name="thread-manager"
role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- The ThreadManager block -->
<block
class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager"
name="thread-manager" />
<!-- The Socket Manager block -->
<block
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager"
name="sockets" />
<!-- -->
<!-- Below is publication and publication -->
<!-- -->
<block class="org.apache.altrmi.blocks.authentication.DefaultAuthenticator"
name="altrmi-authenticator" >
</block>
<block class="org.apache.altrmi.blocks.publishing.SocketStreamPublisher"
name="altrmi-publisher" >
<provide name="sockets"
role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager" />
<provide name="altrmi-authenticator"
role="org.apache.altrmi.server.Authenticator"/>
</block>
<!-- -->
<!-- Below this section are the demo blocks -->
<!-- -->
<block
class="org.apache.altrmi.examples.blockpublisher.HelloWorldServerImpl"
name="helloworldserver" >
<!-- needs nothing -->
</block>
<block
class="org.apache.altrmi.examples.blockpublisher.AltrmiHelloWorldServerImpl"
name="helloworldserver-publisher">
<provide name="helloworldserver"
role="org.apache.altrmi.examples.blockpublisher.HelloWorldServer"/>
</block>
</assembly>
1.1 incubator-altrmi/src/conf/publishing-demo-config.xml
Index: publishing-demo-config.xml
===================================================================
<?xml version="1.0"?>
<config>
<thread-manager>
<thread-group>
<name>default</name>
<!-- normal priority == 5, max-priority = 10 -->
<priority>5</priority>
<!-- are threads deamon threads ? -->
<is-daemon>false</is-daemon>
<max-threads>40</max-threads>
<!-- these are ignored at the moment but will be fixed in later
revisions -->
<min-threads>20</min-threads>
<min-spare-threads>20</min-spare-threads>
</thread-group>
</thread-manager>
<sockets>
<server-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"
/>
</server-sockets>
<client-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory" />
</client-sockets>
</sockets>
<helloworldserver/>
<helloworldserver-publisher/>
<altrmi-publisher>
<port>8666</port>
<bind>127.0.0.1</bind>
<socketObjectStreamHandler>
<connectiontimeout>360000</connectiontimeout>
</socketObjectStreamHandler>
<classRetrieverType>jarFile</classRetrieverType>
<socketStreamServerClass>org.apache.altrmi.server.impl.socket.PartialSocketObjectStreamServer</socketStreamServerClass>
<generatedClassJarURLs>./HelloWorldAltrmiProxy.jar</generatedClassJarURLs>
</altrmi-publisher>
<altrmi-authenticator>
</altrmi-authenticator>
</config>
1.1 incubator-altrmi/src/conf/publishing-demo-environment.xml
Index: publishing-demo-environment.xml
===================================================================
<?xml version="1.0"?>
<environment>
<logs>
<category name="" target="default" priority="DEBUG" />
<category name="objectstorage" target="objectstorage-target"
priority="DEBUG" />
<log-target name="default" location="/logs/avalon-demo.log" />
<log-target name="objectstorage-target"
location="/logs/objectstorage.log" />
</logs>
</environment>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]