Announcement Announcement Module
Collapse
No announcement yet.
query dsl install Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • query dsl install

    Hi

    Did you managed to install querydsl in sts ?
    Here is my config :

    STS : 2.9.2
    Maven :

    Code:
    <querydsl.version>2.6.0</querydsl.version>
    ....
    <dependency>
    	<groupId>com.mysema.querydsl</groupId>
    	<artifactId>querydsl-apt</artifactId>
    	<version>${querydsl.version}</version>
    </dependency>
    <dependency>
    	<groupId>com.mysema.querydsl</groupId>
    	<artifactId>querydsl-jpa</artifactId>
    	<version>${querydsl.version}</version>
    	<scope>provided</scope>
    </dependency>
    ....
    <plugin>
    	<groupId>com.mysema.maven</groupId>
    	<artifactId>maven-apt-plugin</artifactId>
    	<version>1.0.3</version>
    	<executions>
    		<execution>
    			<goals>
    				<goal>process</goal>
    			</goals>
    			<configuration>
    				<outputDirectory>${project.basedir}/target/generated-sources/java</outputDirectory>
    				<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
    				<processors>
    					<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
    				</processors>
    				<showWarnings>true</showWarnings>
    			</configuration>
    		</execution>
    	</executions>
    </plugin>
    Nothing happens after project clean

    I tried : mvn apt: process

    Code:
    [INFO]
    [INFO] --- maven-apt-plugin:1.0.3:process (default-cli) @ SocialGroupManager ---
    [ERROR] Either processor or processors need to be given
    [ERROR] execute error
    java.lang.IllegalArgumentException: Either processor or processors need to be given
            at com.mysema.maven.apt.AbstractProcessorMojo.buildProcessor(AbstractProcessorMojo.java:135)
            at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:152)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    Regards

  • #2
    Installation

    Hi

    I forget <phase>generate-sources</phase>

    Here is my working configuration :

    Code:
    <querydsl.version>2.7.0</querydsl.version>
    <querydsl.generated.src>target/generated-sources/java</querydsl.generated.src>
    ...
    <plugin>
    	<groupId>com.mysema.maven</groupId>
    	<artifactId>maven-apt-plugin</artifactId>
    	<version>1.0.3</version>
    	<executions>
    		<execution>
    			<phase>generate-sources</phase>
    			<phase></phase>
    			<goals>
    				<goal>process</goal>
    			</goals>
    			<configuration>
    				<outputDirectory>${querydsl.generated.src}</outputDirectory>
    				<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
    			</configuration>
    		</execution>
    	</executions>
    </plugin>
    ....
    <dependency>
    	<groupId>com.mysema.querydsl</groupId>
    	<artifactId>querydsl-apt</artifactId>
    	<version>${querydsl.version}</version>
    </dependency>
    <dependency>
    	<groupId>com.mysema.querydsl</groupId>
    	<artifactId>querydsl-jpa</artifactId>
    	<version>${querydsl.version}</version>
    </dependency>
    hope it will help somebody.

    STS complais about a problem with the phase :
    Code:
    Plugin execution not covered by lifecycle configuration: com.mysema.maven:maven-apt-plugin:1.0.3:process (execution: default, phase: generate-sources)
    For the moment I ignored it.

    Regards

    Comment


    • #3
      Hi,
      I am having trouble getting my config (which is the same as yours) to work. How did you sort this problem out?
      Regards,
      J.

      Comment


      • #4
        Hi

        I am using
        <phase></phase>
        to ignore the error in sts.

        Regards

        Comment

        Working...
        X