简体   繁体   中英

Unable to add couchdb4j dependency in gwt maven project

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.

pomimg


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> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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