You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by do...@apache.org on 2001/11/10 21:37:18 UTC
cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/tasks Sar.java
donaldp 01/11/10 12:37:18
Modified: src/java/org/apache/avalon/phoenix/tools/tasks Sar.java
Log:
Update sar task so that it stores the environmental information in SAR-INF/environment.xml rather than SAR-INF/server.xml so as to be in line with latest Phoenix deployment format.
Revision Changes Path
1.6 +16 -10 jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/tasks/Sar.java
Index: Sar.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/tasks/Sar.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Sar.java 2001/10/22 13:52:26 1.5
+++ Sar.java 2001/11/10 20:37:18 1.6
@@ -23,7 +23,7 @@
{
private File m_config;
private File m_assembly;
- private File m_server;
+ private File m_environment;
public Sar()
{
@@ -68,16 +68,22 @@
public void setServer( final File server )
{
- m_server = server;
+ System.err.println( "DEPRECATED: Server attribute of sar task is deprecated" );
+ setEnvironment( server );
+ }
+
+ public void setEnvironment( final File environment )
+ {
+ m_environment = environment;
- if( !m_server.exists() )
+ if( !m_environment.exists() )
{
- throw new BuildException( "Server descriptor: " + m_server + " does not exist." );
+ throw new BuildException( "Environment descriptor: " + m_environment + " does not exist." );
}
- if( !m_server.isFile() )
+ if( !m_environment.isFile() )
{
- throw new BuildException( "Server descriptor: " + m_server + " is not a file." );
+ throw new BuildException( "Environment descriptor: " + m_environment + " is not a file." );
}
}
@@ -97,14 +103,14 @@
{
throw new BuildException( "assembly attribute is required", location );
}
- if( null == m_server )
+ if( null == m_environment )
{
- throw new BuildException( "server attribute is required", location );
+ throw new BuildException( "environment attribute is required", location );
}
pushFile( "SAR-INF/config.xml", m_config );
pushFile( "SAR-INF/assembly.xml", m_assembly );
- pushFile( "SAR-INF/server.xml", m_server );
+ pushFile( "SAR-INF/environment.xml", m_environment );
super.execute();
}
@@ -124,6 +130,6 @@
m_config = null;
m_assembly = null;
- m_server = null;
+ m_environment = null;
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>