All Downloads are FREE. Search and download functionalities are using the official Maven repository.

newjb.build-jb.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - JOnAS: Java(TM) Open Application Server
 - Copyright (C) 2005-2007 Bull S.A.S.
 - Contact: [email protected]
 -
 - This library is free software; you can redistribute it and/or
 - modify it under the terms of the GNU Lesser General Public
 - License as published by the Free Software Foundation; either
 - version 2.1 of the License, or any later version.
 -
 - This library is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 - Lesser General Public License for more details.
 -
 - You should have received a copy of the GNU Lesser General Public
 - License along with this library; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 - USA
 -
 - Initial developer(s): Florent BENOIT
 -
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - $Id: build-jb.xml 16981 2009-03-27 10:56:33Z fornacif $
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 -->

<!--
 -  build.xml file for creating a new JOnAS_BASE
 -->

<project name="JOnAS_BASE tools"
         default="create_jonas_base"
         basedir="."
         xmlns:jant="http://jonas.objectweb.org/ant">

  <!-- Define some properties -->
  <target name="init">

    <!-- properties -->
    <property environment="myenv" />
    <property name="jonas.root" value="${myenv.JONAS_ROOT}" />
    <property name="jonas.base" value="${myenv.JONAS_BASE}" />

    <!-- tasks classpath="${jonas.root}/lib/common/ow_jonas_ant.jar" -->

    <typedef resource="org/ow2/jonas/ant/antlib.xml"
             classpath="${jonas.root}/lib/common/ow_jonas_ant.jar"
             uri="http://jonas.objectweb.org/ant" />

    <!-- Define directories -->
    <property name="conf.dir" value="${user.home}/jb.config/conf" />

    <!-- Load user properties -->
    <property file="${conf.dir}/jonas-newjb.properties" />
    <property file="./build-jb.properties" />

  </target>

  <target name="define_jdbcra_values">
    <!-- init values for default jdbcRa -->
    <property name="db.name" value="${rajdbc.name}" />
    <jant:property name="rajdbc.user" value="rajdbc.${db.name}.user" />
    <jant:property name="rajdbc.password" value="rajdbc.${db.name}.password" />
    <jant:property name="rajdbc.url" value="rajdbc.${db.name}.url" />
    <jant:property name="rajdbc.drivername" value="rajdbc.${db.name}.drivername" />
    <jant:property name="rajdbc.jndiname" value="rajdbc.${db.name}.jndiname" />
    <jant:property name="rajdbc.maxpoolsize"
               value="rajdbc.${db.name}.maxpoolsize"
               defaultValue="100" />
    <jant:property name="rajdbc.jdbcdriverjarfile"
               value="rajdbc.${db.name}.jdbcdriverjarfile" />
    <jant:property name="rajdbc.mappername" value="rajdbc.${db.name}.mappername" />
    <!-- init the rajdbc.p6spy if it's not already done -->
    <property name="rajdbc.p6spy" value="off" />
  </target>

  <!-- New JOnAS Base-->
  <target name="create_jonas_base"
          depends="init"
          description="Create a new JOnAS Base">

    <input message="Choose your protocol : [default : ${carol.defaultprotocol}] :"
           validargs="jrmp,iiop,irmi,"
           addproperty="carol.protocol"
           defaultvalue="${carol.defaultprotocol}" />

    <input message="Choose your database : [default : ${rajdbc.defaultname}] :"
           addproperty="rajdbc.name"
           defaultvalue="${rajdbc.defaultname}" />

    <input message="Choose your WebContainer : [default : ${webcontainer.service.defaultname}] :"
           validargs="tomcat,jetty,"
           addproperty="webcontainer.service.name"
           defaultvalue="${webcontainer.service.defaultname}" />
    <antcall target="internal_create_jonas_base" />

  </target>



  <!-- Internal creation of new JOnAS Base-->
  <target name="internal_create_jonas_base" depends="init,define_jdbcra_values">
    <echo message="JONAS_ROOT = ${jonas.root} and JONAS_BASE = ${jonas.base} " />

    <jant:jonasbase jonasRoot="${jonas.root}" destDir="${jonas.base}" update="off">
      <jonasProperties services="${jonas.services}"
           securityManager="${jonas.security.manager}"
           securityPropagation="${jonas.security.propagation}"
           csiv2Propagation="${jonas.csiv2.propagation}"
           transactionPropagation="${jonas.transaction.propagation}"
           configfile="${jonas.log.configfile}" 
      	   master="${jonas.master}"	/>
      <jms port="${jms.port}"
           initialTopics="${jms.topics}"
           initialQueues="${jms.queues}" />
      <carol defaultPort="${carol.allport}"
             protocols="${carol.protocol}"
             jrmpOptimization="${carol.jrmpopt}"
               localRegistry="${carol.localregistry}"/>
      <!-- @name is optionnal, if there is only a <tomcat> inner element, tomcat service will be choosed -->
      <!-- @port is optionnal, if set it will affect both jetty6.xml and tomcat6-server.xml.
           If not set, the (tomcat|jetty)/http[@port] value is used -->
      <webcontainer name="${webcontainer.service.name}">
        <tomcat>
          <!-- Simply configure a HTTP/1.1 Connector : just set the port to use -->
          <http port="${webcontainer.port}" />
          <!-- Simply configure a Director Connector : just set the port to use
          <director port="1234" />
          -->
          <!-- Simply configure a AJP/1.3 Connector : just set the port to use
          <ajp port="2345" />
          -->
          <!-- Simply configure a HTTPS Connector : just set the port to use, the keystore and its password
          <https port="12345" keystoreFile="/path/to/your/keystore" keystorePass="changeit"/>
          -->
          <!-- Simply add a <Cluster> node into the <Host>
          <cluster listenPort="7777" mcastAddr="222.222.222.222" mcastPort="11111" />
          -->
        </tomcat>
        <jetty>
          <!-- Jetty doesn't support director and cluster sub tasks -->
          <http port="${webcontainer.port}" />
          <!--
          <ajp port="4567" />
          -->
          <!-- https for Jetty supports 2 more attributes @vm=(ibm|sun) and @keyPassword
          <https port="12345" keystoreFile="/path/to/your/keystore"
                 keystorePass="changeit" vm="sun" keyPassword="my.key.password"/>
          -->
        </jetty>
      </webcontainer>
      <db port="${db.port}" />
      <discovery sourcePort="${discovery.sourceport}"
                 greetingPort="${discovery.greetingport}"
                 mcastAddr="${discovery.mcastaddr}"
                 mcastPort="${discovery.mcastport}"
             ttl="${discovery.ttl}" />
      <jdbcRa name="db_access_jdbc1"
              mapperName="${rajdbc.mappername}"
              user="${rajdbc.user}"
              password="${rajdbc.password}"
              url="${rajdbc.url}"
              driverName="${rajdbc.drivername}"
              maxPoolSize="${rajdbc.maxpoolsize}"
              jndiName="${rajdbc.jndiname}"
              autoload="on"
              p6spy="${rajdbc.p6spy}" />
      <jdbcRa name="db_access_jdbc_xa1"
              mapperName="${rajdbc.mappername}"
              user="${rajdbc.user}"
              password="${rajdbc.password}"
              url="${rajdbc.url}"
              driverName="${rajdbc.drivername}"
              maxPoolSize="${rajdbc.maxpoolsize}"
              jndiName="jdbc_xa1"
              autoload="on"
              p6spy="${rajdbc.p6spy}" />
      <jdbcRa name="db_access_jdbc_xa2"
              mapperName="${rajdbc.mappername}"
              user="${rajdbc.user}"
              password="${rajdbc.password}"
              url="${rajdbc.url}"
              driverName="${rajdbc.drivername}"
              maxPoolSize="${rajdbc.maxpoolsize}"
              jndiName="jdbc_xa2"
              autoload="on"
              p6spy="${rajdbc.p6spy}" />
      <mail type="Session" name="${mail.session.name}" />
      <mail type="MimePartDataSource"
            name="${mail.mimepartds.name}"
            mailTo="${mail.to}"
            subject="${mail.subject}"
          host= "${mail.host}"/>
      <dbm dataSources="${rajdbc.name}" />
      <wsdlPublish>
        <!--
           <uddi name="juddi" username="jonas" password="jonas"
        orgName="ObjectWeb" orgPersonName="JOnAS"
        orgDesc="ObjectWeb Consortium (http://www.objectweb.org)"
        lifecyclemanagerURL="http://localhost:${webcontainer.port}/juddi/publish" queryManagerURL="http://localhost:${webcontainer.port}/juddi/inquiry" />-->
        <!-- encoding default = UTF-8 -->
        <file name="${wsdl.file.name}"
              dir="${wsdl.file.dir}"
              encoding="ISO-8859-1" />
      </wsdlPublish>
      <lib>
        <fileset dir="${user.home}/${drivers.dir}">
        	<include name="${rajdbc.jdbcdriverjarfile}" />
        </fileset>
      </lib>

    </jant:jonasbase>
  </target>

</project>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy