• Getting Started

Getting Started

There is one issue for newbies to get started with a new 52n Maven project.

If you specify this project as parent in your own Maven project and you try to compile it, than you will get an error. The error says that the artifact with id org.n52:52-North:pom:RELEASE can not be found using the central repository.

The reason for this is that the 52n artifacts are not deployed to ibiblio, the default Maven repository server but in 52n's own repository that is not known by your maven installation by default.

To overcome this you need to specify and activate the 52n release repository in your settings.xml.

The realease repository is located at this url:

n52-releases
http://incubator.52north.org/maven/maven-repo/releases/

So simple change your settings.xml, that it contains the following lines:

//define a profile that specifies the 52n release repository
<profile>
  <id>52n-start</id>
  <repositories>
    <repository>
      <id>n52-releases</id>
      <name>52n Releases</name>
      <url>http://incubator.52north.org/maven/maven-repo/releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
</profile>

...

//always have 52n-start profile activated
<activeProfiles>
  <activeProfile>52n-start</activeProfile>
</activeProfiles>

After that with every mvn call, the 52n-start profile is active and maven will also look into the 52n repository to resolve dependencies.

back top