简体   繁体   中英

Trouble building Vaadin application with Maven in IntelliJ

I am looking to start a project using Vaadin and I want to use Maven as the repository manager , but I am having a lot of trouble starting the Maven project.

I tried creating a project in IntelliJ using the vaadin-archetype-application-example and it doesn't create any directory.

I also tried creating the project with the mvn commands and I found a lot of troubles too. When I create the Maven project this error is shown in the log:

-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.
[ERROR] Maven execution terminated abnormally (exit code 1)

How can I deploy a Maven project with IntelliJ ? I have the Maven plugin installed and the mvn command seems to work just fine.

This is my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.imtoolazytoadmin</groupId>
<artifactId>ImTooLazyToAdmin-master</artifactId>
<version>1.0-SNAPSHOT</version>

</project>

Use this command to create your project and then import it to your IDE.

$ mvn archetype:generate \
-DarchetypeGroupId=com.vaadin \
-DarchetypeArtifactId=vaadin-archetype-application \
-DarchetypeVersion=7.5.9 \
-DgroupId=your.company \
-DartifactId=project-name \
-Dversion=1.0 \
-Dpackaging=war

More info about creating Vaadin projects in IntelliJ here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM