[ https://jira.codehaus.org/browse/MCOMPILER-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=307127#comment-307127 ]
Mark Struberg commented on MCOMPILER-21: ---------------------------------------- gosh, it's even more broken. We also have problems detecting compile dependencies inside the same module! Compile a project with 2 classes: {code} public class BeanA { getI() {return 42;} } public class BeanA2 { getI() { return new BeanA().getI(); } } {code} Now go on and change BeanA#getI() to BeanA#getI_broken(). Since BeanA2 still uses the now non-existing getI() we should get a compile error. But 'mvn compile' only detects that BeanA needs a compile and doesn't recompile BeanB. The whole plexus StaleSourceScanner doesn't work as expected and should get dropped imo. Detecting cross dependencies would only be possible by a full code analysis and could require multi-pass scans. It's much more simple to just recompile the whole plugin in that case once we detect a 'newer' file. Once we hit a java file which is newer than it' corresponding class file then we need to recompile all classes. > compiler smarts > --------------- > > Key: MCOMPILER-21 > URL: https://jira.codehaus.org/browse/MCOMPILER-21 > Project: Maven 2.x Compiler Plugin > Issue Type: Bug > Reporter: Brett Porter > Assignee: Mark Struberg > Fix For: backlog > > Attachments: MCOMPILER-21.patch > > > there are probably other ways we can make the compiler stale check smarter. > List them out here if you think of them. > 1) if a snapshot was resolved to a newer version, rebuild everything. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira