@@ -98,7 +98,7 @@ You need to add the following dependency:
98
98
<dependency>
99
99
<groupId>com.antkorwin</groupId>
100
100
<artifactId>better-strings</artifactId>
101
- <version>0.2 </version>
101
+ <version>0.3 </version>
102
102
</dependency>
103
103
----
104
104
@@ -140,30 +140,43 @@ NOTE: Keep in mind that this feature should be used carefully.
140
140
You shouldn't write too much code inside string literals
141
141
because it is too difficult to maintain and maybe not obvious for debugging.
142
142
143
- If you want to set annotation processors order
144
- or just set manually processors path,
145
- you should set the path for `better-strings` too, like this:
143
+
144
+ ## How to use with other annotation processors
145
+
146
+ If you need to use multiple annotation processors (for example `better-strings` with `lombok` or `mapstruct` )
147
+ and the order of processing is necessary for you then you can set the order in your building tool.
148
+
149
+ In maven, you should declare dependencies as usually,
150
+ then describe annotation processors in the configuration of the `maven-compiler-plugin`
151
+ in the build section:
152
+
146
153
[source, xml]
147
154
----
148
- <build >
149
- <plugins >
150
- <plugin >
151
- <groupId >org.apache.maven.plugins</groupId >
152
- <artifactId >maven-compiler-plugin</artifactId >
153
- <version >3.5.1</version > <!-- or newer version -->
154
- <configuration >
155
- <source >1.8</source > <!-- depending on your project -->
156
- <target >1.8</target > <!-- depending on your project -->
157
- <annotationProcessorPaths >
158
- <!-- other annotation processors -->
159
- <path >
160
- <groupId >com.antkorwin</groupId >
161
- <artifactId >better-strings</artifactId >
162
- <version >0.2</version >
163
- </path >
164
- </annotationProcessorPaths >
165
- </configuration >
166
- </plugin >
167
- </plugins >
168
- </build >
169
- ----
155
+ <plugin>
156
+ <groupId>org.apache.maven.plugins</groupId>
157
+ <artifactId>maven-compiler-plugin</artifactId>
158
+ <version>3.5.1</version>
159
+ <configuration>
160
+ <annotationProcessorPaths>
161
+
162
+ <!-- first annotation processor -->
163
+ <path>
164
+ <groupId>org.projectlombok</groupId>
165
+ <artifactId>lombok</artifactId>
166
+ <version>${lombok.version}</version>
167
+ </path>
168
+
169
+ <!-- second annotation processor -->
170
+ <path>
171
+ <groupId>com.antkorwin</groupId>
172
+ <artifactId>better-strings</artifactId>
173
+ <version>${better-strings.version}</version>
174
+ </path>
175
+
176
+ </annotationProcessorPaths>
177
+ </configuration>
178
+ </plugin>
179
+ ----
180
+
181
+ NOTE: The order of annotation processors paths is necessary.
182
+ You should describe the all used APT when you write `annotationProcessorPaths` section.
0 commit comments