gpt4 book ai didi

java - org.jivesoftware :smack:jar:3. 4.1-0cec571 的 POM 丢失

转载 作者:太空宇宙 更新时间:2023-11-04 13:32:51 25 4
gpt4 key购买 nike

我有一些用于 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>

有解决这个问题的想法吗?

最佳答案

尝试替换:

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

与:

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

根据http://mvnrepository.com/artifact/jivesoftware/smack Artifact 被移动了。看来artifactId也从smack改为smack-core和friends。

关于java - org.jivesoftware :smack:jar:3. 4.1-0cec571 的 POM 丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31999134/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com