Search code examples
mavenapache-zest

Qi4j maven configuration


I'm currently trying to figure out how Qi4j works. So i decided to start with a simple example. I tried to use the Qi4j lib in my pom.xml and am now facing the problem, that the artifact can't be found. I'm using NetBeans 7.0.1 and my pom.xml parts are shown below:

<repository>
    <id>qi4j-official</id>
    <url>http://repository.ops4j.org/maven2</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>

<dependency>
    <groupId>org</groupId>     
    <artifactId>org.qi4j</artifactId>
    <version>1.4</version>
</dependency>

I'm i doing something wrong? Thanks a lot.


Solution

  • Qi4j consists of many many artifacts, to keep the total footprint down as most applications won't use all bits and pieces.

    <groupId>org.qi4j.core</groupId>
    

    contains the artifacts (as of 1.3)

    <artifactId>org.qi4j.core.api</artifactId>
    <artifactId>org.qi4j.core.spi</artifactId>
    <artifactId>org.qi4j.core.runtime</artifactId>
    <artifactId>org.qi4j.core.bootstrap</artifactId>
    <artifactId>org.qi4j.core.testsupport</artifactId>
    

    For "compile" scope api and bootstrap should be enough. testsupport is obviously "test" scope and runtime should not be used by your code and only be a "runtime" dependency.

    <groupId>org.qi4j.library</groupId>
    

    The Libraries varies greatly in completeness and quality. Extensions can depend on libraries but not the other way around.

    <groupId>org.qi4j.extension</groupId>
    

    Extensions implements the slowly growing SPI pluggable functionalities; entity stores, indexing/query and caching. Next release (2.0) will have more extensions for value serialization and others.

    Hope that helps, or meet the Qi4j community at the qi4j-dev Google Group for additional support.