[ 
http://jira.codehaus.org/browse/MNG-3586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160439#action_160439
 ] 

Jason van Zyl commented on MNG-3586:
------------------------------------

The POM for this version of the plugin has a profile that says it's only for 
MAC OS X but there is no tools.jar in OS X. You're obviously having a problem 
on Windows. 

I would suggest that this plugin do what the compiler plugin does which is to 
correctly find the tools JAR on any platform (which is the plexus compiler 
component under the covers). What's in this plugin also won't work if your 
JAVA_HOME is the JDK this will not work anyway. So I think not finding the 
tools.jar is problematic anyway so whoever wrote the plugin should think about 
doing it properly. I honestly don't get this POM saying it's for a MAC when 
there is no tools.jar on OS X. 

The problem is indeed that a filter that limited scope is not used in 2.x, so 
none of the actual existing scopes correspond to what happens currently. 

For plugin resolution I can't see this being a huge problem adding a scope for 
runtime+system which is what plugin developers ended up using so I'll add a 
scope for this for use in plugin resolution.

> [regression] jaxws mojo wsgen failure with maven 3.0 due to system-scope 
> dependencies being excluded
> ----------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3586
>                 URL: http://jira.codehaus.org/browse/MNG-3586
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 3.0-alpha-1
>         Environment: Windows XP / Java 5 or 6
>            Reporter: Henri Gomez
>            Assignee: Brett Porter
>             Fix For: 3.0-alpha-3
>
>         Attachments: pom.xml, sample-wsgen-20081229.zip, 
> sample-wsgen-fixed.zip, sample-wsgen.zip
>
>
> I can build jar projects using the jaxws wsgen mojo (1.9) under maven
> 2.0.x but it failed under m2eclipse (0.9.3) when using maven 2.1
> embedded (it works if I switch m2eclipse to use the maven 2.0.9 on my
> system).
> I tried with various JVM (Sun and IBM 5 and 6) but still got the
> problem with maven 2.1 embedded (maven 2.1-620417 and 2.1-655675):
> error is :
> From file: C:\workspace\xxx-er-go\pom.xml
> Reason: Failed to execute wsgen
> java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>       at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>       at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174)
>       at 
> org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>       at com.sun.tools.ws.WsGen.doMain(WsGen.java:69)
>       at 
> org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:91)
>       at org.codehaus.mojo.jaxws.MainWsGenMojo.execute(MainWsGenMojo.java:14)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:577)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
>       at 
> org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
>       at 
> org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
>       at 
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:903)
>       at 
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
>       at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
> Any idea or fixes ?
> my pom.xml wsgen is standard :
>       <build>
>               <plugins>
>                       <plugin>
>                               <artifactId>maven-compiler-plugin</artifactId>
>                               <configuration>
>                                       <source>1.5</source>
>                                       <target>1.5</target>
>                               </configuration>
>                               <executions>
>                                       <execution>
>                                               <id>compile</id>
>                                               <goals>
>                                                       <goal>compile</goal>
>                                               </goals>
>                                               <phase>initialize</phase>
>                                       </execution>
>                               </executions>
>                       </plugin>
>                       <!-- We need JAX-WS support for Annotation processing 
> -->
>                       <!-- NB: wsgen can handle only one SEI at a
> time so we define an
> execution by SEI -->
>                       <plugin>
>                               <groupId>org.codehaus.mojo</groupId>
>                               <artifactId>jaxws-maven-plugin</artifactId>
>                               <executions>
>                                       <execution>
>                                               <id>go-wsgen</id>
>                                               <goals>
>                                                       <goal>wsgen</goal>
>                                               </goals>
>                                               <phase>generate-sources</phase>
>                                               <configuration>
> <resourceDestDir>${project.build.directory}/classes/com/mycorp/service/resources/wsdl</resourceDestDir>
> <sei>com.mycorp.service.MyService</sei>
>                                                       <genWsdl>true</genWsdl>
>                                                       <keep>false</keep>
>                                               </configuration>
>                                       </execution>
>                               </executions>
>                       </plugin>
>               </plugins>
>       </build>
> I attached a simple project so you could try it.
> From others reports, it seems the tools.jar is missing in embedded mode.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to