Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions commons-vfs2-ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,22 @@
<description>Apache Commons VFS Ant Tasks.</description>

<dependencies>

<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>test</scope>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
</dependency>

</dependencies>

<properties>
Expand Down
76 changes: 71 additions & 5 deletions commons-vfs2-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,35 @@
</parent>

<dependencies>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
</dependency>

<!-- Optional dependencies -->
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<optional>true</optional>
</dependency>

</dependencies>

<properties>
<commons.parent.dir>${basedir}/..</commons.parent.dir>
<commons.module.name>org.apache.commons.vfs2.examples</commons.module.name>
<japicmp.skip>true</japicmp.skip>
<commons.osgi.import>
*
Expand Down Expand Up @@ -136,6 +141,26 @@
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>verify-undeclared-deps</id>
<configuration>
<!-- Runtime-only dependencies go here -->
<ignoredUnusedDeclaredDependencies combine.children="append">
<dependency>commons-httpclient:commons-httpclient</dependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
Expand All @@ -153,6 +178,26 @@
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>verify-undeclared-deps</id>
<configuration>
<!-- Runtime-only dependencies go here -->
<ignoredUnusedDeclaredDependencies combine.children="append">
<dependency>org.apache.httpcomponents:httpclient</dependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
Expand All @@ -170,6 +215,27 @@
<scope>runtime</scope>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>verify-undeclared-deps</id>
<configuration>
<!-- Runtime-only dependencies go here -->
<ignoredUnusedDeclaredDependencies combine.children="append">
<dependency>org.apache.httpcomponents.client5:httpclient5</dependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
Expand Down
121 changes: 94 additions & 27 deletions commons-vfs2-hdfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,76 +34,126 @@
<description>Apache Commons VFS is a Virtual File System library - Apache Hadoop HDFS provider.</description>

<dependencies>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs-client</artifactId>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<artifactId>hadoop-common</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.avro</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<scope>test</scope>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs-client</artifactId>
<scope>runtime</scope>
</dependency>

<!--
~ Tests: compile dependencies
-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<scope>test</scope>
</dependency>
<!-- Test HDFS with Apache Hadoop -->

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<artifactId>hadoop-hdfs</artifactId>
<type>test-jar</type>
<scope>test</scope>
<exclusions>
<!-- Remove unused dependencies with vulnerabilities -->
<exclusion>
<!-- VFS-606 - tools.jar not available in Java 9
This exclusion can be removed after upgrading Hadoop
to 2.7.1 or later
-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<!--
~ Tests: runtime dependencies
-->
<dependency>
<!-- Runtime dependency of `hadoop-hdfs:test-jar` -->
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<artifactId>hadoop-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
<exclusions>
<!-- Remove unused dependencies with vulnerabilities -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<!-- Runtime dependency of `hadoop-hdfs:test-jar` -->
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<properties>
Expand Down Expand Up @@ -219,6 +269,23 @@
</dependencies>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>verify-undeclared-deps</id>
<configuration>
<!-- Runtime-only test dependencies go here -->
<ignoredUnusedDeclaredDependencies combine.children="append">
<dependency>org.apache.hadoop:hadoop-common:test-jar</dependency>
<dependency>org.mockito:mockito-core</dependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DFSConfigKeys;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
Expand Down Expand Up @@ -109,7 +107,6 @@ public static void setUmask(final Configuration config) {
@BeforeAll
public static void setUp() throws Exception {
System.setProperty("test.basedir", "../commons-vfs2/target/test-classes/test-data");
Logger.getRootLogger().setLevel(Level.ERROR);

// Put the MiniDFSCluster directory in the target directory
final File data = new File("target/test/hdfstestdata").getAbsoluteFile();
Expand All @@ -121,7 +118,7 @@ public static void setUp() throws Exception {
conf = new Configuration();
conf.set(FileSystem.FS_DEFAULT_NAME_KEY, HDFS_URI);
conf.set("hadoop.security.token.service.use_ip", "true");
conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 1024 * 1024); // 1M block size
conf.setLong(HdfsClientConfigKeys.DFS_BLOCK_SIZE_KEY, 1024 * 1024); // 1M block size

setUmask(conf);

Expand Down
Loading
Loading