2

i am completly lost after 2 hours of trying to find a solution.

For my project I need enunciate (http://enunciate.codehaus.org/) to generate a documentation for the application'S RESTFul api. Using the 1.28 version of the maven-enunciate-plugin before worked quite good, but suddenly I run into a NullPointerException in the plugin while executing the maven goal for enunciate (But that exception is another story to sort out..)

Anyway, I saw that there was an update to 1.29, so I thought I give that a try.

The normal configuration for having enunciate in your maven build process is basically this:

         <plugin>
            <groupId>org.codehaus.enunciate</groupId>
            <artifactId>maven-enunciate-plugin</artifactId>
            <version>1.29</version>
            <executions>
                <execution>
                    <goals>
                        <goal>docs</goal>
                    </goals>
                    <configuration>                            
                        <docsDir>${project.build.directory}/docs</docsDir>
                        <configFile>enunciate.xml</configFile>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Sadly 1.29 seems not be in maven central repo for now, but adding a manual dependency and repository like this:

<repositories>
    <repository>
        <id>opencast-public</id>
        <url>http://repository.opencastproject.org/nexus/content/repositories/public/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>maven-enunciate-plugin</artifactId>
        <version>1.29</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

actually issues the download of 1.29 into my local m2-repo (I can see all the files...). Anyhow, as soon as I try to use the plugin as mentioned above, maven wont execute properly but quits with:

Plugin org.codehaus.enunciate:maven-enunciate-plugin:1.29 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.enunciate:maven-enunciate-plugin:jar:1.29: Failure to find org.codehaus.enunciate:maven-enunciate-plugin:pom:1.29 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

Why is maven not using the correctly downloaded dependency??

Any help is really appreciated as I already wasted a lot of time fiddeling around with that.

skombijohn
  • 375
  • 1
  • 5
  • 17

1 Answers1

3

Just ran into this myself. You need to make sure that you add the repository in the pluginRepositories block instead of the repositories block.

<pluginRepositories>
    <pluginRepository>
        <id>opencast-public</id>
        <url>http://repository.opencastproject.org/nexus/content/repositories/public/</url>
    </pluginRepository>
</pluginRepositories>
GavinGray
  • 31
  • 1