Comments (5)
The more I ponder this, the more I wonder why it's necessary, and think that it adds more complications than it solves. To wit:
- There appears to be no standard library to concatenate a version number to in order to pull in a servlet dependency.
- To my knowledge, there are only two major servlet API versions in widespread use, and in most cases you want to use 3.0.
- Servlet APIs are provided by the container being used (I.e. Jetty.)
I'm running two servlets in my app. The non-Vaadin servlet that handles my non-UI APIs and endpoints requires 3.0, but apparently the automatic pulling in of the 2.5 API breaks things. I also can't override this to 3.0 or pull in a standard replacement.
So perhaps this option should go, and we can just use the API provided by Jetty? That, or add a boolean flag to enable use of 2.5. If set, the 2.5 APIs are pulled in. If not, then configurations are left alone.
Thanks.
from gradle-vaadin-plugin.
The servlet version was previously used in two places; 1) to resolve the Development Mode internal Jetty server dependencies and 2) to provide eclipse projects with the correct jst.web facet version.
The first point is no longer needed since the Development Mode's internal Jetty server is no longer used and so the dependencies for servlet-api and jsp-api is no longer needed and could be removed. That would also resolve your problems with conflicting dependencies. That could be easily be done for 0.5.1.
The second point is still valid though. The eclipse jst.web facet still needs to be set to the correct servlet version for the facet to work properly. So I still think we should keep the servletVersion option around.
from gradle-vaadin-plugin.
OK, fair point, but as it stands, there doesn't appear to be a way to
use servlet 3.0. Am I just missing it?
So while it may be necessary for Eclipse, there doesn't seem to be a way
to make it work from the console, and there doesn't appear to be a way
to turn it off. My app should work fine without the dependency added
automatically.
I like this plugin generally, but sometimes it seems to do a bit too
much magic behind the scenes. While said magic might be necessary, I'm
not sure it should come at the expense of fixing some things and
breaking others when the former aren't needed by some users and the
latter are.
Maybe if an Eclipse user needs a certain servlet version to be pulled in
explicitly, then they should explicitly do so? The vaadinRun case could
just pull in Jetty 8 only. It makes sense to me that a Vaadin plugin
would pull in Vaadin-specific dependencies, but specific servlet
versions seems to go a bit too far.
Thanks.
from gradle-vaadin-plugin.
Removed the dependencies to servlet-api so they will not get pulled in.
After that change the servletVersion will only be related to what the eclipse facet uses and does not affect any dependencies in any way. So if you are not using eclipse (or don't care about the Vaadin eclipse plugin facet) then you are not required to set the servlet version. In the future this might change though if more servlet specific functionality is added like CDI support for instance.
from gradle-vaadin-plugin.
There did appear some issues using servlet 3.0 with the plugin. Mostly the problem is that the jetty8 server is not currently scanning for the @WebServlet annotation so creating web.xml:less projects is not currently possible. Opened #36 about improving the support for servlet 3.0.
from gradle-vaadin-plugin.
Related Issues (20)
- Task :vaadinRun FAILED HOT 1
- building widgetset using kotlin dsl HOT 6
- Support Vaadin 8.2+ and dependent vaadin-spring plugins HOT 3
- Gradle Vaadin Plugin hampering inter-module dependencies with “bootRun”? HOT 1
- Executing vaadinRun on project subProjectX fails with Project ':subProjectX' not found in project ':subProjectX'. HOT 2
- s HOT 1
- problem download vaadin-themes HOT 1
- Upgrade to payara microprofile
- gradle 5.0 support HOT 2
- MPR-based app compilation fails: com.vaadin.mpr.core.AbstractMprUIContent cannot be resolved
- No value has been specified for this provider.
- JS HOT 2
- JS HOT 1
- Vaadin 14 Flow npm support HOT 2
- Dependencies are not being exported to WAR when managed by plugin
- Vaadin 14 with Gradle and npm HOT 2
- How run custom gradle task before vaadinCompile runs HOT 1
- relative themesDirectory incorrectly rooted relative to the root project
- Please add support for Gradle 6 HOT 1
- Plugin configuration is missing vaadin 8 dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-vaadin-plugin.