[
https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849803#action_12849803
]
Jakob Korherr commented on MYFACES-2623:
----------------------------------------
Thanks, Leo. It means a lot!
Yes of course, me too ;)
Actually I meant with this comment that if we don't put the el-api 2.2
dependency on top of the jsp-api dependency in the pom, we will run into maven
compilation errors with classes using el-api 2.2 features, because maven will
use the older el-api which is built-in in jsp-api when compiling the classes.
So the "new features" of el-api 2.2 like ValueReference would not be visible to
maven at compilation time.
This happened with maven on my machine, whereas it worked with eclipse (I guess
eclipse handles the dependencies differently), so I thought I should document
why I put it on top here.
About the thing with provided: The combination of provided and optional is not
defined here, because provided means that the runtime-environment (e.g. Java EE
server) will provide the libs for me at runtime, but they will definitely be
there. They can't be provided optionally.
If I want to use optional=true then I have to set scope to compile, because
this means that I need it for compilation, but it may not be there at runtime
(it's up to the user if it is there at runtime).
Does this answer your question(s)?
> 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.