How to work install MWS library in Java, Maven based project?

匆匆过客 提交于 2020-01-06 08:04:40

问题


It's the first time I am trying to use MWS library with Java. I have small Spring Boot application Maven-based. I wanted to install mws from https://mvnrepository.com/ by mws I found several libraries located on Fishbowldev. At the time of writing this post, repo seems to be unavailable. Example of library I wanted to use.

At the moment, my pom.xml looks the following way:

<?xml version="1.0" encoding="UTF-8"?>
<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>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>io.test.api</groupId>
    <artifactId>test-api</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>test-api</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <repositories>
        <repository>
            <id>fishbowldev</id>
            <name>Fishbowldev Repository</name>
            <url>http://murky.fishbowldev.com:8081/nexus/content/repositories/releases/</url>
            <releases>
               <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- MWS libraries -->
        <!-- https://mvnrepository.com/artifact/amazon/mws-client -->
        <dependency>
            <groupId>amazon</groupId>
            <artifactId>mws-client</artifactId>
            <version>1.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/amazon/mws-sellers -->
        <dependency>
            <groupId>amazon</groupId>
            <artifactId>mws-sellers</artifactId>
            <version>2011-07-01</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/amazon/mws-orders -->
        <dependency>
            <groupId>amazon</groupId>
            <artifactId>mws-orders</artifactId>
            <version>2013-09-01-2015-09-25</version>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Is there any other way except of manual installation to add this library to my pom.xml file?


回答1:


I didn't find any exact solution for my question. Instead I found a workaround. The project that Mavenised the old MWS Java SDK on GitHub.

The solution doesn't create any fancy way of working with MWS it is just a convenient wrapper for Maven-based projects.



来源:https://stackoverflow.com/questions/54774496/how-to-work-install-mws-library-in-java-maven-based-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!