cxf-codegen-plugin problem while running over aggregated pom directory
----------------------------------------------------------------------

                 Key: CXF-1175
                 URL: https://issues.apache.org/jira/browse/CXF-1175
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.0.2
         Environment: Maven 2.0.5 and 2.0.6
            Reporter: Wojtek K


Basedir ...generated-sources does not exist when run from the aggregated pom 
directory.

Our project has following structure:
- mm2-jar
-- pom.xml
- mm2-web
-- pom.xml
- pom.xml

POMs in the mm2-jar and mm2-web are standard JAR and Webapp poms.  Pom in the 
mm2-jar project contains following section:
<build>
        <plugins>
                <plugin>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-codegen-plugin</artifactId>
                        <version>${cxf.version}</version>
                        <executions>
                                <execution>
                                        <phase>generate-sources</phase>
                                        <configuration>
                                                
<sourceRoot>${basedir}/target/generated-sources/main/java</sourceRoot>
                                                <wsdlOptions>
                                                        <wsdlOption>
                                                                
<wsdl>${basedir}/src/main/resources/wsdl/market-manager-v1.wsdl</wsdl>
                                                        </wsdlOption>
                                                </wsdlOptions>
                                        </configuration>
                                        <goals>
                                                <goal>wsdl2java</goal>
                                        </goals>
                                </execution>
                        </executions>
                <dependencies>
                        <dependency>
                                <groupId>org.apache.cxf</groupId>
                                <artifactId>cxf-codegen-plugin</artifactId>
                                <version>${cxf.version}</version>
                        </dependency>
                </dependencies>
        </plugin>


When we build our project from the mm2-jar subdirectory (mvn install) 
everything works fine, the same when we run from mm2-web.

However if we run aggregated buil, we get error message during building of 
mm2-webapp:
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] basedir ..\mm2-jar\target\generated-sources does not exist
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: basedir ..\mm2-jar\target\generated-sources 
does not exist
        at 
org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:542)
        at 
org.apache.maven.plugin.war.AbstractWarMojo.getWarFiles(AbstractWarMojo.java:824)
        at 
org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:408)
        at 
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:518)
        at 
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:347)
        at 
org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:164)
        at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:130)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)

The aggregation pom, contains:
<modules>
        <module>mm2-jar</module>
        <module>mm2-webapp</module>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to