QueryDsl maven插件缺少一个类

时间:2012-11-07 12:36:37

标签: eclipse maven querydsl

我正在尝试配置我的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

有什么想法吗?

2 个答案:

答案 0 :(得分:2)

似乎缺少依赖。

尝试将此添加到插件依赖关系列表中:

<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>

答案 1 :(得分:0)

此依赖性问题已在1.0.6中修复

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

我将更新Querydsl文档