Browse Source

Merge branch '1.9.x'

closes #33 by @niggemannmj
master
Stefan Bodewig 8 years ago
parent
commit
c848ace1ed
6 changed files with 128 additions and 2 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +3
    -0
      WHATSNEW
  3. +4
    -0
      contributors.xml
  4. +41
    -2
      manual/Tasks/ejb.html
  5. +13
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
  6. +66
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/OrionDeploymentTool.java

+ 1
- 0
CONTRIBUTORS View File

@@ -233,6 +233,7 @@ Mariusz Nowostawski
Mark A. Ziesemer Mark A. Ziesemer
Mark DeLaFranier Mark DeLaFranier
Mark Hecker Mark Hecker
Mark Niggemann
Mark R. Diggory Mark R. Diggory
Mark Salter Mark Salter
Markus Kahl Markus Kahl


+ 3
- 0
WHATSNEW View File

@@ -39,6 +39,9 @@ Other changes:
override the current time/date used by <tstamp>. override the current time/date used by <tstamp>.
Bugzilla Report 61079 Bugzilla Report 61079


* added Orion support to ejbjar
Github Pull Request #33

Changes from Ant 1.10.0 TO Ant 1.10.1 Changes from Ant 1.10.0 TO Ant 1.10.1
===================================== =====================================




+ 4
- 0
contributors.xml View File

@@ -959,6 +959,10 @@
<middle>R.</middle> <middle>R.</middle>
<last>Diggory</last> <last>Diggory</last>
</name> </name>
<name>
<first>Mark</first>
<last>Niggemann</last>
</name>
<name> <name>
<first>Mark</first> <first>Mark</first>
<middle>A.</middle> <middle>A.</middle>


+ 41
- 2
manual/Tasks/ejb.html View File

@@ -61,6 +61,8 @@ In general these tasks are specific to the particular vendor's EJB Server.</p>
Application Server 6.0</li> Application Server 6.0</li>
<li><a href="http://www.jboss.org/" target="_top"> <li><a href="http://www.jboss.org/" target="_top">
JBoss 2.1</a> and above EJB servers</li> JBoss 2.1</a> and above EJB servers</li>
<li><a href="http://web.archive.org/web/20080516210506/http://www.ironflare.com/">
Orion Application Server</a> 2.0 <em>since 1.10.2</em></li>
<li><a href="http://www.bea.com" target="_top">Weblogic</a> <li><a href="http://www.bea.com" target="_top">Weblogic</a>
4.5.1 through to 7.0 EJB servers</li> 4.5.1 through to 7.0 EJB servers</li>
<li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a> <li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a>
@@ -81,14 +83,15 @@ In general these tasks are specific to the particular vendor's EJB Server.</p>
<tr><td>Task</td><td colspan="2">Application Servers</td></tr> <tr><td>Task</td><td colspan="2">Application Servers</td></tr>
<tr><td><a href="BorlandGenerateClient.html">blgenclient</a></td><td colspan="2">Borland Application Server 4.5 and 5.x</td></tr> <tr><td><a href="BorlandGenerateClient.html">blgenclient</a></td><td colspan="2">Borland Application Server 4.5 and 5.x</td></tr>
<tr><td><a href="#iplanet-ejbc">iplanet-ejbc</a></td><td colspan="2">iPlanet Application Server 6.0</td></tr> <tr><td><a href="#iplanet-ejbc">iplanet-ejbc</a></td><td colspan="2">iPlanet Application Server 6.0</td></tr>
<tr><td rowspan="7"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr>
<tr><td rowspan="8"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr>
<tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5 and 5.x</td></tr> <tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5 and 5.x</td></tr>
<tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr> <tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr>
<tr><td><a href="#ejbjar_jboss">jboss</a></td><td>JBoss</td></tr> <tr><td><a href="#ejbjar_jboss">jboss</a></td><td>JBoss</td></tr>
<tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4.x and 2.5</td></tr> <tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4.x and 2.5</td></tr>
<tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 to 7.0</td></tr> <tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 to 7.0</td></tr>
<tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr> <tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr>
<tr><td><a href="#ejbjar_orion">orion</a></td><td>IronFlare(Oracle) Orion Application Server 2.0.6</td></tr>

</table> </table>


<hr> <hr>
@@ -562,6 +565,7 @@ include: </p>
<li>IBM WebSphere 4.0</li> <li>IBM WebSphere 4.0</li>
<li>TOPLink for WebLogic 2.5.1-enabled entity beans</li> <li>TOPLink for WebLogic 2.5.1-enabled entity beans</li>
<li><a href="http://www.objectweb.org/jonas/">JOnAS</a> 2.4.x and 2.5 Open Source EJB server</li> <li><a href="http://www.objectweb.org/jonas/">JOnAS</a> 2.4.x and 2.5 Open Source EJB server</li>
<li>IronFlare Orion Application Server 2.0</li>
</ul> </ul>




@@ -1770,7 +1774,42 @@ descriptors to use the naming standard. This will create only one ejb jar file -
</pre> </pre>




<h3><a name="ejbjar_orion">Orion element</a></h3>

<p>The orion element searches for the Orion Application Server specific deployment descriptors and adds them
to the final ejb jar file. Orion has one deployment descriptor:
<ul><li>orion-ejb-jar.xml</li>
</ul>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">destdir</td>
<td valign="top">The base directory into which the generated
jar files are deposited. Jar files are deposited in
directories corresponding to their location within the
descriptordir namespace. </td>
<td valign="top" align="center">Yes</td>
</tr>
</table>

<h3>Example</h3>


<pre>
&lt;ejbjar srcdir="${build.classes}"
descriptordir="${descriptor.dir}"
basejarname="TheEJBJar"
flatdestdir="true"
dependency="super"
genericjarsuffix=".jar"&gt;
&lt;include name="**/*-ejb-jar.xml"/&gt;
&lt;orion destdir="${deploymentjars.dir}"\&gt;
&lt;/ejbjar&gt;
</pre>


</body> </body>




+ 13
- 0
src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java View File

@@ -223,6 +223,19 @@ public class EjbJar extends MatchingTask {
deploymentTools.add(deploymentTool); deploymentTools.add(deploymentTool);
} }


/**
* Create a orion nested element used to configure a
* deployment tool for Orion server.
*
* @return the deployment tool instance to be configured.
* @since Ant 1.10.2
*/
public OrionDeploymentTool createOrion() {
OrionDeploymentTool tool = new OrionDeploymentTool();
addDeploymentTool(tool);
return tool;
}

/** /**
* Adds a deployment tool for Weblogic server. * Adds a deployment tool for Weblogic server.
* *


+ 66
- 0
src/main/org/apache/tools/ant/taskdefs/optional/ejb/OrionDeploymentTool.java View File

@@ -0,0 +1,66 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/

package org.apache.tools.ant.taskdefs.optional.ejb;

import java.io.File;
import java.util.Hashtable;
import org.apache.tools.ant.Project;

/**
* The deployment tool to add the orion specific deployment descriptor to the
* ejb jar file. Orion only requires one additional file orion-ejb-jar.xml
* and does not require any additional compilation.
*
* @since Ant 1.10.2
* @see EjbJar#createOrion
*/

public class OrionDeploymentTool extends GenericDeploymentTool {

protected static final String ORION_DD = "orion-ejb-jar.xml";


/** Instance variable that stores the suffix for the jboss jarfile. */
private String jarSuffix = ".jar";

/**
* Add any vendor specific files which should be included in the
* EJB Jar.
*/
protected void addVendorFiles(Hashtable ejbFiles, String baseName) {
String ddPrefix = (usingBaseJarName() ? "" : baseName );
File orionDD = new File(getConfig().descriptorDir, ddPrefix + ORION_DD);

if (orionDD.exists()) {
ejbFiles.put(META_DIR + ORION_DD, orionDD);
} else {
log("Unable to locate Orion deployment descriptor. It was expected to be in " + orionDD.getPath(), Project.MSG_WARN);
return;
}

}

/**
* Get the vendor specific name of the Jar that will be output. The modification date
* of this jar will be checked against the dependent bean classes.
*/
File getVendorOutputJarFile(String baseName) {
return new File(getDestDir(), baseName + jarSuffix);
}
}

Loading…
Cancel
Save