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


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


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

Reply via email to