You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kelly Davis (JIRA)" <ji...@codehaus.org> on 2009/01/05 16:01:19 UTC

[jira] Commented: (MCOMPILER-41) recompiling behaves differently when build.sourceDirectory is not set to the default path src/main/java/

    [ http://jira.codehaus.org/browse/MCOMPILER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159948#action_159948 ] 

Kelly Davis commented on MCOMPILER-41:
--------------------------------------

I did some playing with the source for the plexus-compiler-api to see what was happening. Basically the issue appears to be a result of specifying multiple source roots. If I specify a sourceDirectory as src and in src I actually have 2 (or more) source directories, everything compiles fine, but the mapping between source and target files are screwed up (because I really have multiple source directories). So when the scanner checks to see if the file(s) need to be compiled, they aren't there. I fixed the sourceDirectory to specify just one of my source directories under src, and then use the buildhelper plugin to add the additional source directories, and it is now detecting changes properly. The only potential issue here, I guess, is that it would be nice if it would detect and give a warning when you specify multiple source directories.

> recompiling behaves differently when build.sourceDirectory is not set to the default path src/main/java/
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-41
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-41
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>         Environment: Linux, Windox XP
>            Reporter: akinokaze
>            Assignee: Olivier Lamy
>         Attachments: MavenWebTest.zip, MCOMPILER-41.zip
>
>
> the default build.sourceDirectory is at src/man/java
> When our code is located in this default directory, the first time we run mvn compile all the source codes will be compiled as expected.
> When we run mvn compile again without any changes to the src code, the message 
> "Nothing to compile - all classes are up to date", which is also the expected behaviour.
> If we set build.sourceDirectory to another directory, the behaviour is different.
> The first time we run mvn compile all the source codes will be compiled as expected.
> But when we run mvn compile again without any changes to the src code, all the source codes are compiled again.
> This will increase the rebuild time significantly.

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