You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by sp...@apache.org on 2017/08/31 19:20:00 UTC
sentry git commit: SENTRY-967: Use the Maven Dependency Plugin to
download artifacts for the Sqoop tests (Brian Towles,
reviewd by Colm O hEigeartaigh)
Repository: sentry
Updated Branches:
refs/heads/master 8474ec7de -> 24ea4a412
SENTRY-967: Use the Maven Dependency Plugin to download artifacts for the Sqoop tests (Brian Towles, reviewd by Colm O hEigeartaigh)
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/24ea4a41
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/24ea4a41
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/24ea4a41
Branch: refs/heads/master
Commit: 24ea4a412355a4d839ca8357adee301441de6da2
Parents: 8474ec7
Author: Sergio Pena <se...@cloudera.com>
Authored: Thu Aug 31 14:17:03 2017 -0500
Committer: Sergio Pena <se...@cloudera.com>
Committed: Thu Aug 31 14:17:03 2017 -0500
----------------------------------------------------------------------
sentry-tests/sentry-tests-sqoop/pom.xml | 111 +++++++++----------
.../tests/e2e/sqoop/TomcatSqoopRunner.java | 8 +-
2 files changed, 54 insertions(+), 65 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sentry/blob/24ea4a41/sentry-tests/sentry-tests-sqoop/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-sqoop/pom.xml b/sentry-tests/sentry-tests-sqoop/pom.xml
index 93a2bd2..9e7cee9 100644
--- a/sentry-tests/sentry-tests-sqoop/pom.xml
+++ b/sentry-tests/sentry-tests-sqoop/pom.xml
@@ -159,66 +159,55 @@ limitations under the License.
</dependency>
</dependencies>
</profile>
- <profile>
- <id>download-sqoop2</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property><name>!skipTests</name></property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- <executions>
- <execution>
- <id>download-sqoop2</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <echo file="target/download.sh">
- set -e
- set -x
- /bin/pwd
- BASE_DIR=./target
- DOWNLOAD_DIR=./thirdparty
- if which wget >/dev/null; then
- DOWNLOAD_CMD="wget --no-check-certificate -nv -O"
- elif which curl >/dev/null; then
- DOWNLOAD_CMD="curl -sS -o"
- fi
- if [ -z $DOWNLOAD_CMD ]; then
- echo "Can't find command 'wget' or 'curl'"
- exit 1
- fi
- download() {
- url=$1;
- packageName=$2
- if [[ ! -f $DOWNLOAD_DIR/$packageName ]]
- then
- $DOWNLOAD_CMD $DOWNLOAD_DIR/$packageName $url
- fi
- }
- mkdir -p $DOWNLOAD_DIR
- download "https://repository.apache.org/content/repositories/snapshots/org/apache/sqoop/sqoop-server/2.0.0-SNAPSHOT/sqoop-server-2.0.0-20150530.005523-4.war" sqoop.war
- download "http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.zip" apache-tomcat-6.0.36.zip
- </echo>
- <exec executable="bash" dir="${basedir}" failonerror="true">
- <arg line="target/download.sh"/>
- </exec>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
+ <profile>
+ <id>download-sqoop2</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <property>
+ <name>!skipTests</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>download-deps</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat</artifactId>
+ <version>7.0.81</version>
+ <type>zip</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>target/thirdparty</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.sqoop</groupId>
+ <artifactId>sqoop-server</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <type>war</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>target/thirdparty</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <stripVersion>true</stripVersion>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
http://git-wip-us.apache.org/repos/asf/sentry/blob/24ea4a41/sentry-tests/sentry-tests-sqoop/src/test/java/org/apache/sentry/tests/e2e/sqoop/TomcatSqoopRunner.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-sqoop/src/test/java/org/apache/sentry/tests/e2e/sqoop/TomcatSqoopRunner.java b/sentry-tests/sentry-tests-sqoop/src/test/java/org/apache/sentry/tests/e2e/sqoop/TomcatSqoopRunner.java
index 3817cba..2687bc5 100644
--- a/sentry-tests/sentry-tests-sqoop/src/test/java/org/apache/sentry/tests/e2e/sqoop/TomcatSqoopRunner.java
+++ b/sentry-tests/sentry-tests-sqoop/src/test/java/org/apache/sentry/tests/e2e/sqoop/TomcatSqoopRunner.java
@@ -165,8 +165,8 @@ public class TomcatSqoopRunner {
}
private static class SqoopServerEnableSentry extends SqoopMiniCluster {
- private static final String WAR_PATH = "thirdparty/sqoop.war";
- private static final String TOMCAT_PATH = "thirdparty/apache-tomcat-6.0.36.zip";
+ private static final String WAR_PATH = "target/thirdparty/sqoop-server.war";
+ private static final String TOMCAT_PATH = "target/thirdparty/tomcat.zip";
private InstalledLocalContainer container = null;
private Integer port;
@@ -236,9 +236,9 @@ public class TomcatSqoopRunner {
installer.install();
LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory()
- .createConfiguration("tomcat6x", ContainerType.INSTALLED, ConfigurationType.STANDALONE,
+ .createConfiguration("tomcat7x", ContainerType.INSTALLED, ConfigurationType.STANDALONE,
confPath);
- container = (InstalledLocalContainer) new DefaultContainerFactory().createContainer("tomcat6x",
+ container = (InstalledLocalContainer) new DefaultContainerFactory().createContainer("tomcat7x",
ContainerType.INSTALLED, configuration);
// Set home to our installed tomcat instance