我目前正在开发一个使用maven来管理依赖项的java项目。
在这个项目中,我想使用javabuilders库。根据{{3}},我的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/xsd/maven-4.0.0.xsd"
>
<modelVersion>4.0.0</modelVersion>
<groupId>fr.gouv.finances</groupId>
<artifactId>gold</artifactId>
<version>1.0</version>
<repositories>
<repository>
<id>jcenter</id>
<url>http://jcenter.bintray.com/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javabuilders</groupId>
<artifactId>core</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>javabuilders</groupId>
<artifactId>swing-core</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>javabuilders</groupId>
<artifactId>swing-glazedlists</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.8.2</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>1.6</compilerVersion>
<source>1.6</source>
<target>1.6</target>
<includes>
<include>**/*.yml</include>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>
问题是找不到依赖项:
javabuilders:swing-core:未找到1.3.0。
似乎不会将依赖项搜索到jcenter中。我应该在pom.xml
文件中添加更多内容,还是添加到我的settings.xml
文件中?
提前感谢您的帮助!