【问题标题】:QueryDsl maven plugin missing a classQueryDsl Maven 插件缺少一个类
【发布时间】:2012-11-07 12:36:37
【问题描述】:

我正在尝试配置我的 spring 项目以使用查询 dsl。 maven 版本的插件有问题,我收到以下消息:

[INFO] Internal error in the plugin manager executing goal 'com.mysema.maven:apt-maven-plugin:1.0.4:process': Unable to load the mojo 'com.mysema.maven:apt-maven-plugin:1.0.4:process' in the plugin 'com.mysema.maven:apt-maven-plugin'. A required class is missing: org/codehaus/plexus/util/Scanner
org.codehaus.plexus.util.Scanner

有什么想法吗?

【问题讨论】:

标签: eclipse maven querydsl


【解决方案1】:

似乎缺少依赖项。

尝试将此添加到您的插件依赖项列表中:

<dependency>
    <groupId>org.codehaus.plexus</groupId>
    <artifactId>plexus-utils</artifactId>
    <version>3.0.4</version>
</dependency>

像这样:

<plugin>
    <groupId>com.mysema.maven</groupId>
    <artifactId>apt-maven-plugin</artifactId>
    <version>1.0.4</version>
    <executions>
        <execution>
            <goals>
                <goal>process</goal>
            </goals>
            <configuration>
                <outputDirectory>target/generated-sources/java</outputDirectory>
                <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.4</version>
        </dependency>
    </dependencies>
</plugin>

【讨论】:

  • 我认为依赖应该在插件上。我将编辑我的答案。
  • 它对我很有用。我只需要将 artifactId (apt-maven-plugin) 更改为正确的拼写 (maven-apt-plugin)
【解决方案2】:

此依赖问题已在 1.0.6 中修复

https://github.com/mysema/maven-apt-plugin/issues/12

我将更新 Querydsl 文档

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-22
    • 1970-01-01
    • 2023-04-02
    • 2013-03-12
    • 1970-01-01
    • 2015-09-27
    • 2016-01-06
    相关资源
    最近更新 更多