Small problems with Mevenide 3.1

A couple of days ago the Mevenide team released version 3.1 of their Maven plugin for the Java IDE Netbeans. Naturally an auto-update process kicked in here and it replaced the previously installed version 3.0.12 on my Netbeans installation.

When I restarted the IDE afterwards and wanted to run a project of mine, I was greeted with a nice little error message.


[ERROR]
[ERROR]
[ERROR]Maven cannot calculate your build plan, given the following information:
[ERROR]
[ERROR]Tasks:
[ERROR]- package
[ERROR]- org.codehaus.mevenide:netbeans-run-plugin:RELEASE:run-jar
[ERROR]
[ERROR]Current project:
[ERROR]Group-Id: MyProject
[ERROR]Artifact-Id: MyProject
[ERROR]Version: 0.0.1-SNAPSHOT
[ERROR]From file: /Users/zerok/Documents/workspace/MyProject/pom.xml
[ERROR]
[ERROR]
[ERROR]Error message: Failed to resolve plugin for mojo binding: org.apache.maven.plugins:maven-compiler-plugin:RELEASE:compile
[ERROR]Root error message: The PluginDescriptor for the plugin org.apache.maven.plugins:maven-compiler-plugin was not found. Should have been in realm: ClassRealm[/plugins/org.apache.maven.plugins:maven-compiler-plugin:RELEASE@48/thread:exec_Run MyProject_5, parent: null]

For the last two weeks now I’ve ignored this error and simply did all my program-executing in the shell using a small bash script to copy over all the dependencies and setting the respective classpath.

But today I stopped being the only one affected in the office since my boss installed Netbeans again and naturally also received this message of love from the Maven plugin.

After some length googling around I eventually found a solution for this problem provided by imyousuf on dzone. The problem is, that for some reason the plugin can no longer resolve the “RELEASE” keyword correctly when loading the maven-compiler-plugin; and the solution is pretty simple:

Search your pom.xml for the configuration for this plugin:


<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>RELEASE</version>
    <configuration>
        <source>1.5</source>
        <target>1.5</target>
        <encoding>UTF-8</encoding>
    </configuration>
</plugin>

… and replace “RELEASE” in there with a concret version like for instance “2.0.2” – which is the latest release of this plugin.

Another problem I ran into was that when you’ve created your project using an older version of the Maven plugin, it created a configuration for the maven-assembly-plugin that contains some now deprecated parts. If you see something like this in your pom.xml


<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <executions>
        <execution>
            <id>nb</id>
            <phase>package</phase>
            <goals>
                <goal>directory</goal>
            </goals>
            <configuration>
                <descriptor>
                    ${basedir}/src/main/assemblies/netbeans-run.xml
                </descriptor>
                <finalName>executable</finalName>
            </configuration>
        </execution>
    </executions>
</plugin>

There the whole <goal>-block seems now to be deprecated. After removing (or actually commenting it out) the project finally ran again from within Netbeans :-)

comments powered by Disqus