无法解决项目的依赖项

时间:2014-02-02 17:01:03

标签: java maven jar intellij-idea compilation

我是maven的新手,我正在尝试使用pom.xml将项目编译到jar中。我对插件做了一些小改动,我想编译它以供使用。但是,在尝试使用" mvn install"进行编译时在" pom.xml"的目录中在其中,我收到错误:http://puu.sh/6Hs2f/92c3a81adb.png

pom.xml:

<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.minecraftdimensions.bungeesuitespawn</groupId>
    <artifactId>BungeeSuiteSpawn</artifactId>
    <version>0.5</version>
    <packaging>jar</packaging>
    <name>BungeeSuiteSpawn</name>

    <properties>
        <build.number>${BUILD_NUMBER}</build.number>
    </properties>

    <repositories>
        <repository>
            <id>bukkit-repo</id>
            <url>http://repo.bukkit.org/content/groups/public</url>
        </repository>
        <repository>
            <id>vault-repo</id>
            <url>http://ci.herocraftonline.com/plugin/repository/everything</url>
        </repository>
        <repository>
            <id>md-5</id>
            <url>
                http://ci.md-5.net/job/BungeeSuiteTeleports/com.minecraftdimensions.bungeesuiteteleports$BungeeSuiteTeleports/lastBuild/artifact/
            </url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>bukkit</artifactId>
            <version>1.6.2-R0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.minecraftdimensions.bungeesuiteteleports</groupId>
            <artifactId>BungeeSuiteTeleports</artifactId>
            <version>0.50</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>${project.name}</finalName>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <includes>
                    <include>**</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

GitHub项目:https://github.com/Nentify/BungeeSuiteSpawn

1 个答案:

答案 0 :(得分:0)

minecraftdimensions.bungeesuitespawn artifact not exist on repository http://repo.bukkit.org/content/groups/public/`。

您可以从存储库下载jar并使用系统范围创建构建。 ${basedir}是您的目录。

 <dependency>
        <artifactId>..</artifactId>
        <groupId>..</groupId>
        <scope>system</scope>
        <version>0.5</version> 
        <systemPath>${basedir}/BungeeSuiteTeleports.jar</systemPath>
    </dependency>