Hi Marcelo

Well I changed all but one of the dependency.

<project xmlns="http://maven.apache.org/POM/4.0.0";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   
       http://maven.apache.org/maven-v4_0_0.xsd";>
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>jasre.workspace.samples</groupId>
                <artifactId>simpleWebService</artifactId>
                <version>1.0</version>
        </parent>
        <groupId>jasre.workspace.samples.simpleWebService</groupId>
        <artifactId>webService</artifactId>
        <name>
                ${project.artifactId} module for
${project.parent.artifactId}
        </name>
        <description>
                ${project.artifactId} module for
${project.parent.artifactId}
        </description>
        <packaging>war</packaging>
        <dependencies>
                <dependency>
                        <groupId>javax.jws</groupId>
                        <artifactId>jsr181</artifactId>
                        <version>1.0</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                        <scope>test</scope>
                        <!--<scope>provided</scope>-->
                </dependency>
                <dependency>
                        <groupId>jaxws-ri</groupId>
                        <artifactId>jaxb-api</artifactId>
                        <version>2.1.1</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>jaxws-ri</groupId>
                        <artifactId>jaxws-api</artifactId>
                        <version>2.1.1</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>easymock</groupId>
                        <artifactId>easymock</artifactId>
                        <version>2.0</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>easymock</groupId>
                        <artifactId>easymockclassextension</artifactId>
                        <version>2.2</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging-api</artifactId>
                        <version>1.0.4</version>
                        <scope>provided</scope>
                </dependency>
        </dependencies>
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
        
<artifactId>jaxws-maven-plugin</artifactId>
                                <version>1.2</version>
                                <configuration>
                                        <verbose>false</verbose>
        
<sei>com.service.DateServiceImpl</sei>
                                        <genWsdl>false</genWsdl>
                                        <keep>false</keep>
        
<destDir>target\classes</destDir>
                                </configuration>
                                <executions>
                                        <execution>
                                                <goals>
        
<goal>wsgen</goal>
                                                </goals>
                                                <phase>compile</phase>
                                        </execution>
                                </executions>
                                <!--  for AnnotationProcessorFactory -->
                                <dependencies>
                                        <dependency>
        
<groupId>com.sun</groupId>
        
<artifactId>tools</artifactId>
        
<version>1.5.0_11</version>
                                                <scope>provided</scope>
                                        </dependency>
                                        <dependency>
        
<groupId>com.sun.xml.ws</groupId>
        
<artifactId>jaxws-tools</artifactId>
                                                <version>2.1.1</version>
                                                <scope>provided</scope>
                                        </dependency>
                                        <dependency>
        
<groupId>com.sun.xml.ws</groupId>
        
<artifactId>jaxws-rt</artifactId>
                                                <version>2.1.1</version>
                                                <scope>provided</scope>
                                                <!-- gives error if use
'provided' ,if                                          given compile
creates lib folders--> 
                                        </dependency>
                                </dependencies>
                        </plugin>


When I specify 'provided' for jaxws-rt it throws following error
 

[INFO] [jaxws:wsgen {execution: default}]
error: Could not create declaration for annotation type
javax.jws.WebMethod
error: Could not create declaration for annotation type
javax.jws.WebService
Problem encountered during annotation processing; 
see stacktrace below for more information.
java.lang.annotation.IncompleteAnnotationException: javax.jws.WebMethod
missing element exclude
        at
sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvo
cationHandler.java:53)
        at $Proxy4.exclude(Unknown Source)
        at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.hasWebMe
thods(WebServiceVisitor.java:329)
        at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.shouldPr
ocessWebService(WebServiceVisitor.java:305)
        at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitCla
ssDeclaration(WebServiceVisitor.java:109)
        at
com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDe
clarationImpl.java:95)
        at
com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(We
bServiceAP.java:311)
        at
com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebSe
rviceAP.java:252)
        at
com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.pro
cess(AnnotationProcessors.java:60)
        at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
        at
com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
        at com.sun.tools.apt.main.Main.compile(Main.java:1075)
        at com.sun.tools.apt.main.Main.compile(Main.java:938)
        at com.sun.tools.apt.Main.processing(Main.java:95)
        at com.sun.tools.apt.Main.process(Main.java:85)
        at com.sun.tools.apt.Main.process(Main.java:67)
        at
com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:175)
        at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:102)
        at com.sun.tools.ws.WsGen.doMain(WsGen.java:55)
        at
