dhorions / DynamodbToCSV4j

Dump DynamoDB data into a CSV file using java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot include as Maven Dependency

alienscience opened this issue · comments

Because the project contains no pom.xml, jitpack.io cannot build the project:

https://jitpack.io/com/github/dhorions/DynamodbToCSV4j/v0.1/build.log

This means the project is unavailable as a maven dependency. Would it be possible to include a pom.xml?

The following pom.xml worked for me:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.dhorions</groupId>
    <artifactId>DynamodbToCSV4j</artifactId>
    <version>**REPLACE**</version>
    <packaging>jar</packaging>

    <name>dynamodbExport</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-bom</artifactId>
            <version>1.11.113</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-dynamodb</artifactId>
            <version>1.11.113</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20160810</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.3</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

You also need to change or JSON imports to use org.json instead of aws e.g:

import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;

Thanks for the pom file, that was really helpful. I have included it (and other changes) in pull request #3