org.jivesoftware的pOM:smack:jar:3.4.1-0cec571缺失

时间:2015-08-13 21:58:58

标签: java maven dependencies pom.xml smack

我在java中为gcm-server提供了一些java文件。我想将它们组合成一个jar文件。我试图在maven中做这件事(只是学习),但我得到以下错误。 目录的结构是:

--src   
| --main
|   --java
|     --server
|       "my java files here"
--pom.xml

错误:

The POM for org.jivesoftware:smack:jar:3.4.1-0cec571 is missing, no dependency information available

使用的pom.xml是:

<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>gcm.server</groupId>
    <artifactId>gcm-maven</artifactId>
    <packaging>jar</packaging>
    <version>0.1.0</version>

    <!-- tag::joda[] -->
    <properties>
        <java.version>1.7</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>

      <dependency>
            <groupId>org.jivesoftware</groupId>
            <artifactId>smack</artifactId>
            <version>3.4.1-0cec571</version>
      </dependency>

    </dependencies>

    <!-- end::joda[] -->

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>hello.HelloWorld</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

有关解决此事的任何想法吗?

1 个答案:

答案 0 :(得分:0)

尝试更换:

  <dependency>
        <groupId>org.jivesoftware</groupId>
        <artifactId>smack</artifactId>
        <version>3.4.1-0cec571</version>
  </dependency>

with:

<dependency>
    <groupId>org.igniterealtime.smack</groupId>
    <artifactId>smack-core</artifactId>
    <version>4.1.3</version>
</dependency>

根据http://mvnrepository.com/artifact/jivesoftware/smack,工件被移动了。看起来像artifactId也变成了smack-core-core和朋友。