Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Plugin execution not covered by lifecycle configuration #22

Open
nicou50 opened this issue Apr 25, 2013 · 9 comments
Open

Plugin execution not covered by lifecycle configuration #22

nicou50 opened this issue Apr 25, 2013 · 9 comments

Comments

@nicou50
Copy link

nicou50 commented Apr 25, 2013

Hi,

I would like to use swagger-jaxrs-doclet.

However, when I add you maven configs, I have an error :

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8:javadoc (generate-service-docs) on project webservice:
An error has occurred in JavaDocs report generation: Unable to find artifact:groupId = 'com.unclehulka'
[ERROR] artifactId = 'swagger-jaxrs-doclet'
[ERROR] version = '0.0.1.6-SNAPSHOT': Failure to find com.unclehulka:swagger-jaxrs-doclet:pom:0.0.1.6-SNAPSHOT in http://morphia.google
code.com/svn/mavenrepo/ was cached in the local repository, resolution will not be reattempted until the update interval of morphia has elapsed or updates are forced
[ERROR]
[ERROR] com.unclehulka:swagger-jaxrs-doclet:pom:0.0.1.6-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] morphia (http://morphia.googlecode.com/svn/mavenrepo/, releases=true, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)

Am I missing something here ? Do I have to add a repository to find com.unclehulka:swagger-jaxrs-doclet:pom:0.0.1.6-SNAPSHOT ? I forced maven to re-update and nothing happened.

Hope that you can enlight me.

@ESPNMichaelKidd
Copy link
Contributor

So based on what you've posted here, you may have a couple things you need to do... First, this project is not in maven central yet, so you've got to install it into your local maven repo, in order to let maven have at it. Second, if you using m2eclipse, you'll need to add something like the following to your project's pom, to help it "understand" the javadoc goal...

    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings 
                only. It has no influence on the Maven build itself. -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>
                                        org.apache.maven.plugins
                                    </groupId>
                                    <artifactId>
                                        maven-javadoc-plugin
                                    </artifactId>
                                    <versionRange>
                                        [2.8,)
                                    </versionRange>
                                    <goals>
                                        <goal>javadoc</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>

@nicou50
Copy link
Author

nicou50 commented Apr 25, 2013

Thanks...

However, I'm not able to install it in maven repo. I downloaded swagger-jaxrs-doclet in zip., extracted it and try to run mvn install in it. Got the following error :

[ERROR] at com.yammer.dropwizard.apidocs.ServiceDoclet.parseModels(ServiceDoclet.java:306)
[ERROR] at com.yammer.dropwizard.apidocs.ServiceDoclet.parseModels(ServiceDoclet.java:306)
[ERROR] at com.yammer.dropwizard.apidocs.ServiceDoclet.parseModels(ServiceDoclet.java:306)
[ERROR] at com.yammer.dropwizard.apidocs.ServiceDoclet.parseModels(ServiceDoclet.java:306)
[ERROR]
[ERROR] Command line was: "C:\Program Files (x86)\Java\jdk1.7.0_07\jre..\bin\javadoc.exe" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'C:\Users***\Desktop\swagger-jaxrs-doclet-master\jaxrs-doclet-sample-dropwizard\target\classes\apidocs' dir.

@ESPNMichaelKidd
Copy link
Contributor

The current master pom fails due to some test cases in the sample project... in the meantime, (and assuming that your code won't hit the bug concerning methods returning a response object) you can install the pom in the jaxrs-doclet subdirectory. Alternately, you could try grabbing the code from my recent pull request #20, which fixes this issue (along with a couple others)

@nicou50
Copy link
Author

nicou50 commented Apr 25, 2013

I successfully installed jaxrs-doclet:0.0.2-SNAPSHOT without the sample project. It generated a .jar lib.

When I run mvn install for my project I've got the same error I had for installing whole swagger-jaxrs-doclet.

[ERROR] at com.yammer.dropwizard.apidocs.ServiceDoclet.parseModels(ServiceDoclet.java:306)
[ERROR] at com.yammer.dropwizard.apidocs.ServiceDoclet.parseModels(ServiceDoclet.java:306)
[ERROR]
[ERROR] Command line was: "C:\Program Files (x86)\Java\jdk1.7.0_07\jre..\bin\javadoc.exe" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'C:\dev\RunAndGun\target\classes\apidocs' dir.

@ESPNMichaelKidd
Copy link
Contributor

are you returning response objects ( #15 ) or using recursive models ( #21 )?

@nicou50
Copy link
Author

nicou50 commented Apr 25, 2013

yes I return Response. But I doubt that is the problem...my pom file is not even compiling. (same error : Plugin execution not covered by lifecycle configuration"

@ESPNMichaelKidd
Copy link
Contributor

using m2eclipse or similar? read my first response...
Returning response objects? read my second response...

but it does look like you're pom is ok, if you're getting the stackoverflow trying to processs the reponse object into a model... in which case you should really take a look at #20

@nicou50
Copy link
Author

nicou50 commented Apr 26, 2013

Nope, I don't think that's the problem...anyway thanks for trying...I don't have enough time left to implement this lib. Anyway, I tend to avoid manual steps in order to configure a project in order to ease migration / desktop setups for collegues. I may use this lib when it's released on maven repo.

Thanks again even though I was not able to make it work 👍

Please contact me when lib is ready. Have a good day 😄

@ryankennedy
Copy link
Owner

Getting it into maven central is one of the next steps I'm shooting for.
I've just been short on time.

Ryan

On Fri, Apr 26, 2013 at 8:05 AM, Nicolas Courjal
[email protected]:

Nope, I don't think that's the problem...anyway thanks for trying...I
don't have enough time left to implement this lib. Anyway, I tend to avoid
manual steps in order to configure a project in order to ease migration /
desktop setups for collegues. I may use this lib when it's released on
maven repo.

Thanks again even though I was not able to make it work [image: 👍]

Please contact me when lib is ready. Have a good day [image: 😄]


Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-17079877
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants