hammant 2002/09/30 23:43:14
Modified: . build.xml
Added: src/test/org/apache/avalon/phoenix/tools/metagenerate/test
IntegrationTestCase.java TestBlock.java
TestMBean.java TestNonBlock.java
Removed: src/java/org/apache/avalon/phoenix/metagenerate
AbstractHelper.java ManifestFactory.java
ManifestHelper.java MetaGenerateQdoxTask.java
MxinfoFactory.java MxinfoHelper.java
NamedXmlSnippet.java XinfoFactory.java
XinfoHelper.java
Log:
Move to tools directory
Revision Changes Path
1.173 +6 -5 jakarta-avalon-phoenix/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-phoenix/build.xml,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- build.xml 1 Oct 2002 06:20:25 -0000 1.172
+++ build.xml 1 Oct 2002 06:43:14 -0000 1.173
@@ -241,11 +241,11 @@
<target name="test-generate">
- <taskdef name="generatemeta"
classname="org.apache.avalon.phoenix.metagenerate.MetaGenerateQdoxTask">
+ <taskdef name="generatemeta"
classname="org.apache.avalon.phoenix.tools.metagenerate.MetaGenerateQdoxTask">
<classpath refid="test.class.path" />
</taskdef>
- <generatemeta dest="${build.test-metagenerate}"
manifestName="TestManifest.mf">
+ <generatemeta dest="${build.test-metagenerate}">
<fileset dir="src/test">
<include name="**/*.java"/>
</fileset>
@@ -328,11 +328,11 @@
<mkdir dir="${build.metagenerate}"/>
- <taskdef name="generatemeta"
classname="org.apache.avalon.phoenix.metagenerate.MetaGenerateQdoxTask">
+ <taskdef name="generatemeta"
classname="org.apache.avalon.phoenix.tools.metagenerate.MetaGenerateQdoxTask">
<classpath refid="project.class.path" />
</taskdef>
- <generatemeta dest="${build.metagenerate}"
manifestName="PhoenixManifest.mf">
+ <generatemeta dest="${build.metagenerate}">
<fileset dir="${java.dir}">
<include name="**/*.java"/>
</fileset>
@@ -351,6 +351,7 @@
<include name="org/apache/avalon/phoenix/metainfo/**"/>
<include name="org/apache/avalon/phoenix/metadata/**"/>
<include name="org/apache/avalon/phoenix/tools/**"/>
+ <exclude name="org/apache/avalon/phoenix/tools/metagenerate/**"/>
</jar>
<jar jarfile="${build.lib}/phoenix-loader.jar"
@@ -389,7 +390,7 @@
</jar>
<jar jarfile="${build.lib}/phoenix-metagenerate.jar"
basedir="${build.classes}">
- <include name="org/apache/avalon/phoenix/metagenerate/**"/>
+ <include name="org/apache/avalon/phoenix/tools/metagenerate/**"/>
</jar>
</target>
1.1
jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/tools/metagenerate/test/IntegrationTestCase.java
Index: IntegrationTestCase.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.phoenix.tools.metagenerate.test;
import junit.framework.TestCase;
import java.io.FileReader;
import java.io.File;
import java.io.LineNumberReader;
import java.io.FileNotFoundException;
public class IntegrationTestCase extends TestCase
{
public IntegrationTestCase(String name)
{
super(name);
}
public void testBlockInfoOutput() throws Exception
{
String fileName
=
"org/apache/avalon/phoenix/tools/metagenerate/test/TestBlock.xinfo";
fileName.replace('\\',File.separatorChar);
fileName.replace('/',File.separatorChar);
LineNumberReader reader = null;
try
{
reader = new LineNumberReader(new FileReader(fileName));
}
catch (FileNotFoundException e)
{
fail("The generated xinfo file is missing");
}
String line = reader.readLine();
int ix =0;
while (line != null)
{
assertEquals("Line not expected", XINFO[ix].trim(), line.trim());
ix++;
line = reader.readLine();
}
}
public void testNonBlockInfoOutput() throws Exception
{
String fileName
=
"org/apache/avalon/phoenix/tools/metagenerate/test/TestNonBlock.xinfo";
fileName.replace('\\',File.separatorChar);
fileName.replace('/',File.separatorChar);
try
{
new LineNumberReader(new FileReader(fileName));
fail("Non Block should not generate an xinfo file");
}
catch (FileNotFoundException e)
{
// expected.
}
}
public void testMBeanOutput() throws Exception
{
String fileName
=
"org/apache/avalon/phoenix/tools/metagenerate/test/TestMBean.mxinfo";
fileName.replace('\\',File.separatorChar);
fileName.replace('/',File.separatorChar);
LineNumberReader reader = null;
try
{
reader = new LineNumberReader(new FileReader(fileName));
}
catch (FileNotFoundException e)
{
fail("The generated mxinfo file was missing");
}
String line = reader.readLine();
int ix =0;
while (line != null)
{
assertEquals("Line not expected", MXINFO[ix].trim(), line.trim());
ix++;
line = reader.readLine();
}
}
private static final String XINFO[] = new String[] {
" <?xml version=\"1.0\"?>",
" <!DOCTYPE blockinfo PUBLIC \"-//PHOENIX/Block Info DTD Version 1.0//EN\"",
"
\"http://jakarta.apache.org/avalon/dtds/phoenix/blockinfo_1_0.dtd\">",
"",
" <blockinfo>",
"",
" <!-- section to describe block -->",
" <block>",
" <version>1.0</version>",
" </block>",
"",
" <!-- services that are offered by this block -->",
" <services>",
" <service name=\"blah.BlahService\"/>",
" </services>",
"",
" <!-- interfaces that may be exported to manange this block -->",
" <management-access-points>",
" <service name=\"YeeeHaaa\"/>",
" </management-access-points>",
"",
" <!-- services that are required by this block -->",
" <dependencies>",
" <dependency>",
" <service name=\"blah.OtherBlahService\"/>",
" </dependency>",
" </dependencies>",
" </blockinfo>" };
private static final String MXINFO[] = new String[] {
"<?xml version=\"1.0\"?>",
"<!DOCTYPE mxinfo PUBLIC \"-//PHOENIX/Mx Info DTD Version 1.0//EN\"",
"
\"http://jakarta.apache.org/avalon/dtds/phoenix/mxinfo_1_0.dtd\">",
"",
"<mxinfo>",
"",
" <topic name=\"Greeting\" >",
"",
" <!-- attributes -->",
" <attribute",
" name=\"greeting\"",
" description=\"The greeting that is returned to each HTTP request\"",
" type=\"void\"",
" />",
"",
" <!-- operations -->",
"",
" <operation",
" name=\"someOperation\"",
" description=\"Blah Blah Blah Blah.\"",
" type=\"java.lang.String\">",
" <param",
" name=\"parm1\"",
" description=\"parameter one\"",
" type=\"java.lang.String\"",
" />",
" <param",
" name=\"parm2\"",
" description=\"parameter two\"",
" type=\"java.lang.String\"",
" />",
" </operation>",
"",
" </topic>",
"",
"</mxinfo>" };
}
1.1
jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/tools/metagenerate/test/TestBlock.java
Index: TestBlock.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.avalon.phoenix.tools.metagenerate.test;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
/**
* Blah!
*
* @phoenix:block
* @phoenix:service name="blah.BlahService"
* @phoenix:mx name="YeeeHaaa"
*
*/
public class TestBlock implements Serviceable
{
/**
* @phoenix:dependency name="blah.OtherBlahService"
*/
public void service( final ServiceManager serviceManager )
throws ServiceException
{
}
}
1.1
jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/tools/metagenerate/test/TestMBean.java
Index: TestMBean.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.phoenix.tools.metagenerate.test;
/**
* Specifies methods to export via Management interface.
*
* @phoenix:mx-topic name="Greeting"
*
* @author Huw Roberts <[EMAIL PROTECTED]>
* @version 1.0
*/
public interface TestMBean
{
/**
* The greeting that is returned to each HTTP request
*
* @phoenix:mx-attribute
*/
public void setGreeting( final String greeting );
/**
* Gets the greeting that is returned to each HTTP request
*
*/
String getGreeting();
/**
* Blah Blah
* Blah Blah.
*
* @param parm1 parameter one
* @param parm2 parameter two
* @return some return thing
* @phoenix:mx-operation
*/
String someOperation( final String parm1, final String parm2 );
}
1.1
jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/tools/metagenerate/test/TestNonBlock.java
Index: TestNonBlock.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.avalon.phoenix.tools.metagenerate.test;
public class TestNonBlock
{
public void service() {
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>