{{ $artifactId := .Get "artifactId"}}{{ $version := .Get "version"}}{{ $dependencies := .Get "dependencies"}}{{ $snapshot := in $version "SNAPSHOT" }} {{ if $snapshot }} {{$ossUrl := "https://oss.sonatype.org/content/repositories/snapshots"}}

<dependencies>
    <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>{{$artifactId}}</artifactId>
        <version>{{$version}}</version>
    </dependency>
</dependencies>
<repositories>
    <repository>
        <id>sonatype-snapshots</id>
        <name>Sontatype Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

You can also download the jars directly from sonatype.

{{ with $dependencies}}

Note: {{$artifactId}} requires the following dependencies: bson and mongodb-driver-core

{{end}}
{{ else }} {{$ossUrl := "https://oss.sonatype.org/content/repositories/releases"}}

<dependencies>
    <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>{{$artifactId}}</artifactId>
        <version>{{$version}}</version>
    </dependency>
</dependencies>

You can also download the jars directly from sonatype.

{{ with $dependencies}}

Note: {{$artifactId}} requires the following dependencies: bson and mongodb-driver-core

{{end}}
{{ end }}