Re: Problem in configuring and downloading maven-apt-plugin

1,387 views
Skip to first unread message

Timo Westkämper

unread,
Aug 16, 2012, 5:33:40 AM8/16/12
to Querydsl on behalf of Nileshm
Hi.

On Thu, Aug 16, 2012 at 12:13 PM, Querydsl on behalf of Nileshm <querydsl+noreply-APn2wQcLQrgK9VV...@googlegroups.com> wrote:
Hi,

I am finding problem in downloading maven-apt-plugin for using Querydsl
I have referred the Querydsl reference manual and added the below Maven dependencies in pom.xml.

        <dependency>
          <groupId>com.mysema.querydsl</groupId>
          <artifactId>querydsl-apt</artifactId>
          <version>2.7.2</version>
          <scope>provided</scope>
        </dependency>   
           
        <dependency>
          <groupId>com.mysema.querydsl</groupId>
          <artifactId>querydsl-jpa</artifactId>
          <version>2.7.2</version>
        </dependency>

       <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.1</version>
            <scope>provided</scope>
        </dependency>

And then added the plug-in as below

              <plugin>
                <groupId>com.mysema.maven</groupId>
                <artifactId>maven-apt-plugin</artifactId>
                <version>1.0.2</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>
            </plugin>

The configuration looks ok.

Then the pom file gives the below error:

Plugin execution not covered by lifecycle configuration: com.mysema.maven:maven-apt-plugin:1.0.2:process (execution: default, phase: generate-sources)

Are you sure you get this exception in Maven? It looks more like an Eclipse issue.

This might help http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin


I also find problems in downloading the maven-apt-plugin manually using below maven command:

mvn install:install-file -DgroupId=com.mysema.maven -DartifactId=maven-apt-plugin -Dversion=1.0.2 -Dfile=/home/nileshm/Downloads/maven-apt-plugin.1.0.2.jar -Dpackaging=jar -DgeneratePom=true

It gives the below error:

Error installing artifact 'com.mysema.maven:maven-apt-plugin:jar': Error installing artifact: File /home/nileshm/Downloads/maven-apt-plugin.jar does not exist

Does the given file exist?

maven-apt-plugin is publicly available, no need to install it explicitly http://search.maven.org/#artifactdetails|com.mysema.maven|maven-apt-plugin|1.0.2|maven-plugin
 

Please excuse me if I am having some insufficient knowledge about it.
Can someone please help me to resolve this?


Cheers,
Nileshm








--
Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com



Nileshm

unread,
Aug 16, 2012, 6:26:23 AM8/16/12
to quer...@googlegroups.com
Thanks Timo for the reply.

I have cleared the maven repository for the plug-in and re-run the maven install and the maven-apt-plugin.1.0.2.jar has downloaded successfully and generated the Q** class which was required.
But the pom.xml in the eclipse still gives the following error:


Plugin execution not covered by lifecycle configuration: com.mysema.maven:maven-apt-plugin:1.0.2:process (execution: default, phase: generate-sources)

Can you please guide me for this?

Cheers,
Nileshm



On Thursday, 16 August 2012 10:33:40 UTC+1, Timo Westkämper wrote:
Hi.

Timo Westkämper

unread,
Aug 16, 2012, 6:34:49 AM8/16/12
to Querydsl on behalf of Nileshm
Hi Nileshm.

I don't use m2eclipse, so I don't really know what goes wrong here.

But I think this might help https://github.com/ilx/m2e-querydsl

Br,
Timo
Reply all
Reply to author
Forward
0 new messages