so whts wrong in my case?

On Fri, Jun 6, 2008 at 7:31 PM, Sean Hennessy <[EMAIL PROTECTED]>
wrote:

>  of course..echoproperties adds dependency..to another ant component.
>  here is segment of my ugly pom.xml
> [snip]
>          <!-- ================= -->
>      <plugin>
>        <artifactId>maven-antrun-plugin</artifactId>
>        <executions>
>          <execution>
>            <phase>pre-site</phase>
>            <configuration>
>              <tasks>
>              <typedef resource="org/apache/maven/artifact/ant/antlib.xml">
>                  <classpath refid="maven.dependency.classpath"/>
>              </typedef>
>              <echo message="pom.xml: maven-antrun-plugin"></echo>
>                <tstamp>
>                  <format locale="en" property="TODAY_UK"
> pattern="d-MMM-yyyy"></format>
>                </tstamp>
>                <echo>pom.xml: timestamp ${TODAY_UK}</echo>
>                <property refid="maven.dependency.classpath"
> name="mvndepClasspath" />
>                          <ant inheritRefs="true" inheritAll="true"
> antfile="${basedir}/src/4.bin/build.xml">
>                          <property environment="env"/>
>                          <property value="true"
> name="project.debug"></property>
>                          <property file="${user.home}/build.properties"/>
>                          <target name="cmn.outadate.tgt.nm" />
>                          </ant>
>              </tasks>
>            </configuration>
>            <goals>
>              <goal>run</goal>
>            </goals>
>          </execution>
>        </executions>
>        <dependencies>
>            <dependency>
>            <groupId>org.apache.maven</groupId>
>            <artifactId>maven-artifact-ant</artifactId>
>            <version>2.0.4</version>
>            </dependency>
>            <dependency>
>            <groupId>ant</groupId>
>            <artifactId>ant</artifactId>
>            <version>1.6.5</version>
>            </dependency>
>            <dependency>
>            <groupId>ant-contrib</groupId>
>            <artifactId>cpptasks</artifactId>
>            <version>1.0b3</version>
>            </dependency>
>            <dependency>
>            <groupId>ant-contrib</groupId>
>            <artifactId>ant-contrib</artifactId>
>            <version>1.0b2</version>
>            </dependency>
>            <dependency>
>            <groupId>ant</groupId>
>            <artifactId>optional</artifactId>
>            <version>1.5.4</version>
>            </dependency>
>            <dependency>
>            <groupId>ant</groupId>
>            <artifactId>ant-nodeps</artifactId>
>            <version>1.6.5</version>
>            </dependency>
>
>        </dependencies>
>      </plugin>
> [snip]
> <!--============================== -->
>  in build.xml
>  <taskdef classpath="${mvndepClasspath}"
> resource="org/apache/maven/artifact/ant/antlib.xml">
>   </taskdef>
>
> -----Original Message-----
> From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
>  Sent: Friday, June 06, 2008 9:02 AM
> To: Maven Users List; [EMAIL PROTECTED]
> Subject: Re: need help in ant's javadoc task (from maven)
>
>
> I got this when I ran your debug script. Error executing ant tasks
>
>
> _________________________________________________________________________________________
>
> Embedded error: The following error occurred while executing this line:
> /home/apli/APPWeb/src/main/build/generate/generate-appcodes.xml:37:
>
> Could not create task or type of type: echoproperties.
>
> Ant could not find the task or a class this task relies upon.
>
> This is common and has a number of causes; the usual
> solutions are to read the manual pages then download and install needed JAR
> files, or fix the build file:
>  - You have misspelt 'echoproperties'.
>   Fix: check your spelling.
>  - The task needs an external JAR file to execute
>     and this is not found at the right place in the classpath.
>   Fix: check the documentation for dependencies.
>   Fix: declare the task.
>  - The task is an Ant optional task and the JAR file and/or libraries
>     implementing the functionality were not found at the time you
>     yourself built your installation of Ant from the Ant sources.
>   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
>     task and make sure it contains more than merely a META-INF/MANIFEST.MF.
>     If all it contains is the manifest, then rebuild Ant with the needed
>     libraries present in ${ant.home}/lib/optional/ , or alternatively,
>     download a pre-built release version from apache.org
>  - The build file was written for a later version of Ant
>   Fix: upgrade to at least the latest release version of Ant
>  - The task is not an Ant core or optional task
>     and needs to be declared using <taskdef>.
>  - You are attempting to use a task defined using
>    <presetdef> or <macrodef> but have spelt wrong or not
>   defined it at the point of use
>
> Remember that for JAR files to be visible to Ant tasks implemented in
> ANT_HOME/lib, the files must be in the same directory or on the classpath
>
> Please neither file bug reports on this problem, nor email the Ant mailing
> lists, until all of these causes have been explored, as this is not an Ant
> bug.
>
>
> _________________________________________________________________________________________
>
> my xml file is in src/main/build/generate folder
> and the dependency jars are in folder src/main/build/lib and
> src/main/webapp/WEB-INF/lib I am using the <path id="tools.classpath"> to
> point to these jars and and the tools.classpath is used by the ant's doclet
> task fpr the "path" attribute.
>
> What might be wrong?
>
>
>
> On 6/6/08, Sean Hennessy <[EMAIL PROTECTED]> wrote:
> >
> >
> > <!-- BEG COMMENT ===========================
> >   add this debug Ant target to your depends= to expose the properties
> > in play
> >   END COMMENT ======================= -->
> >
> >   <target name="display.properties.tgt" description="display project
> > properties.">
> >     <echoproperties destfile="${ant.file}.runtime.properties"
> > failonerror="false" />
> >      <echo message="----- ${project.name.text} ${project.version}
> -----"/>
> >      <echo message="java.class.path = ${java.class.path}"/>
> >      <echo message="java.home = ${java.home}"/>
> >      <echo message="user.home = ${user.home}"/>
> >      <echo message="ant.home = ${ant.home}"/>
> >      <echo message="base.dir = ${basedir}"/>
> >    </target>
> >
> > -----Original Message-----
> > From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 06, 2008 5:54 AM
> > To: [EMAIL PROTECTED]; Maven Users List
> > Subject: need help in ant's javadoc task (from maven)
> >
> >
> > I am trying to generate a .properties file using javadocs in a java
> > source file, and i am using ant's <javadoc> task to do this.
> >
> > but i am getting this error when i run the antrun plugin
> >
> > generate.appcodes:
> > [javadoc] Generating Javadoc
> > [javadoc] Javadoc execution
> > [javadoc] javadoc: Cannot find doclet class
> > com.company.app.util.doclet.AppCodesDoclet
> > [javadoc] 1 error
> >
> > Please help. Also can anyone tell me what the <path> and <pathelement>
> > elements are for? How are the paths relative to?
> >
> > My ant build file is:
> >
> >
> > <project name="generate.appcodes" basedir=".." default="all">
> >
> > <path id="tools.classpath">
> > <pathelement path="build/lib/tools.jar" />
> > <pathelement path="lib/xerces.jar" />
> > <pathelement path="WebContent/WEB-INF/lib/log4j-1.2.9.jar" />  </path>
> >
> > <target name="all" depends="generate.appcodes"/>
> >
> > <target name="generate.appcodes">
> >
> > <delete file="src/main/resources/appcodes.properties" />
> >
> > <javadoc
> > sourcefiles="src/main/com/company/app/shared/security/AppCodes.java"
> >     failonerror="yes">
> >
> >   <doclet name="com.company.app.util.doclet.AppCodesDoclet"
> >     path="${tools.classpath}">
> >    <param name="-outputfile"
> > value="../src/main/resources/appcodes.properties" />
> >    <param name="-sourcepath" value="src/main/resources" />
> >    <param name="-command" value="properties" />
> >   </doclet>
> >
> > </javadoc>
> >
> > <mkdir dir="target/WEB-INF/classes/resources" />
> > <copy file="src/main/resources/appcodes.properties"
> >     todir="target/WEB-INF/classes/resources" />
> >
> > </target>
> >
> > </project>
> >
> >
> >
> >
> > --
> > Regards,
> > Niranjan Deshpande
> >
> > "Shut yourself from the world and create the reality you want"
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Regards,
> Niranjan Deshpande
>
> "Shut yourself from the world and create the reality you want"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards,
Niranjan Deshpande

"Shut yourself from the world and create the reality you want"

Reply via email to