You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2010/03/24 19:29:27 UTC

[jira] Created: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

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


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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849368#action_12849368 ] 

Jakob Korherr commented on MYFACES-2623:
----------------------------------------

I could not find any problems with this configuration in any server, so I committed the code.

If you have any further concerns, please read the maven documentation of optional first: http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849768#action_12849768 ] 

Jakob Korherr commented on MYFACES-2623:
----------------------------------------

Yes I tried the trinidad demo, because I knew that there were problems with it.. and it worked ;)

I really did check the svn history here, believe it or not. Also I could still remember those issues, because they were created just one or two weeks ago. Please don't always tell me to take a breath before doing something - I really do that. I'm not just committing something because it's fun, I do it for a reason!! Actually it would be cool if you took a breath here, before telling me that all this was wrong!

The problem with your committed solution, Leonardo, was that you set scope to provided and optional to true, but this combination is invalid (please take a look at the maven documentation), so this had to be changed. Optional makes only sence with scope compile. See http://svn.apache.org/viewvc/myfaces/core/trunk/api/pom.xml?p2=%2Fmyfaces%2Fcore%2Ftrunk%2Fapi%2Fpom.xml&p1=%2Fmyfaces%2Fcore%2Ftrunk%2Fapi%2Fpom.xml&r1=923936&r2=923935&view=diff&pathrev=923936 for the svn-diff of your commit.

Furthermore I did not remove the dependencies from the parent-pom by accident, it was well-thought. Again - believe it or not...

Anyway, I hope that you will be able to trust me a little bit more with such things. It would mean a lot to me ;)

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849812#action_12849812 ] 

Jakob Korherr commented on MYFACES-2623:
----------------------------------------

Yeap! Great!

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849339#action_12849339 ] 

Jakob Korherr commented on MYFACES-2623:
----------------------------------------

I almost forgot: the el-api dependency has to be put on top of the jsp-api dependency in the pom, because jsp-api also includes the el-api, however an older version of it.

If we don't do this, we will run into compilation errors with maven when using new features!

> 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
>
> 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.


[jira] Reopened: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Korherr reopened MYFACES-2623:
------------------------------------


The changes should also be applied to myfaces-impl, because they are needed in order to solve MYFACES-2621. I already added them locally and tested them on some servers and I also tested the trinidad-demo and everythings works fine.

So everyone please keep in mind: compile + optional is the way to go for such dependencies!

> 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.


[jira] Resolved: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Korherr resolved MYFACES-2623.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-4

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849793#action_12849793 ] 

Leonardo Uribe commented on MYFACES-2623:
-----------------------------------------

Ok, I believe you ;-). Don't get me wrong. I just want keep myfaces code as best as possible.

One question: you said if we don't set this dependences as optional, we will run into compilation errors with maven when using new features. What are those new features?. I'm still using maven 2.0.10 (because the problem of invalid gpg signatures on upper versions). From my point of view, set them as "provided" works just fine.

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849376#action_12849376 ] 

Leonardo Uribe commented on MYFACES-2623:
-----------------------------------------

Did you tried trinidad demo? 

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849354#action_12849354 ] 

Leonardo Uribe commented on MYFACES-2623:
-----------------------------------------

When you set a dependency as compile and you run jetty, that dependency is added to your classpath. The minimum dependency version for el is 1.0. All classes from el api 2.2 should be carefully used to prevent that ClassNotFoundException.

Historically, the same problem happened when myfaces core had its own portlet bridge bundled (1.1.x), and when tomahawk added portlet support. 

Look the code I committed for ExternalSpecifications, isolating the call to ValueReference in other class. This issue should be closed as invalid.

> 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
>
> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849807#action_12849807 ] 

Leonardo Uribe commented on MYFACES-2623:
-----------------------------------------

So the problem is on eclipse. If the code is compiled with maven, the problem is not present. Yes, that solves the question.

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ 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.


[jira] Resolved: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Korherr resolved MYFACES-2623.
------------------------------------

    Resolution: Fixed

> 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.


[jira] Commented: (MYFACES-2623) validation-api and el-api 2.2 should be optional dependencies with scope compile in myfaces-api

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849357#action_12849357 ] 

Jakob Korherr commented on MYFACES-2623:
----------------------------------------

No this should not be closed as invalid!!

I prevent that from happening if I set optional to true, furthermore the way it is at the moment is completely wrong.

I know your code from ExternalSpecifications and also from _BeanValidatorUELUtils. This is the way it has to happen, I agree! But if I don't set the dependency to el-api 2.2 I would have to use reflection for all methods here and this is the thing I don't want!

At the moment I am testing this configuration with many servers including jetty 6 and jetty 7 via the maven plugins and it is working without any problems ;)

> 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
>
> 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.