[
https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849538#action_12849538
]
Leonardo Uribe commented on MYFACES-2623:
-----------------------------------------
I know how "optional" modifier works, but maybe I'm supposing you are aware of
the solution committed MYFACES-2565 and MYFACES-2605. Sometimes like in this
case, it is a good idea to take a breath and check the svn log to see why
someone do something before commit. I reviewed all details behind this one, to
find a valid explanation.
With trinidad demo we had a bug (see MYFACES-2605 for details) that was
introduced by the addition of the following dependences (see MYFACES-2565)
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.CR3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.1.2-b05</version>
<optional>true</optional>
</dependency>
But I note in the committed code the version of el-api was 2.2, and the effect
described is not present. Take a look at mojarra poms, and you'll see el-api
version 1.0, but on myfaces core 1.2, we don't have it, because it is provided
from jsp-api dependency.
The problem really was on core pom.xml. In your commit, you accidentally
removed the dependencies. Myfaces impl inherited those dependencies, but the
modifier "optional" is not, creating the problem described before. We have a
valid explanation about what's going on, so the code committed is correct. By
accident, the patch commited fix that one, so we can close it.
> validation-api and el-api 2.2 should be optional dependencies with scope
> compile in myfaces-api
> -----------------------------------------------------------------------------------------------
>
> Key: MYFACES-2623
> URL: https://issues.apache.org/jira/browse/MYFACES-2623
> Project: MyFaces Core
> Issue Type: Bug
> Components: build process
> Affects Versions: 2.0.0-beta-3
> Reporter: Jakob Korherr
> Assignee: Jakob Korherr
> Fix For: 2.0.0-beta-4
>
>
> Currently those two dependencies are defined messy. First they are defined in
> myfaces-core-project as optional which makes no sence since this project is
> just the super-project for api and impl and optional dependencies are not
> transitive. So this has to be removed here.
> Furthermore the definitions of validation-api and el-api in the pom of
> myfaces-api are not completely correct. They should have a scope of compile
> (default) and should have set optional to true instead of just provided or
> provided+optional (which is by the way not allowed).
> After this issue has been resolved el-api 2.2 will be available on the whole
> myfaces-api project, however keep in mind that you are only allowed to use
> the new methods (like getValueReference()) if you checked if the el-api 2.2
> is really available first (via ExternalSpecifications). Otherwise you will
> end up in ClassNotFoundExceptions at runtime when el-api 2.2 is not available
> in the target system.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.