aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Invalid value for finalName in Maven plugin parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Invalid value for finalName in Maven plugin parameter" Watch "Invalid value for finalName in Maven plugin parameter" New topic
Author

Invalid value for finalName in Maven plugin parameter

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

I have developed a Maven plugin. One of my mojos has this as a parameter:



The pom.xml that includes the plugin in the <build> section has a <finalName> entry, but the plugin reports that inputDirectory was set to "${project.build.directory}/{project.artifactId}" instead. However, if I do this:



Then inputDirectory is set to "${project.build.directory}/${project.build.finalName}" as expected.

In addition, within the plugin I looked at the value of project.getBuild().getFinalName(), and even that returned artifactId, and not finalName.

So how come finalName == finalName when evaluated within the pom.xml, but finalName != finalName when evaluated within the plugin? Googling didn't yield much help (I came across several defect reports that were variations of this, all claimed to be closed and fixed).

I'm using Maven 3.0.3, and in most cases I am specifying the latest versions of various plugins.


JBoss In Action
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Invalid value for finalName in Maven plugin parameter
 
Similar Threads
Maven on Unix
maven ear plugin question
Sonar - Native Plugin
Plugins jboss-maven-plugin and cargo-maven2-plugin with JBoss 5
Deploy to Tomcat with Maven