Giter Club home page Giter Club logo

vaadin-light's Introduction

Vaadin Light

Minimal Standalone Vaadin Application Jar with Maven (~ 6.2MB).

This project is a fork from samie's gist, to add some structure and upgrade the Vaadin version.

Compiling

To compile the entire project, run mvn package.

Running

To run the application, locate the generated jar file in the target directory, and run java -jar <filename>.jar, e.g:

java -jar target/vaadin-light-1.0-SNAPSHOT-jar-with-dependencies.jar

Then open http://localhost:8080/.

vaadin-light's People

Contributors

amahdy avatar mstahv avatar

Stargazers

 avatar  avatar Luca Guadagnini avatar hubersn avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

vaadin-light's Issues

Small problem

Hey there! I have a small Problem...

  1. I can't activate the productionMode
  2. In my pom.xml I have follow add-ons from Vaadin, if I debug with jetty:run it works, but if I create the jar with your code, they won't work / won't show:

<dependency> <groupId>org.vaadin.ui</groupId> <artifactId>numberfield</artifactId> <version>0.2.0</version> </dependency> <dependency> <groupId>org.vaadin.teemu</groupId> <artifactId>switch</artifactId> <version>3.0.0</version> </dependency>

Did you may be know why this is so?

Kind regards
XeroxDev

Is this working in a docker environment?

Hey, I some how cant get this example running in docker, I always receive the following excepetion:

[main] INFO org.eclipse.jetty.util.log - Logging initialized @226ms to org.eclipse.jetty.util.log.Slf4jLog
[main] INFO org.eclipse.jetty.server.Server - jetty-9.4.z-SNAPSHOT; built: 2019-04-29T20:42:08.989Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_111-8u111-b14-2~bpo8+1-b14
[main] WARN org.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext@1a407d53{/,jar:file:/usr/app/jk-1.2-SNAPSHOT-jar-with-dependencies.jar!/webapp/,UNAVAILABLE}
java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:219)
        at java.util.zip.ZipFile.<init>(ZipFile.java:149)
        at java.util.jar.JarFile.<init>(JarFile.java:166)
        at java.util.jar.JarFile.<init>(JarFile.java:103)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:84)
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
        at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
        at org.eclipse.jetty.webapp.MetaInfConfiguration.getTlds(MetaInfConfiguration.java:438)
        at org.eclipse.jetty.webapp.MetaInfConfiguration.scanForTlds(MetaInfConfiguration.java:355)
        at org.eclipse.jetty.webapp.MetaInfConfiguration.scanJars(MetaInfConfiguration.java:173)
        at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:102)
        at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:506)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:544)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.server.Server.start(Server.java:418)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:382)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at io.taliox.App.main(App.java:37)
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@71e7a66b{HTTP/1.1,[http/1.1]}{0.0.0.0:9091}
[main] INFO org.eclipse.jetty.server.Server - Started @732ms

This exception occurs when I start my container.

This only happens in a docker environment though, if I start the App locally everything works fine. This is my dockerimage:

The way I build the .jar is simply mvn clean package -Pproduction-mode

FROM java:8
VOLUME /tmp
COPY ./target /usr/app/
WORKDIR /usr/app
RUN sh -c 'touch jk-1.2-SNAPSHOT-jar-with-dependencies.jar'
ENTRYPOINT ["java","-jar","jk-1.2-SNAPSHOT-jar-with-dependencies.jar"]  

Any ideas why this is not working in Docker for me? It must be somehow related to a missing / unavailable /webapp/ folder I assume.

Is this standalone intended to work in docker? Maybe I did a mistake while importing and slightly adapting the project? :/ Thanks in advance!

Question regarding extensions

Hi, this project helped me a lot. Could you tell me if there is a way to extend it with some addon? Also, I will need support for push. Do you think it is possible to have it here?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.