ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18795] New: - Pathconvert strange behavior
Date Tue, 08 Apr 2003 05:42:12 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18795>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18795

Pathconvert strange behavior

           Summary: Pathconvert strange behavior
           Product: Ant
           Version: 1.5.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Build Process
        AssignedTo: dev@ant.apache.org
        ReportedBy: java@enerpred.ru


Hi. I have such build script:
==================build.xml========================
<project name="agapi" default="dist" basedir=".">
    <property file=".ant.properties"/>

    <property name="build.dir" value="${basedir}/build"/>
    <property name="src.dir" value="${basedir}/src"/>
    <property name="jboss.client" value="${jboss.home}/client"/>
    <property name="jboss.lib" value="${jboss.home}/lib"/>
    <property name="build.x.dir" value="${build.dir}/classes"/>

    <fileset id="hibernate.mapfiles" dir="${build.x.dir}">
        <include name="**/*.hbm.xml"/>
    </fileset>


    <path id="ejb.base.path">
        <pathelement location="${jboss.client}/jboss-j2ee.jar"/>
        <pathelement location="${jboss.client}/jboss-client.jar"/>
        <pathelement location="${jboss.client}/jnp-client.jar"/>
        <pathelement location="${jboss.client}/jbossmq-client.jar"/>
        <pathelement location="${jboss.client}/jbosssx-client.jar"/>
        <pathelement location="${jboss.client}/concurrent.jar"/>
        <pathelement location="${jboss.client}/jaas.jar"/>
        <pathelement location="${jboss.lib}/jboss-jmx.jar"/>
        <pathelement location="${jboss.lib}/jboss-common.jar"/>
        <pathelement location="${jboss.home}/server/
${jboss.configuration}/lib/jbosssx.jar"/>
        <pathelement location="${jboss.home}/server/
${jboss.configuration}/lib/mail.jar"/>
        <pathelement location="${jboss.home}/server/
${jboss.configuration}/lib/jnet.jar"/>
    </path>

    <path id="xdoclet.path">
        <pathelement location="${ant.home}/lib/ant.jar"/>
        <fileset dir="${xdoclet.home}/lib">
            <include name="**/*.jar"/>
        </fileset>
    </path>

    <path id="oracle.path">
        <fileset dir="${basedir}/lib">
            <include name="**/oracle/*.jar"/>
        </fileset>
    </path>

    <path id="hibernate.path">
        <pathelement location="${hibernate.home}/hibernate2.jar"/>
        <fileset dir="${hibernate.home}/lib">
            <include name="**/*.jar"/>
        </fileset>
    </path>


    <target name="init">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.x.dir}"/>
        <mkdir dir="${build.dir}/generated"/>
        <mkdir dir="${build.dir}/META-INF"/>
    </target>

    <target name="dist" depends="clean,init,xdoclet-generate,compile,hibernate-
generate,jar-beans,jar-server,jar-client,deploy"/>

    <target name="compile" depends="init,xdoclet-generate">
        <javac
            destdir="${build.x.dir}"
            debug="on"
            deprecation="off"
            optimize="on">
            <src path="${src.dir}"/>
            <src path="${build.dir}/generated"/>
            <classpath>
                <path refid="hibernate.path"/>
                <path refid="xdoclet.path"/>
                <path refid="ejb.base.path"/>
            </classpath>
        </javac>
    </target>

    <target name="hibernate-generate" depends="compile">
        <taskdef name="hibernatedoclet" 
classname="xdoclet.modules.hibernate.HibernateDocletTask">
            <classpath refid="xdoclet.path"/>
        </taskdef>
        <hibernatedoclet
            destdir="${build.x.dir}"
            excludedtags="@version,@author,@todo"
            force="true"
            mergedir="${build.dir}"
            verbose="true">

            <fileset dir="${src.dir}">
                <exclude name="enerprom/agapi/metadata/**/*Abstract*"/>
                <include name="enerprom/agapi/metadata/**/*.java"/>
            </fileset>
            <hibernate version="2.0"/>

        </hibernatedoclet>
    </target>

    <target name="xdoclet-generate">
        <taskdef name="ejbdoclet" 
