无法在gwt maven项目中添加couchdb4j依赖项 [英] Unable to add couchdb4j dependency in gwt maven project

查看:133
本文介绍了无法在gwt maven项目中添加couchdb4j依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照以下链接创建了一个maven项目创建项目。就像创建一个简单的gwt项目然后配置maven一样。直到这里它变得简单没有任何问题。像我们couchdb作为我们的数据库,我一直试图添加couchdb依赖。问题1:尝试了很多方法,但无法添加couchdb 4j依赖项。



错误:缺少工件 com.google.code:couchdb4j:jar:0.1.2



现在,想为此解决方案。 p>

查询:是否有任何其他方式可以与GWT一起使用maven。






编辑1
我从链接中获得了pom.xml他们有它的couchdb4j,但仍然没有收到我的基本功能create document(),getDocument()。



客户端和服务器端对maven依赖关系的使用有所不同吗?

 <?xml version =1.0encoding =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>
<名称> CouchDB4J< /名称>
< 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>
<配置>
< source> 1.5< / source>
< target> 1.5< / target>
< / configuration>
< / plugin>
< / plugins>
< / build>

<依赖关系>
< dependency>
< groupId> junit< / groupId>
< artifactId> junit< / artifactId>
< version> 4.5< / version>
< scope> test< / scope>
< /依赖关系>
< dependency>
< groupId> commons-logging< / groupId>
< artifactId> commons-logging< / artifactId>
< version> 1.1.1< / version>
< scope>编译< / scope>
<排除项>
<排除>
< groupId> log4j< / groupId>
< artifactId> log4j< / artifactId>
< /排除>
<排除>
< groupId> logkit< / groupId>
< artifactId> logkit< / artifactId>
< /排除>
<排除>
< groupId> avalon-framework< / groupId>
< artifactId> avalon-framework< / artifactId>
< /排除>
<排除>
< groupId> javax.servlet< / groupId>
< artifactId> servlet-api< / artifactId>
< /排除>
< /排除>

< / dependency>
< dependency>
< groupId> net.sf.json-lib< / groupId>
< artifactId> json-lib< / artifactId>
< version> 2.3< / version>
< scope>编译< / scope>
< classifier> jdk15< / classifier>
<排除项>
<排除>
< groupId> org.jruby< / groupId>
< artifactId> jruby< / artifactId>
< /排除>
<排除>
< groupId> org.codehaus.groovy< / groupId>
< artifactId> groovy-all< / artifactId>
< /排除>
<排除>
< groupId> log4j< / groupId>
< artifactId> log4j< / artifactId>
< /排除>
< /排除>
< /依赖关系>
< dependency>
< groupId> net.sf.ezmorph< / groupId>
< artifactId> ezmorph< / artifactId>
< version> 1.0.4< / version>
< scope>编译< / scope>
< /依赖关系>
< dependency>
< groupId> org.apache.httpcomponents< / groupId>
< artifactId> httpclient< / artifactId>
< version> 4.0-beta2< / version>
< /依赖关系>

< dependency>
< groupId> com.google.gwt< / groupId>
< artifactId> gwt-user< / artifactId>
< version> 2.7.0< / version>
< /依赖关系>
< dependency>
< groupId> com.google.gwt< / groupId>
< artifactId> gwt-dev< / artifactId>
< version> 2.7.0< / version>
< /依赖关系>

< dependency>
< groupId> javax.validation< / groupId>
< artifactId> validation-api< / artifactId>
< version> 1.0.0.GA< / version>
< /依赖关系>
< /依赖关系>

< pluginRepositories>
< pluginRepository>
< id> codehaus.snapshots< / id>
< name> Codehaus Maven Snapshot Repository< / name>
< url> http://snapshots.repository.codehaus.org< / url>
<快照>
< / snapshots>
< / pluginRepository>
< / pluginRepositories>

< distributionManagement>
< repository>
< id> nexus< / id>
<名称>我的Nexus< /名称>
< url> http:// localhost:8081 / nexus / content / repositories / thirdparty /< / url>
< / repository>
< / distributionManagement>
< / project>

暂时我把它添加了。



仍然不知道为什么不添加依赖关系?



从依赖关系添加couchdb4j jar到底需要做什么?

解决方案


  1. 可能是一个临时性解决方案,请将此回购添加到您的pom

< repositories> <库> < ID>回购WSO2< / ID> < URL> HTTP://maven.wso2.org/nexus/content/repositories/abdera.couchdb.temporary< / URL> < /储存库> < / repositories>


I have followed the following link to create a maven project Create Project. Like creating a simple gwt project and then configure for maven. Till here it goes simple without any problem.Like we are couchdb as our database, I have been trying to add couchdb dependency.

Problem 1: Tried out many ways but unable to add couchdb 4j dependency.

Error: Missing artifact com.google.code:couchdb4j:jar:0.1.2

Now, want the solution for this.

Query: Is there any other way to work with maven with GWT.


EDIT 1 I got a pom.xml from a link where they have couchdb4j in it, but still my basics function of create document(), getDocument() are not been received. The couchdb4j is not added to maven dependencies as seen in build path.

Is there some difference with client and server side use of maven dependencies?

  <?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>

For the time being i added it as it is.

Still unaware with the problem that why its not adding the dependencies?

What exactly I have to do for adding couchdb4j jar from dependencies?

解决方案

  1. probably a temporary fix, add this repo to your pom

    <repositories>
        <repository>
          <id>repo-wso2</id>
          <url>http://maven.wso2.org/nexus/content/repositories/abdera.couchdb.temporary</url>
        </repository>
      </repositories>

这篇关于无法在gwt maven项目中添加couchdb4j依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