简体   繁体   English

Vaadin-Maven-Plugin找不到目标

[英]Vaadin-Maven-Plugin can't find goals

I have an issue in my vaadin project. 我的vaadin项目中有一个问题。 I have added an add-on that I found on the vaadin market place for making a QR Code. 我添加了一个在vaadin市场上找到的用于制作QR码的加载项。 To make everything work I need to compile the widgetset in this add-on, but here is the problem. 为了使一切正常,我需要在此加载项中编译小部件集,但这是问题所在。

When I try to use, in eclipse, the button for compiling the widgetset or directly with mvn vaadin:update-widgetset I get the following error: 当我尝试在Eclipse中使用用于编译窗口小部件集的按钮或直接使用mvn vaadin:update-widgetset进行编译时,出现以下错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.649 s
[INFO] Finished at: 2018-08-09T18:13:34+02:00
[INFO] Final Memory: 9M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'update-widgetset' in plugin com.vaadin:vaadin-maven-plugin:10.0.1 among available goals copy-production-files, package-for-production -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException

After a bit of research it seems that some other goals are not found because now when I try to build my solution I get a similar error but with another goal: 经过一些研究,似乎还没有找到其他目标,因为现在当我尝试构建解决方案时,我遇到了类似的错误,但还有另一个目标:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Padoo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.148 s
[INFO] Finished at: 2018-08-09T18:17:00+02:00
[INFO] Final Memory: 11M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'update-theme' in plugin com.vaadin:vaadin-maven-plugin:10.0.1 among available goals copy-production-files, package-for-production -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException

Obviously I have missed something in my pom.xml. 显然我错过了pom.xml中的某些内容。 I'm new with maven and I can't figure out what I have missed. 我是maven的新手,我不知道自己错过了什么。

So here is my pom: 所以这是我的pom:

<?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.metaverse</groupId>
    <artifactId>Padoo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>Padoo</name>
    <description></description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.0.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <vaadin.version>8.3.1</vaadin.version>
    </properties>

    <repositories>
        <repository>
            <id>vaadin-addons</id>
            <url>http://maven.vaadin.com/vaadin-addons</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-themes</artifactId>
        </dependency>
        <dependency>
            <groupId>org.vaadin.addons</groupId>
            <artifactId>qrcode</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>com.mvcpt</groupId>
            <artifactId>mapgenerator</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-bom</artifactId>
                <version>${vaadin.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
              <groupId>com.vaadin</groupId>
              <artifactId>vaadin-maven-plugin</artifactId>
              <version>10.0.1</version>         
              <configuration>
                <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
                <draftCompile>false</draftCompile>
                <compileReport>false</compileReport>
                <style>OBF</style>
                <strict>true</strict>
              </configuration>

              <executions>
                <execution>
                  <goals>
                    <goal>update-theme</goal>
                    <goal>update-widgetset</goal>
                    <goal>compile</goal>
                    <goal>compile-theme</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
        </plugins>
    </build>
</project>

Change <version>10.0.1</version> to something like <version>${vaadin.version}</version> . <version>10.0.1</version>更改为<version>${vaadin.version}</version> You're using the Maven plugin for Vaadin 10, which doesn't contain the same goals as the one for Vaadin 8. 您正在使用Vaadin 10的Maven插件,该插件没有与Vaadin 8的目标相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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