classname="xdoclet.modules.ejb.EjbDocletTask">
            <classpath>
                <path refid="ejb.base.path"/>
                <path refid="xdoclet.path"/>
            </classpath>
        </taskdef>
        <ejbdoclet
            destdir="${build.dir}/generated"
            excludedtags="@version,@author"
            ejbspec="${ejb.version}"
            verbose="true"
            force="${xdoclet.force}">

            <fileset dir="${src.dir}">
                <include name="**/*Bean.java"/>
            </fileset>
            <packageSubstitution packages="session,persistence,entity" 
substituteWith="interfaces"/>
            <!-- <valueobject/> -->
            <dataobject/>
            <remoteinterface/>
            <homeinterface/>

            <localinterface/>
            <localhomeinterface/>

            <entitypk/>
            <entitybmp/>
            <entitycmp/>

            <deploymentdescriptor destdir="${build.dir}/META-INF"/>
            <jboss version="${jboss.version}"
                destdir="${build.dir}/META-INF"
                validateXml="false"/>
        </ejbdoclet>
    </target>

    <target name="jar-beans" depends="compile">
        <jar jarfile="${basedir}/agapiBeans.jar">
            <fileset dir="${build.x.dir}">
                <exclude name="enerprom/agapi/client/"/>
                <exclude name="enerprom/agapi/metadata/"/>
                <include name="**"/>
            </fileset>
            <fileset dir="${build.dir}" includes="META-INF/**"/>
        </jar>
    </target>

    <target name="jar-server" depends="compile">
        <jar jarfile="${basedir}/agapipersist.sar">
            <fileset dir="${build.x.dir}">
                <include name="enerprom/agapi/metadata/"/>
            </fileset>
            <fileset dir="${src.dir}" includes="META-INF/jboss-service.xml"/>
        </jar>
    </target>

    <target name="jar-client" depends="compile">
        <jar jarfile="${basedir}/agapiClient.jar">
            <fileset dir="${build.x.dir}">
                <include name="enerprom/agapi/client/"/>
            </fileset>
            <fileset dir="${build.dir}" includes="META-INF/**"/>
        </jar>
    </target>

    <path id="hibernate.classpath">
        <path refid="hibernate.path"/>
        <path refid="oracle.path"/>
        <pathelement location="${build.x.dir}"/>
    </path>

    <target name="initdb" depends="compile">
        <pathconvert refid="hibernate.mapfiles" property="tmp1" pathsep=" "/>
        <java classname="net.sf.hibernate.tool.hbm2ddl.SchemaExport" 
fork="true">
            <classpath refid="hibernate.classpath"/>
            <arg path="${tmp1}"/>
        </java>
    </target>


    <target name="deploy">
        <copy todir="${jboss.home}/server/default/deploy">
            <fileset dir="${basedir}">
                <include name="agapipersist.sar"/>
                <include name="agapiBeans.jar"/>
            </fileset>
        </copy>
    </target>


    <target name="clean">
        <delete dir="${build.dir}"/>
        <delete file="${basedir}/*.jar"/>
    </target>


</project>
=====================build.xml=============================

And here, some log from ant -v initdb :
=====================log===================================
Apache Ant version 1.5.3Beta1 compiled on March 24 2003
Buildfile: build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.1_01\jre
Detected OS: Windows XP
parsing buildfile build.xml with URI = file:C:/JAVA/PRJ/agapi/build.xml
Project base dir set to: C:\JAVA\PRJ\agapi
 [property] Loading C:\JAVA\PRJ\agapi\.ant.properties
