Ok, so never mind the previous, apparently that's not the solution or
issue.  I'm very confused.  Here is my plugin snippet that I'm trying to
make work with my jar containing my xmlbeans I generated.  Can someone tell
me what I'm doing wrong?  I'm obviously not understanding properly.

My xmlbeans generated classes are in the FlareWaterGauge-jsr181-su
artifact.  I'm including that artifact in my main dependencies section.  My
plugin section is pasted below.  No matter I restructure and change it, I
always get this error:

Embedded error: java.lang.NullPointerException

Here is my plugin section:

<plugin>
       <artifactId>maven-antrun-plugin</artifactId>
       <executions>
         <execution>
           <phase>generate-sources</phase>
           <configuration>
             <tasks>
               <taskdef
                 classname="org.codehaus.xfire.gen.WsGenTask"
                 name="wsgen">
                 <classpath>
                   <pathelement path="${basedir}/target/classes" />
                   <path refid="maven.compile.classpath" />
                 </classpath>
               </taskdef>
               <wsgen
wsdl="${basedir}/../FlareWaterGauge-jsr181-su/src/main/resources/WaterGaugeService.wsdl"
                 outputDirectory="${basedir}/target/jaxws"
                 binding="xmlbeans"
                 profile="org.codehaus.xfire.jaxws.gen.JAXWSProfile"
                 explicitAnnotation="true" />
             </tasks>
             <sourceRoot>${basedir}/target/jaxws</sourceRoot>
           </configuration>
           <goals>
             <goal>run</goal>
           </goals>
         </execution>
       </executions>
       <dependencies>
         <dependency>
           <groupId>com.bae.gse.flare.jbi</groupId>
           <artifactId>FlareWaterGauge-jsr181-su</artifactId>
           <version>1.0-SNAPSHOT</version>
         </dependency>
         <dependency>
           <groupId>org.codehaus.xfire</groupId>
           <artifactId>xfire-generator</artifactId>
           <version>${xfire-version}</version>
           <exclusions>
             <exclusion>
               <groupId>javax.xml</groupId>
               <artifactId>jsr173</artifactId>
             </exclusion>
           </exclusions>
         </dependency>
         <dependency>
           <groupId>org.codehaus.xfire</groupId>
           <artifactId>xfire-jaxws</artifactId>
           <version>${xfire-version}</version>
         </dependency>
       </dependencies>
     </plugin>

On 11/27/06, Ryan Moquin <[EMAIL PROTECTED]> wrote:

I finally figured out that my xmlbeans binding problem for XFire wsgen
plugin with the NPE is probably related to the fact that my xmlbeans jar
file isn't in my Maven2 pom dependencies of the XFire wsgen plugin itself
(rather than the main dependencies as I was led to believe in the example).

As soon as I added it to that dependency list, I received a new error.  Is
the XFire maven2 wsgen plugin dependant on ant jars?

[xfire:wsgen {execution: default}]
[INFO]------------------------------------------------------------------------

[ERROR]FATAL ERROR

[INFO]------------------------------------------------------------------------
[INFO]org/apache/tools/ant/Project
[INFO]------------------------------------------------------------------------

[INFO]Trace
java.lang.NoClassDefFoundError: org/apache/tools/ant/Project

        at org.codehaus.mojo.xfire.WsgenMojo.exec(WsgenMojo.java:151)
        at org.codehaus.mojo.xfire.WsgenMojo.execute(WsgenMojo.java :103)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:417)


Reply via email to