@@ -28,7 +28,7 @@ Kotlin build also requires it via https://kotlinlang.org/docs/reference/kapt.htm
2828 <plugins>
2929 <plugin>
3030 <artifactId>maven-compiler-plugin</artifactId>
31- <version>${maven-compiler-plugin.version }</version>
31+ <version>{mavenCompilerPluginVersion }</version>
3232 <configuration>
3333 <annotationProcessorPaths>
3434 <path>
@@ -51,7 +51,7 @@ Kotlin build also requires it via https://kotlinlang.org/docs/reference/kapt.htm
5151 <plugin>
5252 <artifactId>kotlin-maven-plugin</artifactId>
5353 <groupId>org.jetbrains.kotlin</groupId>
54- <version>${kotlin.version }</version>
54+ <version>{kotlinVersion }</version>
5555 <configuration>
5656 <args>
5757 <arg>-java-parameters</arg>
@@ -101,7 +101,7 @@ Kotlin build also requires it via https://kotlinlang.org/docs/reference/kapt.htm
101101 <annotationProcessorPath>
102102 <groupId>io.jooby</groupId>
103103 <artifactId>jooby-apt</artifactId>
104- <version>${jooby.version }</version>
104+ <version>{joobyVersion }</version>
105105 </annotationProcessorPath>
106106 </annotationProcessorPaths>
107107 </configuration>
@@ -130,20 +130,20 @@ Java build needs an annotationProcessor statement using `jooby-apt`.
130130Kotlin builds needs a https://kotlinlang.org/docs/reference/kapt.html#using-in-gradle[kapt] dependency and statement using `jooby-apt`.
131131
132132.Java
133- [source, groovy, role="primary"]
133+ [source, groovy, role="primary", subs="verbatim,attributes" ]
134134----
135135dependencies {
136136 annotationProcessor "io.jooby:jooby-apt:{joobyVersion}"
137137}
138138----
139139
140140.Kotlin
141- [source, groovy, role="secondary"]
141+ [source, groovy, role="secondary", subs="verbatim,attributes" ]
142142----
143143buildscript {
144144 ...
145145 dependencies {
146- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ kotlinVersion"
146+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:{ kotlinVersion} "
147147 }
148148}
149149
@@ -184,3 +184,78 @@ Alternatively, you can delegate IntelliJ build/run actions to Maven or Gradle co
184184*Eclipse 4.9+*
185185
186186You need https://www.eclipse.org/m2e/[M2Eclipse] for Maven or https://projects.eclipse.org/projects/tools.buildship[Gradle Buildship]
187+
188+ == Bean Converter
189+
190+ === Parameter Name Missing
191+
192+ *Exception*:
193+
194+ ----
195+ Unable to provision parameter at position: '...', require by: ... Parameter's name is missing
196+ ----
197+
198+ Thrown when the bean converter has no access to a parameter name at runtime. Compilation must be
199+ done using `parameters` compiler option.
200+
201+ *Maven Solution*
202+
203+ .Java
204+ [source, xml, role = "primary", subs="verbatim,attributes"]
205+ ----
206+ <build>
207+ <plugins>
208+ <plugin>
209+ <artifactId>maven-compiler-plugin</artifactId>
210+ <version>{mavenCompilerPluginVersion}</version>
211+ <configuration>
212+ ...
213+ <compilerArgs>
214+ <arg>-parameters</arg>
215+ </compilerArgs>
216+ </configuration>
217+ </plugin>
218+ </plugins>
219+ </build>
220+ ----
221+
222+ .Kotlin
223+ [source, xml, role = "secondary", subs="verbatim,attributes"]
224+ ----
225+ <build>
226+ <plugins>
227+ <plugin>
228+ <artifactId>kotlin-maven-plugin</artifactId>
229+ <groupId>org.jetbrains.kotlin</groupId>
230+ <version>{kotlinVersion}</version>
231+ <configuration>
232+ ...
233+ <args>
234+ <arg>-java-parameters</arg>
235+ </args>
236+ <jvmTarget>1.8</jvmTarget>
237+ ...
238+ </configuration>
239+ </plugin>
240+ </plugins>
241+ </build>
242+ ----
243+
244+ *Gradle Solution*
245+
246+ .Java
247+ [source, groovy, role = "primary", subs="verbatim,attributes"]
248+ ----
249+ tasks.withType(JavaCompile) {
250+ options.compilerArgs << '-parameters'
251+ options.debug = true
252+ }
253+ ----
254+
255+ .Kotlin
256+ [source, groovy, role = "secondary", subs="verbatim,attributes"]
257+ ----
258+ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
259+ kotlinOptions.javaParameters = true
260+ }
261+ ----
0 commit comments