如何在基于 Maven 的 Java 项目中安装 MWS 库? [英] How to work install MWS library in Java, Maven based project?

查看:70
本文介绍了如何在基于 Maven 的 Java 项目中安装 MWS 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次尝试将 MWS 库与 Java 结合使用.我有基于 Spring Boot 的小应用 Maven.我想通过 https://mvnrepository.com/ 安装 mwsmws 我在 Fishbowldev 上找到了几个库.在撰写本文时,repo 似乎不可用.我想要的 图书馆 示例使用.

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.

目前,我的 pom.xml 看起来如下:

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>

除了手动安装之外,还有其他方法可以将这个库添加到我的 pom.xml 文件中吗?

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

推荐答案

我没有为我的问题找到任何确切的解决方案.相反,我找到了一个解决方法.在 Mavenised 旧的 MWS Java SDK 的项目="nofollow noreferrer">GitHub.

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.

该解决方案不会创建任何使用 MWS 的奇特方式,它只是基于 Maven 的项目的便捷包装器.

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

这篇关于如何在基于 Maven 的 Java 项目中安装 MWS 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