on 2018 Jun 15 3:33 PM
Hello Experts,
I want to use annotations in my -beans.xml bean-declaration as per https://help.hybris.com/6.6.0/hcd/8bc53579866910149472ccbef0222ec5.html (section "Improvements in Beans Generating Mechanism"). Specifically i've done something like the following:
<bean class="com.dotsource.MyBean">
<import type="javax.validation.constraints.Min"/>
<property name="someInteger" type="Integer>
<annotations scope="member">
@Min(value = 1L)
</annotations>
</property>
</bean>
When I do an ant clean all I get the following error:
[ycodegenerator]
[echo] building models from /home/johannes/git/hybrisproject/bin/platform/bootstrap/gensrc to /home/johannes/git/hybrisproject/bin/platform/bootstrap/bin/models.jar
[yjavac] Compiling 1353 source files to /home/johannes/git/hybrisproject/bin/platform/bootstrap/modelclasses
[yjavac] /home/johannes/git/hybrisproject/bin/platform/bootstrap/gensrc/com/dotsource/MyModel.java:20: error: package javax.validation.constraints does not exist
[yjavac] import javax.validation.constraints.Min;
[yjavac] ^
I've tried adding validation-api to external-dependencies.xml and adding the validation extension dependency to extensioninfo.xml - both still with the same error-message.
How can I correctly introduce the dependency to the model compiler?
Request clarification before answering.
Can be solved by copying the dependency to platform/bootstrap/lib via ant customize. We choose to validate the bean manually though, so I can't provide specific details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.