posted 13 years ago
1. If using the following:
<webResources> <resource> <excludes> <exclude>**/log4j.xml</exclude> </excludes> </resource> <resource> <directory>${basedir}/src/main/webapp</directory> <targetPath>.</targetPath> <excludes> <exclude>**/osirisws-servlet.xml</exclude> </excludes> </resource> </webResources> <warSourceExcludes>**/osirisws-servlet.xml,**/log4j.xml</warSourceExcludes>
got exception: [INFO] Trace java.lang.NullPointerException at org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:395) at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:325) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:167) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at – user509392 4 mins ago edit
got exception: [INFO] Trace java.lang.NullPointerException at org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:395) at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:325) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:167) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at
2. If using the following
<webResources> <resource><directory>${basedir}/src/main/resources</directory><targetPath>WEB-INF/classes</targetPath> <excludes> <exclude>**/log4j.xml</exclude> </excludes> </resource> <resource> <directory>${basedir}/src/main/webapp</directory> <targetPath>.</targetPath> <excludes> <exclude>**/osirisws-servlet.xml</exclude> </excludes> </resource> </webResources> <warSourceExcludes>**/osirisws-servlet.xml,**/log4j.xml</warSourceExcludes> – user509392 35 secs ago edit
2. If using the following <webResources> <resource><directory>${basedir}/src/main/resources</directory><targetPath>WEB-INF/classes</targetPath> <excludes> <exclude>**/log4j.xml</exclude> </excludes> </resource> <resource> <directory>${basedir}/src/main/webapp</directory> <targetPath>.</targetPath> <excludes> <exclude>**/osirisws-servlet.xml</exclude> </excludes> </resource> </webResources> <warSourceExcludes>**/osirisws-servlet.xml,**/log4j.xml</warSourceExcludes>
log4.xml still existing in WEB-INF\classes so, can't be excluded while osirisws-servlet can be excluded.