users@jax-rpc.java.net

RE: APT task failure?

From: Phillip A. Lindsay <phil_at_lindsay.net>
Date: Tue, 19 Jul 2005 11:33:07 -0700

We are using Maven 1.1 which uses ant 1.6.5.

No files are generated. If I turn compile back on, just a compile of
PatronEndpoint.java is created.

------------------------------------

<taskdef name="apt" classname="com.sun.tools.ws.ant.Apt">
    <classpath refid="maven.dependency.classpath"/>
</taskdef>

<apt base="${maven.build.dir}"
                 sourceBase="${maven.build.dir}/classes"
                 sourcePath="${pom.build.sourceDirectory}"
                 verbose="true"
                 noCompile="true">
             <classpath>
              <pathelement location="${java.home}../../lib/tools.jar"/>
              <path refid="maven.dependency.classpath"/>
              <path location="target/classes"/>
            </classpath>
             <option key="nd" value="${maven.build.dir}"/>
             <option key="verbose" value="true"/>
             <source dir="${pom.build.sourceDirectory}">
                 <include name="**/*.java" />
             </source>
         </apt>
 
------------------------------
package com.foobar.patron.ws;


import javax.jws.WebMethod;
import javax.jws.WebService;

/**
 * The PatronEndpoint class
 *
 *
 */
@WebService
public class PatronEndpoint {
        
        /**
         *
         */
        public PatronEndpoint() {
        }
        
    /**
     *
     * @param x
     * @param y
     * @return
     */
    @WebMethod
    public int add(int x, int y) {
        return x+y;
    }
}
------------------------------

[apt] [parsing started
C:\destiny\work\ws\src\java\com\tickets\patron\ws\PatronEndpoint.java]
[apt] [parsing completed 0ms]
[apt] [search path for source files: [C:\destiny\work\ws\src\java]]
[apt] [search path for class files: [c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\jsse.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\jce.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\charsets.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\ext\dnsns.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\ext\localedata.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\ext\sunjce_provider.jar, c:\Program
Files\Java\jdk1.5.0_03\jre\lib\ext\sunpkcs11.jar, C:\Program
Files\Java\jdk1.5.0_03\lib\tools.jar,...
[apt] [loading C:\Documents and
Settings\plindsay\.maven\repository\jaxws\jars\jsr181-api-2.0ea2.jar(javax/j
ws/WebMethod.class)]
[apt] [loading C:\Documents and
Settings\plindsay\.maven\repository\jaxws\jars\jsr181-api-2.0ea2.jar(javax/j
ws/WebService.class)]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/Object.class)]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/Retention.class)]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/RetentionPolicy.c
lass)]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/Target.class)]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/ElementType.class
)]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/Annotation.class)
]
[apt] [loading c:\Program
Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/Deprecated.class)]
[apt] warning: Bad annotation processor factory:
java.lang.ClassCastException:
com.sun.istack.ws.AnnotationProcessorFactoryImpl
[apt] warning: Annotation types without processors: [javax.jws.WebService,
javax.jws.WebMethod]
[apt] [total 1829ms]
[apt] 2 warnings
[apt]

----------------------

> -----Original Message-----
> From: Doug Kohlert [mailto:Doug.Kohlert_at_Sun.COM]
> Sent: Tuesday, July 19, 2005 11:08 AM
> To: users_at_jax-rpc.dev.java.net
> Subject: Re: APT task failure?
>
> We see this with different versions of ant? Sometimes, even
> though there is a warning the task completes a normal, other
> times it does not do anything. What version of ant are you
> using and can you tell if it the apt task is working (except
> for the warning)?
>
> Phillip A. Lindsay wrote:
>
> >Can someone shed light on what this implies? Do I need more than
> >tools.jar in path?
> >Thanks,
> >-phil
> >
> > [apt] [loading C:\Documents and
> >Settings\plindsay\.maven\repository\jaxws\jars\jsr181-api-2.0
> ea2.jar(ja
> >vax/j
> >ws/WebMethod.class)]
> > [apt] [loading C:\Documents and
> >Settings\plindsay\.maven\repository\jaxws\jars\jsr181-api-2.0
> ea2.jar(ja
> >vax/j
> >ws/WebService.class)]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/Object.class)]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/Re
> tention.class)]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/Re
> tentionPol
> >icy.c
> >lass)]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/Ta
> rget.class)]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/El
> ementType.
> >class
> >)]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/annotation/An
> notation.c
> >lass)
> >]
> > [apt] [loading c:\Program
> >Files\Java\jdk1.5.0_03\jre\lib\rt.jar(java/lang/Deprecated.class)]
> > [apt] warning: Bad annotation processor factory:
> >java.lang.ClassCastException:
> >com.sun.istack.ws.AnnotationProcessorFactoryImpl
> > [apt] warning: Annotation types without processors:
> >[javax.jws.WebService, javax.jws.WebMethod]
> > [apt] [total 3422ms]
> > [apt] 2 warnings
> > [apt]
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> >For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
> >
> >
>
> --
> - Doug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>