• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invalid value for finalName in Maven plugin parameter

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic