[ 
https://issues.apache.org/jira/browse/HADOOP-7589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Joseph Evans updated HADOOP-7589:
----------------------------------------

    Description: 
I got a failure running test-patch with a clean .m2 directory.

To quote Alejandro:
{quote}
The reason for this failure is because of how Maven reactor/dependency
resolution works (IMO a bug).

Maven reactor/dependency resolution is smart enough to create the classpath
using the classes from all modules being built.

However, this smartness falls short just a bit. The dependencies are
resolved using the deepest maven phase used by current mvn invocation. If
you are doing 'mvn compile' you don't get to the test compile phase.  This
means that the TEST classes are not resolved from the build but from the
cache/repo.

The solution is to run 'mvn test -DskipTests' instead 'mvn compile'. This
will include the TEST classes from the build.
{quote}

So this is to replace mvn compile in test-patch.sh with mvn test -DskipTests

  was:
I got a failure running test-patch with a clean .m2 directory.

To quote Alejandro:
{bq}
The reason for this failure is because of how Maven reactor/dependency
resolution works (IMO a bug).

Maven reactor/dependency resolution is smart enough to create the classpath
using the classes from all modules being built.

However, this smartness falls short just a bit. The dependencies are
resolved using the deepest maven phase used by current mvn invocation. If
you are doing 'mvn compile' you don't get to the test compile phase.  This
means that the TEST classes are not resolved from the build but from the
cache/repo.

The solution is to run 'mvn test -DskipTests' instead 'mvn compile'. This
will include the TEST classes from the build.
{bq}

So this is to replace mvn compile in test-patch.sh with mvn test -DskipTests


> Prefer mvn test -DskipTests over mvn compile in test-patch.sh
> -------------------------------------------------------------
>
>                 Key: HADOOP-7589
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7589
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.23.0, 0.24.0
>            Reporter: Robert Joseph Evans
>            Assignee: Robert Joseph Evans
>             Fix For: 0.23.0, 0.24.0
>
>
> I got a failure running test-patch with a clean .m2 directory.
> To quote Alejandro:
> {quote}
> The reason for this failure is because of how Maven reactor/dependency
> resolution works (IMO a bug).
> Maven reactor/dependency resolution is smart enough to create the classpath
> using the classes from all modules being built.
> However, this smartness falls short just a bit. The dependencies are
> resolved using the deepest maven phase used by current mvn invocation. If
> you are doing 'mvn compile' you don't get to the test compile phase.  This
> means that the TEST classes are not resolved from the build but from the
> cache/repo.
> The solution is to run 'mvn test -DskipTests' instead 'mvn compile'. This
> will include the TEST classes from the build.
> {quote}
> So this is to replace mvn compile in test-patch.sh with mvn test -DskipTests

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to