[ https://issues.apache.org/jira/browse/HBASE-6795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456466#comment-13456466 ]
Jesse Yates commented on HBASE-6795: ------------------------------------ In short, you need to do install the first time so you get the dependent jars for the build so maven doesn't complain. The problem comes from the fact that maven isn't smart enough to know that you need to go _past_ the specified build phase for the dependent projects to build the required artifacts (in this case the test jars). I'd argue, perhaps obtusely, that this is (kind of) the correct behavior. You only want to compile the sources, not the test sources for the top-level, and therefore also all children. Its on you if you want the other sources built too. The problem lies in the fact that at compile time it seems to look for the test-jar, even though it is test scoped (which makes ZERO sense). TL;DR maven is dumb, but I thought it was already in the manual. +1 on just updating the manual. > mvn compile fails on a fresh checkout with empty ~/.m2/repo > ----------------------------------------------------------- > > Key: HBASE-6795 > URL: https://issues.apache.org/jira/browse/HBASE-6795 > Project: HBase > Issue Type: Bug > Components: build > Affects Versions: 0.96.0 > Reporter: Enis Soztutar > Assignee: Enis Soztutar > Priority: Critical > > I have noticed that mvn compile fails if your ~/m2/repository/ does not > contain hbase test jars, however mvn test-compile, mvn install, etc works as > expected. > The patch for HBASE-6706 introduced test-jar dependency from hbase-server and > hbase-hadoop1-compat to hbase-hadoop-compat test jar in the test scope. But > stupid maven still tries to resolve the test jar when you do maven compile > (notice that we are not even in the test scope). > mvn test-compile, etc works b/c the test-jar for hbase-hadoop-compat is build > before hbase-hadoop1-compat. > One way to solve this is to push SNAPSHOT test-jars for hbase-hadoop-compat > to the snapshot repository, so next time, they are referenced from there. > Other alternative is to move classes under hbase-hadoop{|1|2}-compat/src/test > to src/main, and remove the test-jar intra-module dependency. Still, it seems > we might need intra-module test-jar dependency in the future. > Any other suggestions are welcome. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira