[ http://jira.codehaus.org/browse/MAVEN-1706?page=all ]
     
Lukas Theussl closed MAVEN-1706:
--------------------------------

     Assign To: Lukas Theussl
    Resolution: Won't Fix

I don't see what is the problem here. First, if you set sourceDirectory to src/ 
and you have other source files under src/ (but not under src/java), then I 
naturally expect those files to be compiled as well. Second, AFAICT, 
maven.src.dir is not used anymore in any of the plugins included in maven, even 
though it's default value is still set to ${basedir}/src. Third, if any plugin 
makes an assumption about the location of the sources, it's a bug of that 
plugin and should be reported there.

> maven.src.dir != pom.build.sourceDirectory
> ------------------------------------------
>
>          Key: MAVEN-1706
>          URL: http://jira.codehaus.org/browse/MAVEN-1706
>      Project: Maven
>         Type: Bug

>   Components: documentation, core
>     Versions: 1.0.2
>     Reporter: Peter Lynch
>     Assignee: Lukas Theussl

>
>
> Maven documentation states on 
> http://maven.apache.org/reference/properties.html
> maven.src.dir          The base directory for source code. DEPRECATED: 
> Currently unused. Instead, use the <sourceDirectory>  element of the POM.     
>  ${basedir}/src
> Problem is that maven.src.dir != pom.build.sourceDirectory in practice.
> default of maven.src.dir property is ${basedir}/src. Most plugins project.xml 
> and their dependent Jelly plugin code expect pom.build.sourceDirectory to 
> point to src/java, ie. where your Java sources are located.
> Try setting sourceDirectory element in your java project's POM to 'src' and 
> watch the various java/jar/junit plugin's croak if you have any other Java 
> source files in any other location than src/java because they all will try to 
> be compiled all at one. Another example: Grep for pom.build.sourceDirectory 
> in your plugin cache and look at all the code that expects it to point to 
> src/java, where you java sources live.
> The solution for existing projects is to ignore the documentation as written 
> and make pom.build.sourceDirectory still point to src/java, then use 
> maven.src.dir when they want the real root source directory. The 
> documentation needs to be replaced on this front. Or replace the code in 10+ 
> standard plugins to not assume sourceDirectory element is pointing to Java 
> home.

-- 
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