Override ignored for property ant.home
Build sequence for target `initdb' is [init, xdoclet-generate, compile, initdb]
Complete build sequence is [init, xdoclet-generate, compile, initdb, jar-
beans, deploy, clean, hibernate-generate, jar-server, jar-client, dist]

init:

xdoclet-generate:
dropping C:\JSERVER\jboss-3.0.6\client\jaas.jar from path as it doesn't exist

compile:
    [javac] addProp2Hib.bat skipped - don't know how to handle it
    [javac] enerprom\agapi\client\AbstractReferenceFrame.java omitted as 
enerprom/agapi/client/AbstractReferenceFrame.class is up to date.
    [javac] enerprom\agapi\client\BeanFactory.java omitted as 
enerprom/agapi/client/BeanFactory.class is up to date.
    [javac] enerprom\agapi\client\BossClient.java omitted as 
enerprom/agapi/client/BossClient.class is up to date.
    [javac] enerprom\agapi\client\DealerFrame.java omitted as 
enerprom/agapi/client/DealerFrame.class is up to date.
    [javac] enerprom\agapi\client\InternalFrame.java omitted as 
enerprom/agapi/client/InternalFrame.class is up to date.
    [javac] enerprom\agapi\client\Main.java omitted as 
enerprom/agapi/client/Main.class is up to date.
    [javac] enerprom\agapi\client\myTableModel.java omitted as 
enerprom/agapi/client/myTableModel.class is up to date.
    [javac] enerprom\agapi\client\Test.java omitted as 
enerprom/agapi/client/Test.class is up to date.
    [javac] enerprom\agapi\ejb\DataSouceFactoryBean.java omitted as 
enerprom/agapi/ejb/DataSouceFactoryBean.class is up to date.
    [javac] enerprom\agapi\metadata\AbstractPersistent.java omitted as 
enerprom/agapi/metadata/AbstractPersistent.class is up to date.
    [javac] enerprom\agapi\metadata\reference\Dealer.hbm.xml skipped - don't 
know how to handle it
    [javac] enerprom\agapi\metadata\reference\Dealer.java omitted as 
enerprom/agapi/metadata/reference/Dealer.class is up to date.
    [javac] enerprom\agapi\metadata\reference\Userlogin.hbm.xml skipped - 
don't know how to handle it
    [javac] enerprom\agapi\metadata\reference\Userlogin.java omitted as 
enerprom/agapi/metadata/reference/Userlogin.class is up to date.
    [javac] hibernate.properties skipped - don't know how to handle it
    [javac] META-INF\jboss-service.xml skipped - don't know how to handle it
    [javac] enerprom\agapi\ejb\DataSourceFactory.java omitted as 
enerprom/agapi/ejb/DataSourceFactory.class is up to date.
    [javac] enerprom\agapi\ejb\DataSourceFactoryHome.java omitted as 
enerprom/agapi/ejb/DataSourceFactoryHome.class is up to date.
    [javac] enerprom\agapi\ejb\DataSourceFactoryLocal.java omitted as 
enerprom/agapi/ejb/DataSourceFactoryLocal.class is up to date.
    [javac] enerprom\agapi\ejb\DataSourceFactoryLocalHome.java omitted as 
enerprom/agapi/ejb/DataSourceFactoryLocalHome.class is up to date.

initdb:
[pathconvert] Set property tmp1 = 
C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Dealer.hbm.xm
l 
C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Userlogin.hbm
.xml
     [java] Executing 'C:\j2sdk1.4.1_01\jre\bin\java.exe' with arguments:
     [java] '-classpath'
     [java] 'C:\JSERVER\hibernate-2.0\hibernate2.jar;C:\JSERVER\hibernate-2.0
\lib\ant.jar;C:\JSERVER\hibernate-2.0\lib\c3p0.jar;C:\JSERVER\hibernate-2.0
\lib\cglib.jar;C:\JSERVER\hibernate-2.0\lib\commons-
beanutils.jar;C:\JSERVER\hibernate-2.0\lib\commons-
collections.jar;C:\JSERVER\hibernate-2.0\lib\commons-
dbcp.jar;C:\JSERVER\hibernate-2.0\lib\commons-lang.jar;C:\JSERVER\hibernate-2.0
\lib\commons-logging.jar;C:\JSERVER\hibernate-2.0\lib\commons-
pool.jar;C:\JSERVER\hibernate-2.0\lib\connector.jar;C:\JSERVER\hibernate-2.0
\lib\dom4j.jar;C:\JSERVER\hibernate-2.0\lib\jaas.jar;C:\JSERVER\hibernate-2.0
\lib\jcs.jar;C:\JSERVER\hibernate-2.0\lib\jdbc2_0-
stdext.jar;C:\JSERVER\hibernate-2.0\lib\jdom.jar;C:\JSERVER\hibernate-2.0
\lib\jta.jar;C:\JSERVER\hibernate-2.0\lib\junit.jar;C:\JSERVER\hibernate-2.0
\lib\odmg.jar;C:\JSERVER\hibernate-2.0\lib\optional.jar;C:\JSERVER\hibernate-
2.0\lib\xalan.jar;C:\JSERVER\hibernate-2.0\lib\xerces.jar;C:\JSERVER\hibernate-
2.0\lib\xml-
apis.jar;C:\JAVA\PRJ\agapi\lib\oracle\classes12.jar;C:\JAVA\PRJ\agapi\lib\oracl
e\nls_charset12.jar;C:\JAVA\PRJ\agapi\build\classes'
     [java] 'net.sf.hibernate.tool.hbm2ddl.SchemaExport'
     
[java] 'C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Deale
r.hbm.xml 
C;C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Userlogin.h
bm.xml'
     [java] 
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
     [java] 08.04.2003 13:14:46 net.sf.hibernate.cfg.Environment <clinit>
     [java] INFO: Hibernate 2.0 beta 5
     [java] 08.04.2003 13:14:46 net.sf.hibernate.cfg.Environment <clinit>
     [java] INFO: loaded properties from resource hibernate.properties: 
{hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, 
hibernate.dialect=net.sf.hibernate.dialect.OracleDialect, 
hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, 
hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', 
hibernate.query.imports=net.sf.hibernate.test, net.sf.hibernate.eg, 
hibernate.connection.username=aware, 
hibernate.connection.url=jdbc:oracle:thin:@oraclser:1521:xm, 
hibernate.show_sql=true, hibernate.connection.password=vtkjxm, 
hibernate.statement_cache.size=0, hibernate.connection.pool_size=1}
     [java] 08.04.2003 13:14:46 net.sf.hibernate.cfg.Environment <clinit>
     [java] INFO: using java.io streams to persist binary types
     [java] 08.04.2003 13:14:47 net.sf.hibernate.cfg.Environment <clinit>
     [java] INFO: JVM proxy support: true
     [java] 08.04.2003 13:14:47 net.sf.hibernate.cfg.Configuration addFile
     [java] INFO: Mapping file: 
C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Dealer.hbm.xm
l !++!
C;C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Userlogin.h
bm.xml
     [java] 08.04.2003 13:14:47 net.sf.hibernate.cfg.Configuration addFile
     [java] SEVERE: Could not configure datastore from file: 
C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Dealer.hbm.xm
l 
C;C:\JAVA\PRJ\agapi\build\classes\enerprom\agapi\metadata\reference\Userlogin.h
bm.xml
     [java] org.dom4j.DocumentException: unknown protocol: c Nested exception: 
unknown protocol: c
     [java] 	at org.dom4j.io.SAXReader.read(SAXReader.java:342)
     [java] 	at org.dom4j.io.SAXReader.read(SAXReader.java:236)
     [java] 	at net.sf.hibernate.cfg.Configuration.addFile
(Configuration.java:152)
     [java] 	at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main
(SchemaExport.java:273)
     [java] Nested exception: 
=============================log================================

Pathconvert work perfect, but after I try to pass that result to <args it's 
generate C;C:\... instead C:\ I mark that place with !++!

Mime
View raw message