我已按照以下链接创建了一个maven项目Create Project。就像创建一个简单的gwt项目然后配置为maven。到这里它很简单没有任何问题。就像我们的数据库,我一直在尝试添加couchdb依赖。
问题1:尝试了很多方法但无法添加couchdb 4j依赖。
错误:缺少工件com.google.code:couchdb4j:jar:0.1.2
现在,想要解决方案。
查询:还有其他方法可以与maven一起使用GWT。
编辑1 我从一个链接中得到了一个pom.xml,其中有couchdb4j,但仍然没有收到create document(),getDocument()的基本功能。如在构建路径中所见,couchdb4j未添加到maven依赖项。
客户端和服务器端使用maven依赖项有什么不同吗?
<?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>couchdb4j</groupId>
<artifactId>couchdb4j</artifactId>
<name>CouchDB4J</name>
<version>0.3.0-i386-1</version>
<url>http://code.google.com/p/couchdb4j/</url>
<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
</exclusion>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.3</version>
<scope>compile</scope>
<classifier>jdk15</classifier>
<exclusions>
<exclusion>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>ezmorph</artifactId>
<version>1.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0-beta2</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>codehaus.snapshots</id>
<name>Codehaus Maven Snapshot Repository</name>
<url>http://snapshots.repository.codehaus.org</url>
<snapshots>
</snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>nexus</id>
<name>My Nexus</name>
<url>http://localhost:8081/nexus/content/repositories/thirdparty/</url>
</repository>
</distributionManagement>
</project>
暂时我按原样加入。
还没有意识到为什么它没有添加依赖项?
从依赖项添加couchdb4j jar到底我需要做什么?
答案 0 :(得分:0)
<repositories>
<repository>
<id>repo-wso2</id>
<url>http://maven.wso2.org/nexus/content/repositories/abdera.couchdb.temporary</url>
</repository>
</repositories>