非官方Snapchat API和Maven

时间:2015-04-07 16:39:21

标签: java maven cmd

我是java的初学程序员,对Maven一无所知,除了我从教程中用勺子喂养的东西之外还有什么。但是,在将API库移动到我的用户/文件夹并将pom.xml文件放入同一目录之后,我运行命令提示符并获得了一个构建失败的内容

"无法执行目标org.apache.maven.plugins:maven-assembly-plugin:2.beta-5:项目JavaSnap上的程序集:读取程序集时出错:找不到程序集描述符。 - > [帮助1]"

我不知道如何运行maven,我真的不想学习它(对我来说这似乎相当麻烦)除了这个项目之外的任何事情。我宁愿做这个并完成。再一次,我不知道如何使用Maven,所以请向我解释一下,就像我5岁。

API链接: https://github.com/hatboysam/JavaSnap

http://maven.apache.org/xsd/maven-4.0.0.xsd">     4.0.0

<groupId>com.habosa</groupId>
<artifactId>JavaSnap</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.2</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <transformers>
                            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <mainClass>com.habosa.javasnap.Main</mainClass>
                            </transformer>
                        </transformers>
                        <finalName>${project.artifactId}-${project.version}-withDependency-ShadedForAndroid</finalName>
                        <artifactSet>
                            <includes>
                                <include>com.mashape.unirest:unirest-java</include>
                                <include>org.apache.httpcomponents:httpclient</include>
                                <include>org.apache.httpcomponents:httpcore</include>
                                <include>org.apache.httpcomponents:httpcore-nio</include>
                                <include>org.apache.httpcomponents:httpasyncclient</include>
                                <include>org.apache.httpcomponents:httpmime</include>
                                <include>org.json:json</include>
                                <include>commons-logging:commons-logging</include>
                                <include>commons-codec:commons-codec</include>
                                <include>commons-io:commons-io</include>
                            </includes>
                        </artifactSet>
                        <relocations>
                            <relocation>
                                <pattern>org.apache.http</pattern>
                                <shadedPattern>com.mashape.relocation</shadedPattern>
                            </relocation>
                        </relocations>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>com.mashape.unirest</groupId>
        <artifactId>unirest-java</artifactId>
        <version>1.3.27</version>
    </dependency>

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
    </dependency>
</dependencies>

0 个答案:

没有答案