Skip to content

Commit

Permalink
Put modern Maven information first, and older info second
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154884662
  • Loading branch information
ronshapiro committed May 3, 2017
1 parent fce0333 commit 7ef7121
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,8 @@ at compile time.
### Maven

In a Maven project, include the `dagger` artifact in the dependencies section
of your `pom.xml` and the `dagger-compiler` artifact as either an `optional` or
`provided` dependency:

```xml
<dependencies>
<dependency>
<groupId>com.google.dagger</groupId>
<artifactId>dagger</artifactId>
<version>2.x</version>
</dependency>
<dependency>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.x</version>
<optional>true</optional>
</dependency>
</dependencies>
```

or as an `annotationProcessorPaths` value of the `maven-compiler-plugin`
(requires at least version 3.5):
of your `pom.xml` and the `dagger-compiler` artifact as an
`annotationProcessorPaths` value of the `maven-compiler-plugin`:

```xml
<dependencies>
Expand Down Expand Up @@ -94,6 +75,24 @@ or as an `annotationProcessorPaths` value of the `maven-compiler-plugin`
</build>
```

If you are using a version of the `maven-compiler-plugin` lower than `3.5`, add
the `dagger-compiler` artifact as with the `provided` scope:
```xml
<dependencies>
<dependency>
<groupId>com.google.dagger</groupId>
<artifactId>dagger</artifactId>
<version>2.x</version>
</dependency>
<dependency>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.x</version>
<scope>provided</scope>
</dependency>
</dependencies>
```

If you use the beta `dagger-producers` extension (which supplies
parallelizable execution graphs), then add this to your maven configuration:

Expand Down

0 comments on commit 7ef7121

Please sign in to comment.