地理服务器中 MAVEN 中缺少工件错误

Missing Artifact error in MAVEN in geoserver

<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>org.geoserver</groupId>
   <artifactId>hello_wps</artifactId>
   <packaging>jar</packaging>
   <version>8-ENTERPRISE-SNAPSHOT</version>
   <name>hello_wps</name>
   <dependencies>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-process</artifactId>
      <version>8-SNAPSHOT</version>
    </dependency>
    <dependency>
       <groupId>org.geoserver</groupId>
       <artifactId>main</artifactId>
       <version>8-ENTERPRISE-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>


<dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>com.mockrunner</groupId>
       <artifactId>mockrunner</artifactId>
       <version>0.3.1</version>
      <scope>test</scope>
     </dependency>
   </dependencies>

   <build>
     <plugins>
       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <source>1.5</source>
           <target>1.5</target>
         </configuration>
      </plugin>
    </plugins>
   </build>

   <repositories>
     <repository>
       <id>opengeo</id>
       <name>opengeo</name>
       <url>http://repo.opengeo.org</url>
     </repository>
   </repositories>

</project>

我也是 maven 和 geoserver 的新手。只是尝试基本安装地理服务器并在 Maven 项目的 POM.XML 文件中发现错误。错误显示在两个 <dependency> 选项卡中,它们恰好在 <dependencies> 选项卡之后的第一个和第二个。

错误:

Missing artifact org.geotools:gt-process:jar:8-SNAPSHOT

Missing artifact org.geoserver:main:jar:tests:8-ENTERPRISE-SNAPSHOT

感谢提前解决。

如果您查看 geotools 的快速入门文档: http://docs.geotools.org/latest/userguide/tutorial/quickstart/maven.html

第 7 步"under Creating a new project"

If you are using a nightly build (such as 14-SNAPSHOT) and add a reference to the snapshot repository.

<repositories>
    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>boundless</id>
      <name>Boundless Maven Repository</name>
      <url>http://repo.boundlessgeo.com/main</url>
    </repository>
</repositories>

我快速浏览了此存储库中可用的版本并要使用它,您需要将 Maven 坐标更改为类似以下内容:

<dependency>
  <groupId>org.geotools</groupId>
  <artifactId>gt-process</artifactId>
  <version>10-SNAPSHOT</version>
</dependency>
<dependency>
   <groupId>org.geoserver</groupId>
   <artifactId>main</artifactId>
   <version>2.4.8</version>
   <classifier>tests</classifier>
   <scope>test</scope>
 </dependency>

因为您想要的原始版本不存在。