xjar icon indicating copy to clipboard operation
xjar copied to clipboard

大神,我在pom里配置了repository它还是跑到nexus-aliyun里下jar了啊,怎么破

Open lee8519 opened this issue 6 years ago • 15 comments

lee8519 avatar Jan 25 '19 01:01 lee8519

能从aliyun 上下载到吗

core-lib avatar Jan 25 '19 01:01 core-lib

image 下载不到啊,应该没有的

lee8519 avatar Jan 25 '19 02:01 lee8519

你的POM.xml 怎么配置 repository 的 我看下

core-lib avatar Jan 25 '19 02:01 core-lib

pom.txt

这是完整pom.xml

lee8519 avatar Jan 25 '19 02:01 lee8519

你没有指定 pluginRepository 推荐使用 v1.1.2 的 xjar 和 v1.0.8 的插件

core-lib avatar Jan 25 '19 03:01 core-lib

pom.txt 还是不行啊 image

lee8519 avatar Jan 25 '19 04:01 lee8519

我看你的日志是由于你本地有一个缓存,你把本地 .m2 里面 com/github/core-lib/xjar 和 com/github/core-lib/xjar-maven-plugin 都删掉然后用我下面的方式来依赖

<!-- XJar 的repository -->
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<!-- XJar-Maven-Plugin 的repository, 其实是同一个 只不过Maven 需要指定插件的repository -->
<pluginRepositories>
    <pluginRepository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </pluginRepository>
</pluginRepositories>

 <dependencies>
    <!-- XJar 依赖 如果通过插件来打包就不需要这个依赖了,也不需要XJar的repository -->
    <dependency>
        <groupId>com.github.core-lib</groupId>
        <artifactId>xjar</artifactId>
        <version>v1.1.2</version>
    </dependency>

  </dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <!-- XJar 插件 -->
        <plugin>
            <groupId>com.github.core-lib</groupId>
            <artifactId>xjar-maven-plugin</artifactId>
            <version>v1.0.8</version>
            <executions>
                <execution>
                    <goals>
                        <goal>build</goal>
                    </goals>
                    <phase>package</phase>
                    <configuration>
                        <password>io.xjar</password>
                        <excludes>
                            <exclude>BOOT-INF/lib/*.jar</exclude>
                        </excludes>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

core-lib avatar Jan 25 '19 04:01 core-lib

谢大神,我知道了,是maven配置里所有jar都需要去默认仓库下载https://blog.csdn.net/lovewebeye/article/details/80060410 改成这样就OK了 image

lee8519 avatar Jan 25 '19 05:01 lee8519

好 问题解决了吗

core-lib avatar Jan 25 '19 05:01 core-lib

解决啦

lee8519 avatar Jan 25 '19 05:01 lee8519

OK

core-lib avatar Jan 25 '19 05:01 core-lib

Plugin com.github.core-lib:xjar-maven-plugin:v1.0.8 or one of its dependencies could not be resolved: Could not find artifact com.github.core-lib:xjar-maven-plugin:jar:v1.0.8 in nexus (http://maven.aliyun.com/nexus/content/groups/public/) -> [Help 1] 这个问题怎么破???

845999248 avatar Jan 26 '19 10:01 845999248

加pluginRepository

core-lib avatar Jan 26 '19 10:01 core-lib

我从github上拉取了您的项目,没有改任何配置,但是一直拉取不到 io.loadkit 的jar包,在maven的本地仓库看到的jar 的后缀都是 xxx..jar.lastUpdated,根本无法使用。您可以提供 xjar和 loadkit 的jar,方便发送给我吗或者您有可靠的解决方案,楼上的修改maven的setting.xml方法无效?谢谢 邮箱 [email protected]

wuyingdu avatar May 28 '19 02:05 wuyingdu

好的 我下午发给你

core-lib avatar May 28 '19 04:05 core-lib