Hi all,

I'm new with beehive and annotation. I've got a problem to compile a simple example who want to connect to a database.

The apt compiler return me this message:
      [apt] warning: Annotation types without processors: [org.apache.beehive.controls.system.jdbc.JdbcControl.ConnectionDriver, org.apache.beehive.controls.system.jdbc.JdbcControl.SQL]
      [apt] 1 warning

My project classpath contens this libraries
    <path id="project.classpath">
        <pathelement location="bin"/>
        <pathelement location="${basedir}/lib/jdbc/classes12.jar"/>
        <pathelement location="${basedir}/lib/jdbc/nls_charset12.jar"/>
        <pathelement location="${basedir}/lib/apache-beehive-1.0.1/beehive-controls.jar"/>
        <pathelement location="${basedir}/lib/apache- beehive-1.0.1/beehive-jdbc-control.jar"/>
        <pathelement location="${basedir}/lib/apache-beehive-1.0.1/log4j-1.2.8.jar"/>
    </path>

 

To compile,I use the ant task describe in the beehive-tools.xml

I post with this mail my samples.

Thanks for helping me.



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project [<!ENTITY buildfile SYSTEM "file:./build-user.xml">]>
<!-- WARNING: Eclipse autogenerated file. 
              Any modifications will be overwritten.
              Please edit build-user.xml instead.
-->
<project basedir="." default="build" name="CdCBenchmark">
    &buildfile;
	<property name="CdCBenchmark.location" value="E:/_Applis/eclipse/workspace/CdCBenchmark"/>
	
    <path id="controls.dependency.path">
        <pathelement location="${CdCBenchmark.location}/lib/apache-beehive-1.0.1/beehive-controls.jar"/>
    </path>

    
	<path id="velocity.dependency.path">
        <pathelement location="${CdCBenchmark.location}/lib/apache-beehive-1.0.1/velocity-dep-1.4.jar"/>
    </path>
	
    <path id="project.classpath">
        <pathelement location="bin"/>
        <pathelement location="${basedir}/lib/jdbc/classes12.jar"/>
        <pathelement location="${basedir}/lib/jdbc/nls_charset12.jar"/>
        <pathelement location="${basedir}/lib/apache-beehive-1.0.1/beehive-controls.jar"/>
        <pathelement location="${basedir}/lib/apache-beehive-1.0.1/beehive-jdbc-control.jar"/>
        <pathelement location="${basedir}/lib/apache-beehive-1.0.1/log4j-1.2.8.jar"/>
    </path>
    
	<import file="${CdCBenchmark.location}/ant/beehive-tools.xml"/>

	<target name="init">
        <mkdir dir="${basedir}/annotation"/>
        <mkdir dir="${basedir}/annotation/bin"/>
        <mkdir dir="${basedir}/annotation/src"/>
        <mkdir dir="${basedir}/annotation/jar"/>
    </target>
	
	<target name="clean">
        <delete dir="${basedir}/annotation"/>
    </target>
    
	<!-- Buil des annotations -->
	<target name="build" depends="init">
        <build-controls srcdir="${basedir}/src"
                        destdir="${basedir}/annotation/bin"
                        tempdir="${basedir}/annotation/src"
                        classpathref="project.classpath"
				        nocompile="false"/>
		<!--<control-jar destfile="${basedir}/annotation/jar/annotation.jar" basedir="${basedir}/annotation/bin" />-->
	</target>
		
    <target name="Test">
        <java classname="org.Test" failonerror="true" fork="yes">
            <classpath refid="project.classpath"/>
        </java>
    </target>
</project>
<?xml version="1.0"?>
<!--
   Copyright 2004-2005 The Apache Software Foundation.

   Licensed 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.
  
   $Header:$
 -->

<!--
  This Ant build file contains <macrodef>s that are used to build
  Beehive-related source artifacts.
-->
<project name="Beehive/Tools" default="usage">

    <path id="apt.task.classpath">
        <path refid="controls.dependency.path"/>
        <path refid="velocity.dependency.path"/>
    </path>

    <macrodef name="build-schemas">
        <attribute name="srcdir" description="The directory containing XML Schemas or XMLBeans xsdconfig files to build"/>
        <attribute name="destdir" description="The directory to use for files generated during an XSD build"/>
        <sequential>
            <taskdef name="xmlbeanbuild" 
                     classname="org.apache.xmlbeans.impl.tool.XMLBean" 
                     classpathref="xbean.dependency.path"/>

            <xmlbeanbuild classpathref="xbean.dependency.path"
                          schema="@{srcdir}"
                          classgendir="@{destdir}"
                          failonerror="true"/>
        </sequential>
    </macrodef>

    <macrodef name="build-controls">
        <attribute name="srcdir" description="The directory containing controls to build.  Required."/>
        <attribute name="destdir" description="The destination directory for compiled class files.  Required."/>
        <attribute name="tempdir" description="The temporary directory for generated files.  Required."/>
        <attribute name="classpathref" description="The classpath reference for building the controls.  Required."/>
        <attribute name="nocompile" default="false" description="Flag to decide whether to skip compilation.  Optional; defaults to false"/>
        <sequential>
            <taskdef name="apt" 
                     classname="org.apache.beehive.controls.runtime.generator.AptTask" 
                     classpathref="apt.task.classpath"
                     onerror="fail"/>

            <!-- 
                 since Velocity is required at build time for controls, it needs to be
                 explicitly added  here via the velocity.dependency.path
              -->
            <path id="_controls.build.classpath">
                <path refid="@{classpathref}"/>
                <path refid="velocity.dependency.path"/>
            </path>

            <apt srcdir="@{srcdir}"
                 destdir="@{destdir}"
                 gendir="@{tempdir}"
                 classpathref="_controls.build.classpath"
                 compileByExtension="true" 
                 srcExtensions="*.java,*.jcx,*.jcs,*.jws" 
                 debug="true"
                 nocompile="@{nocompile}"/>
        </sequential>
    </macrodef>

    <!-- create a jar of a control -->
    <taskdef name="control-jar" 
             classname="org.apache.beehive.controls.runtime.packaging.ControlJarTask" 
             classpathref="controls.dependency.path" onerror="report" />             


    <target name="usage" description="Print the usage for this Ant build file.">
        <echo>
The beehive-tools.xml file contains Ant macros which can be used 
to build Beehive related source artifacts such as Controls, Page Flows, 
and XML Schemas.  For examples of how to use these macros, see the 
Beehive samples.

Note, this build file does not contain targets that can be called 
directly on the command line.
        </echo>
    </target>

</project>

Reply via email to