You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ez <er...@gmail.com> on 2009/03/12 09:09:02 UTC

Filter a javascript file within maven-war-plugin webResources - basedir does not exist

i need to filter a javascript file and put a system variable in it.
so, i'm using maven-war-plugin webResources element:

<plugins>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-war-plugin</artifactId>
	<configuration>
		<archiveClasses>true</archiveClasses>
		<!--  for exploded WAR -->
	
<webappDirectory>${project.build.directory}/work/${war.name}.war</webappDirectory>
		
		<webResources>
                        <!-- filter nbm-version.js -->
			<resource>
				<directory>src/main/webapp/js‬</directory>
				<excludes><exclude>nbm-version.js</exclude></excludes>
				<filtering>false</filtering>
			</resource>
			<resource>
				<directory>src/main/webapp/js‬</directory>
				<includes><include>nbm-version.js</include></includes>
				<filtering>true</filtering>
			</resource>
    	        </webResources>
        
		<!-- http://maven.apache.org/guides/mini/guide-manifest.html -->
		<archive>
			<manifest>
				<addClasspath>false</addClasspath>
				<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
				<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
			</manifest>
			<manifestEntries>
				<Build-Version>${luntbuild.build.version}</Build-Version>
			</manifestEntries>
		</archive>
	</configuration>
</plugin>

However, i get an exception:
[INFO] Assembling webapp[dashboard-web] in
[C:\dev\workspace\dashboard-web\target\work\1mbm.war]
[INFO] Processing war project
[INFO] Copy webapp
webResources[C:\dev\workspace\dashboard-web\src/main/webapp/js?]
to[C:\dev\workspace\dashboard-web\target\work\1mbm.war]
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] basedir C:\dev\workspace\dashboard-web\src\main\webapp\js? does not
exist
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: basedir
C:\dev\workspace\dashboard-web\src\main\webapp\js? does not exist

-- 
View this message in context: http://www.nabble.com/Filter-a-javascript-file-within-maven-war-plugin-webResources---basedir-does-not-exist-tp22471236p22471236.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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