Why Vaadin 7.3.9 project is not found when I run it with Maven using mvn je

Hi everyone!

I am trying to create a maven project using the mvn command line tool and run it on jetty.

These are the steps I took:

  1. Inside my ~ home directory I have created a Maven folder and inside the Maven folder I ran the mvn generate goal:
~/Maven $ mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.3.9 -Dpackaging=war -DgroupId=app -DartifactId=vaadin-in-maven-arch -Dversion=1.0

The project
~/Maven/vaadin-in-maven-arch
was created. I went to the vaadin-in-maven-arch folder and I typed:

~/Maven/vaadin-in-maven-arch $ mvn package Everything went fine. The it was time to run the project. I experienced some problems with jetty while running this command:

~/Maven/vaadin-in-maven-arch $ mvn jetty:run The error I got was like:

Maven: No plugin found for prefix 'jetty' in the current project... But thanks to a
settings.xml
file inside the hidden ~/.m2 folder:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <pluginGroups>
    <pluginGroup>org.mortbay.jetty</pluginGroup>
    </pluginGroups>
</settings>

I was able to resolve this issue.

Now, I re-run the mvn jetty:start command:

~/Maven/vaadin-in-maven-arch $ mvn jetty:run [INFO] Scanning for projects... .... [INFO] Configuring Jetty for project: vaadin-in-maven-arch-parent [INFO] webAppSourceDirectory not set. Defaulting to /Users/me/Maven/vaadin-in-maven-arch/src/main/webapp [INFO] Reload Mechanic: automatic [INFO] Classes directory /Users/me/Maven/vaadin-in-maven-arch/target/classes does not exist [INFO] Context path = / [INFO] Tmp directory = /Users/me/Maven/vaadin-in-maven-arch/target/tmp [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml [INFO] Web overrides = none [INFO] web.xml file = null [INFO] Webapp directory = /Users/me/Maven/vaadin-in-maven-arch/src/main/webapp 2015-01-27 11:02:11.610:INFO:oejs.Server:jetty-8.1.16.v20140903 2015-01-27 11:02:12.350:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one. 2015-01-27 11:02:13.450:WARN:oejsh.RequestLogHandler:!RequestLog 2015-01-27 11:02:13.575:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server Jetty starts, but when I open the browser at
http://localhost:8080/
or at
http://localhost:8080/vaadin-in-maven-arch
everything I get is a 404 Not Found from Jetty:

[color=#FFA07A]
HTTP ERROR 404

Problem accessing /.
Reason:Not Found

Powered by Jetty://
[/color]

Please, could someone tell me where the problem is and how can I see my project in the browser???

Hmm. It seems that you forget to “cd vaadin-in-maven-arch-ui” and after that “mvn jetty:run”. Now you are trying to run jetty at the parent project, but unfortunately it works only at the ui child project level… Another thing that I noticed is that instead of “mvn package” you have to “mvn install” otherwise maven does not find your widgetset project :frowning:

Yeah, you are absolutely correct, the commands I ran were used previously for a different version of the vaadin archeType. With your suggestions, everything works.

Thank you!