Note that there are some explanatory texts on larger screens.

plurals
  1. POapt maven plugin fail to generate Q classes
    primarykey
    data
    text
    <p>I am fixing a legacy project that uses Querydsl apt. For some reason the <a href="https://github.com/mysema/apt-maven-plugin/" rel="nofollow">apt-maven-plugin</a> started to fail. The only workaround I found was to use the alter ego <a href="https://code.google.com/p/maven-annotation-plugin/" rel="nofollow">maven-processor-plugin</a>.</p> <p>I have reinstalled maven, eclipse and M2E with not much success. The maven-apt-plugin is unable to create the Q classes under /target/generated-sources/metamodel.</p> <p>edit: adding debug from maven </p> <pre><code>[DEBUG] Configuring mojo com.mysema.maven:apt-maven-plugin:1.0.8:process from pl ugin realm ClassRealm[plugin&gt;com.mysema.maven:apt-maven-plugin:1.0.8, parent: su n.misc.Launcher$AppClassLoader@6d9bf996] [DEBUG] Configuring mojo 'com.mysema.maven:apt-maven-plugin:1.0.8:process' with basic configurator --&gt; [DEBUG] (s) logOnlyOnError = true [DEBUG] (s) outputDirectory = C:\DEV\myproject\mainstuff\mainstuff-jpa\target\generate d-sources\metamodel [DEBUG] (s) pluginArtifacts = [com.mysema.maven:apt-maven-plugin:maven-plugin: 1.0.8:, org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile, org.codehaus.ple xus:plexus-utils:jar:1.5.8:compile, backport-util-concurrent:backport-util-concu rrent:jar:3.1:compile, org.codehaus.plexus:plexus-interpolation:jar:1.11:compile , junit:junit:jar:3.8.1:compile] [DEBUG] (s) processor = com.mysema.query.apt.jpa.JPAAnnotationProcessor [DEBUG] (s) project = MavenProject: com.yreham.mainstuff:mainstuff-jpa:1.0 @ C:\DEV\myproject\mainstuff\mainstuff-jpa\pom.xml [DEBUG] (s) sourceEncoding = ISO-8859-1 [DEBUG] -- end configuration -- [DEBUG] Using build context: org.sonatype.plexus.build.incremental.DefaultBuildC ontext@27bb2f11 [ERROR] C:\DEV\myproject\mainstuff\mainstuff-jpa\src\main\java\com\yreham\mainstuff\j pa\queries\InstancesQuery.java:40: error: cannot find symbol import com.yreham.mainstuff.jpa.entity.QCIEntity; </code></pre> <p>Some details of the config m2e - Maven Integration for Eclipse 1.2.0.20120903-1050 org.eclipse.m2e.feature.feature.group Eclipse.org - m2e</p> <p>java version "1.7.0_15" Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)</p> <p>(The target build is Java 1.6)</p> <p>Here's the old pom XML</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;com.mysema.maven&lt;/groupId&gt; &lt;artifactId&gt;apt-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.0.8&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;process&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;outputDirectory&gt;${apt.target.dir}&lt;/outputDirectory&gt; processor&gt;com.mysema.query.apt.jpa.JPAAnnotationProcessor&lt;/processor&gt; &lt;logOnlyOnError&gt;true&lt;/logOnlyOnError&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>The new POM with bsc plugin</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.bsc.maven&lt;/groupId&gt; &lt;artifactId&gt;maven-processor-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.5&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;process&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;process&lt;/goal&gt; &lt;/goals&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;configuration&gt; &lt;outputDirectory&gt;${apt.target.dir}&lt;/outputDirectory&gt; &lt;processors&gt; &lt;processor&gt;com.mysema.query.apt.jpa.JPAAnnotationProcessor&lt;/processor&gt; &lt;/processors&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-jpamodelgen&lt;/artifactId&gt; &lt;version&gt;1.2.0.Final&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/plugin&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload