HBASE-8200 Integration Test classes are not part of the default HBase classpath.

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1501602 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2013-07-09 23:09:42 +00:00
parent 37c453f6bc
commit 0e22f9ec78
5 changed files with 66 additions and 24 deletions

View File

@ -141,13 +141,10 @@ if [ -d "$HBASE_HOME/hbase-server/target/hbase-webapps" ]; then
fi fi
add_maven_deps_to_classpath() { add_maven_deps_to_classpath() {
# Need to generate classpath from maven pom. This is costly so generate it
# and cache it. Save the file into our target dir so a mvn clean will get
# clean it up and force us create a new one.
f="${HBASE_HOME}/target/cached_classpath.txt" f="${HBASE_HOME}/target/cached_classpath.txt"
if [ ! -f "${f}" ] if [ ! -f "${f}" ]
then then
echo "As this is a development environment, we need ${f} to be generated from maven (command: mvn compile)" echo "As this is a development environment, we need ${f} to be generated from maven (command: mvn install -DskipTests)"
exit 1 exit 1
fi fi
CLASSPATH=${CLASSPATH}:`cat "${f}"` CLASSPATH=${CLASSPATH}:`cat "${f}"`

View File

@ -98,12 +98,9 @@ if "%in_dev_env%"=="true" (
for /f %%i in ('dir /b %HBASE_HOME%\hbase-*') do ( for /f %%i in ('dir /b %HBASE_HOME%\hbase-*') do (
if exist %%i\target\test-classes set CLASSPATH=!CLASSPATH!;%%i\target\test-classes if exist %%i\target\test-classes set CLASSPATH=!CLASSPATH!;%%i\target\test-classes
) )
rem Need to generate classpath from maven pom. This is costly so generate it
rem and cache it. Save the file into our target dir so a mvn clean will get
rem clean it up and force us create a new one.
if NOT exist "%cached_classpath_filename%" ( if NOT exist "%cached_classpath_filename%" (
echo "As this is a development environment, we need %cached_classpath_filename% to be generated from maven (command: mvn compile)" echo "As this is a development environment, we need %cached_classpath_filename% to be generated from maven (command: mvn install -DskipTests)"
goto :eof goto :eof
) )

View File

@ -58,6 +58,68 @@
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- generates the file that will be used by the bin/hbase script in the dev env -->
<id>create-hbase-generated-classpath</id>
<phase>test</phase>
<goals>
<goal>build-classpath</goal>
</goals>
<configuration>
<outputFile>${project.build.directory}/../../target/cached_classpath.txt</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
<dependencies>
<!-- Intra-project dependencies -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-it</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-common</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-hadoop-compat</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-hadoop-compat</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>${compat.module}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>${compat.module}</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</project> </project>

View File

@ -117,22 +117,6 @@
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- generates the file that will be used by the bin/hbase script in the dev env -->
<id>create-hbase-generated-classpath</id>
<phase>test</phase>
<goals>
<goal>build-classpath</goal>
</goals>
<configuration>
<outputFile>${project.build.directory}/../../target/cached_classpath.txt</outputFile>
</configuration>
</execution>
</executions>
</plugin>
<!-- Run integration tests with mvn verify --> <!-- Run integration tests with mvn verify -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -683,12 +683,14 @@
<exclude>**/control</exclude> <exclude>**/control</exclude>
<exclude>**/conffile</exclude> <exclude>**/conffile</exclude>
<exclude>docs/*</exclude> <exclude>docs/*</exclude>
<exclude>logs/*</exclude>
<!-- auto-gen docs --> <!-- auto-gen docs -->
<!--It don't like freebsd license--> <!--It don't like freebsd license-->
<exclude>**/src/main/site/resources/css/freebsd_docbook.css</exclude> <exclude>**/src/main/site/resources/css/freebsd_docbook.css</exclude>
<!-- exclude source control files --> <!-- exclude source control files -->
<exclude>.git/**</exclude> <exclude>.git/**</exclude>
<exclude>.svn/**</exclude> <exclude>.svn/**</exclude>
<exclude>**/.settings/**</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>