| 1 | --- |
| 2 | layout: docs |
| 3 | title: Installation |
| 4 | prev_section: welcome |
| 5 | next_section: usage |
| 6 | permalink: /docs/installation/ |
| 7 | --- |
| 8 | |
| 9 | OWNER is a Java library. The distribution form is a [JAR file][1]. |
| 10 | |
| 11 | However OWNER is available on Maven Central Repository, this means that if |
| 12 | you want you can still download the library jar, the javadoc.jar, the sources.jar |
| 13 | or a prepackaged archive containing the distributable binaries (including sources |
| 14 | and javadocs) in bin.tar.bz2 or bin.tar.gz or bin.zip format |
| 15 | from [this link][2]. |
| 16 | |
| 17 | Once downloaded what you need, you are ready to configure your IDE; and here, |
| 18 | it's up to you and your chosen IDE. |
| 19 | Generally speaking you just need to reference the library jar in the CLASSPATH |
| 20 | environment variable, as explained in the [Java tutorial][3]. |
| 21 | |
| 22 | [1]: http://docs.oracle.com/javase/tutorial/deployment/jar/ |
| 23 | [2]: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.aeonbits.owner%22%20AND%20a%3A%22owner%22 |
| 24 | [3]: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html |
| 25 | |
| 26 | Maven |
| 27 | ----- |
| 28 | |
| 29 | If you are using Maven, things are quite simple, just add the following section |
| 30 | to your pom.xml: |
| 31 | |
| 32 | ```xml |
| 33 | <dependencies> |
| 34 | <dependency> |
| 35 | <groupId>org.aeonbits.owner</groupId> |
| 36 | <artifactId>owner</artifactId> |
| 37 | <version>1.0.8</version> |
| 38 | </dependency> |
| 39 | </dependencies> |
| 40 | ``` |
| 41 | |
| 42 | Replace 1.0.8 with the latest version available. At the time of writing this page, the latest version is 1.0.8, but you |
| 43 | need to check if there is any newer version. |
| 44 | |
| 45 | <div class="note"> |
| 46 | <h5>Finding the latest version released</h5> |
| 47 | <p>You can search on the <a href="http://repo1.maven.org/maven2/org/aeonbits/owner/owner/">Maven Central Repository</a> |
| 48 | to verify the latest available release.</p> |
| 49 | </div> |
| 50 | |
| 51 | Many modern IDEs integrate well with maven, so after adding the above section |
| 52 | in your pom file and refreshing your project in your IDE, you should be ready to |
| 53 | use the library APIs. |
| 54 | |
| 55 | Java 8 and superior |
| 56 | ------------------- |
| 57 | |
| 58 | Java 8 introduces some new language features, such as [`default` methods][def-methods] in interfaces. |
| 59 | |
| 60 | In this case you should specify the `owner-java8` artifactId instead: |
| 61 | |
| 62 | To use it, you need to have JDK 8 installed properly in your system; then, you need to declare a maven |
| 63 | dependency in your project `pom.xml`: |
| 64 | |
| 65 | ```xml |
| 66 | <dependencies> |
| 67 | <dependency> |
| 68 | <groupId>org.aeonbits.owner</groupId> |
| 69 | <artifactId>owner-java8</artifactId> |
| 70 | <version>1.0.6</version> |
| 71 | </dependency> |
| 72 | </dependencies> |
| 73 | ``` |
| 74 | |
| 75 | `owner-java8` artifact depends to the artifact `owner`, so you don't need to specify both in your |
| 76 | maven dependencies. |
| 77 | |
| 78 | |
| 79 | [def-methods]: http://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html |
| 80 | |
| 81 | |
| 82 | <div class="note info"> |
| 83 | <h5>No transitive dependencies, full freedom!</h5> |
| 84 | <p> |
| 85 | The OWNER library does not introduce any transitive dependency to third party libraries |
| 86 | into your project, so this should prevent any conflict with libraries from which your |
| 87 | project depends on. |
| 88 | </p> |
| 89 | </div> |
| 90 | |
| 91 | |
| 92 | Building from the sources |
| 93 | ------------------------- |
| 94 | |
| 95 | You can install the version under development to get advantage of the latest |
| 96 | features. |
| 97 | |
| 98 | If you want to do so, please consult the chapter |
| 99 | [Building from sources]({{ site.url }}/docs/building). |