org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java
:91)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:143)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
error: compilation failed, errors should have been reported
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing: wsgen [-d,
C:\workspace\Maven\Workspace\Samples\simpleWebService\webservice\target\
classes, -cp,
C:\workspace\Maven\Workspace\Samples\simpleWebService\webservice\target\
classes, com.wachovia.cib.service.DateServiceImpl]
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing:
wsgen [-d,
C:\workspace\Maven\Workspace\Samples\simpleWebService\webservice\target\
classes, -cp,
C:\workspace\Maven\Workspace\Samples\simpleWebService\webservice\target\
classes, com.wachovia.cib.service.DateServiceImpl]
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:143)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
executing: wsgen [-d,
C:\workspace\Maven\Workspace\Samples\simpleWebService\webservice\target\
classes, -cp,
C:\workspace\Maven\Workspace\Samples\simpleWebService\webservice\target\
classes, com.wachovia.cib.service.DateServiceImpl]
        at
org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java
:92)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:539)
        ... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Tue Sep 18 13:19:45 EDT 2007
[INFO] Final Memory: 9M/17M
[INFO]
------------------------------------------------------------------------



Is there any other way not to create the lib folder at all? Or remove
the lib folder thus added from the WAR?

Regards,
Nishant Sonar


-----Original Message-----
From: Colomer Cornejo, Marcelo [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 18, 2007 11:22 AM
To: Maven Users List
Subject: RE: how NOT to include any lib (dependencies) in the WAR ?

Hi,
try to configure SCOPE dependency. 
   
        <scope>provided</scope>

Marcelo.

-----Original Message-----
From: Sonar, Nishant [mailto:[EMAIL PROTECTED] 
Sent: 18 September 2007 17:18
To: Maven Users List
Subject: how NOT to include any lib (dependencies) in the WAR ?

Whenever I create a WAR , it creates a WEB-INF/lib inside the war and
adds all the dependencies in the WAR .

What can I do NOT to include any lib (dependencies) in the WAR , and
exclude the lib folder to be in war, here's my POM

<project xmlns="http://maven.apache.org/POM/4.0.0";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   
       http://maven.apache.org/maven-v4_0_0.xsd";>
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId> workspace.samples</groupId>
                <artifactId>simpleWebService</artifactId>
                <version>1.0</version>
        </parent>
        <groupId>workspace.samples.simpleWebService</groupId>
        <artifactId>webService</artifactId>
        <name>${project.artifactId} module for
${project.parent.artifactId}</name>
    <description>${project.artifactId} module for
${project.parent.artifactId}</description>
        <packaging>war</packaging>
        <dependencies>
                <dependency>
                        <groupId>javax.jws</groupId>
                        <artifactId>jsr181</artifactId>
                        <version>1.0</version>
                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>jaxws-ri</groupId>
                        <artifactId>jaxb-api</artifactId>
                        <version>2.1.1</version>
                </dependency>
                <dependency>
                        <groupId>jaxws-ri</groupId>
                        <artifactId>jaxws-api</artifactId>
                        <version>2.1.1</version>
                </dependency>
                <dependency>
                        <groupId>easymock</groupId>
                        <artifactId>easymock</artifactId>
                        <version>2.0</version>
                </dependency>
                <dependency>
                        <groupId>easymock</groupId>
                        <artifactId>easymockclassextension</artifactId>
                        <version>2.2</version>
                </dependency>
                <dependency>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging-api</artifactId>
                        <version>1.0.4</version>
                </dependency>
                <dependency>
                        <groupId>com.sun.xml.ws</groupId>
                        <artifactId>jaxws-rt</artifactId>
                        <version>2.1.1</version>
                </dependency>
        </dependencies>
        <build>
                <plugins>
                <plugin>
                                <groupId>org.codehaus.mojo</groupId>
        
<artifactId>jaxws-maven-plugin</artifactId>
                                <version>1.2</version>
                                <configuration>
                                        <verbose>false</verbose>
        
<sei>com.service.DateServiceImpl</sei>
                                        <genWsdl>false</genWsdl>
                                        <keep>false</keep>
        
<destDir>target\classes</destDir>
                                </configuration>
                                <executions>
                                        <execution>
                                                <goals>
        
<goal>wsgen</goal>
                                                </goals>
                                                <phase>compile</phase>
                                        </execution>
                                </executions>
                                <!--  for AnnotationProcessorFactory -->
                                <dependencies>
                                        <dependency>
        
<groupId>com.sun</groupId>
        
<artifactId>tools</artifactId>
        
<version>1.5.0_11</version>
                                        </dependency>
                                        <dependency>
        
<groupId>com.sun.xml.ws</groupId>
        
<artifactId>jaxws-tools</artifactId>
                                                <version>2.1.1</version>
                                        </dependency>
                                </dependencies>
                        </plugin>

Thanks,
Nishant

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to