简体   繁体   English

地理服务器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>

i'm new to maven and geoserver as well. 我也是Maven和Geoserver的新手。 was just trying basic installation of geoserver and found the error in POM.XML file of maven project. 刚尝试基本安装geoserver并在maven项目的POM.XML文件中发现错误。 Error is shown in two <dependency> tabs which are exactly 1st and 2nd after <dependencies> tab. 误差被示出以两种<dependency>突片,其是后恰好第一和第二<dependencies>标签。

Errors : 错误:

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

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

Thanks for the solution in advance. 感谢您提前提出解决方案。

If you look at the quick start docs for geotools: http://docs.geotools.org/latest/userguide/tutorial/quickstart/maven.html 如果您查看geotools的快速入门文档: http ://docs.geotools.org/latest/userguide/tutorial/quickstart/maven.html

step 7 "under Creating a new project" 步骤7“在创建新项目下”

If you are using a nightly build (such as 14-SNAPSHOT) and add a reference to the snapshot repository. 如果您使用的是夜间构建(例如14-SNAPSHOT),请添加对快照存储库的引用。

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

I have taken a quick look at the versions available in this repository and to use it, you will need to change your maven co-ordinates to something like: 我快速浏览了该存储库中可用的版本,并使用它,您将需要将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>

as the original versions you are after are not present. 因为您所追求的原始版本不存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM