maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Winsor, Daniel" <daniel.win...@etrade.com>
Subject Should maven-war-plugin accept null includes?
Date Fri, 02 Nov 2012 21:16:20 GMT
Hi,

I ran into the use case where I'd like to have an overlay that will either
include a file or not, depending on a property.  EG
<includes>
  <include>file1</include>
  <include>file2</include>

  <include>${some.property}</include>

</includes>

Where
<properties>
  <some.property></some.property>
  <!-- OR <some.property>file3</some.property> -->
</properties>

Unfortunately this results in an exception being thrown during the build,
since the file is null ->  Failed to execute goal
org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on
project neo-widgets: Execution default-war of goal
org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed.
NullPointerException

Interestingly, the packageExcludes parameter of the same plugin does
accept null.  So although I made a workaround by setting the property to
"dummy_value_cant_be_null", should this plugin be made to accept null
include parameters?



Thank you,
Daniel Winsor
Associate, IT Architecture


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message