Maybe a dumb question, but: are there already sources in that directory?
It seems to me it is only added to your build, but I don't see a plugin
writing something there...
Roland
On 21.02.2012 10:02, Stephane-3 wrote:
> Hello,
>
> I have a Maven build that correctly adds a source directory, or so it seems.
>
> The pom file:
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>build-helper-maven-plugin</artifactId>
> <version>1.7</version>
> <executions>
> <execution>
> <id>add-source</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>add-source</goal>
> </goals>
> <configuration>
> <sources>
> <source>${basedir}/client/generated/cxf</source>
> </sources>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> The log says:
>
> [INFO] [build-helper:add-source {execution: add-source}]
> [INFO] Source directory:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/generated/cxf
> added.
>
> The full log output:
>
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO] webapp-on-abcdata
> [INFO] webapp-on-abcdata-client
> [INFO] webapp-on-abcdata-web
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building webapp-on-abcdata
> [INFO] task-segment: [clean, install]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [build-helper:add-source {execution: add-source}]
> [INFO] Source directory:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/generated/cxf
> added.
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/pom.xml to
> /home/stephane/.m2/repository/no/nki/webapp-on-abcdata/1.0-SNAPSHOT/webapp-on-abcdata-1.0-SNAPSHOT.pom
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building webapp-on-abcdata-client
> [INFO] task-segment: [clean, install]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target
> (included: [**], excluded: [])
> [INFO] [build-helper:add-source {execution: add-source}]
> [INFO] Source directory:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/client/generated/cxf
> added.
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] File encoding has not been set, using platform encoding UTF-8,
> i.e. build is platform dependent!
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 4 resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 2 source files to
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target/classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target/webapp-on-abcdata-client-1.0-SNAPSHOT.jar
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target/webapp-on-abcdata-client-1.0-SNAPSHOT.jar
> to
> /home/stephane/.m2/repository/no/nki/webapp-on-abcdata-client/1.0-SNAPSHOT/webapp-on-abcdata-client-1.0-SNAPSHOT.jar
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building webapp-on-abcdata-web
> [INFO] task-segment: [clean, install]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/target
> (included: [**], excluded: [])
> [INFO] [build-helper:add-source {execution: add-source}]
> [INFO] Source directory:
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/client/generated/cxf
> added.
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] File encoding has not been set, using platform encoding UTF-8,
> i.e. build is platform dependent!
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 4 source files to
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/target/classes
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
>
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/src/main/java/no/nki/abcdata/controller/HelloController.java:[8,33]
> package no.abcdata.vcrmservice.dto does not exist
>
> /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/src/main/java/no/nki/abcdata/controller/HelloController.java:[9,33]
> package no.abcdata.vcrmservice.dto does not exist
>
> Any clue ?
>
> Stephane
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Added-source-directory-still-allows-for-compile-errors-tp5501630p5501630.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
Roland Asmann
Senior Software Engineer
adesso Austria GmbH
Floridotower 26. Stock T +43 1 2198790-27
Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E [email protected]
W www.adesso.at
-------------------------------------------------------------
>>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]