1 package org.codehaus.mojo.javascript;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.io.File;
20
21 import org.apache.maven.plugin.Mojo;
22 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
23
24 public class WarPackageMojoTest
25 extends AbstractMojoTestCase
26 {
27 public void testCopyJsSources()
28 throws Exception
29 {
30 File testPom = new File( getBasedir(), "src/test/resources/war-package.pom" );
31 Mojo mojo = (Mojo) lookupMojo( "war-package", testPom );
32 assertNotNull( "Failed to configure the plugin", mojo );
33
34 mojo.execute();
35
36 assertTrue( new File( "./target/test-target/war-package/scripts/lib/prototype.js" ).exists() );
37 assertTrue( new File( "./target/test-target/war-package/scripts/builder.js" ).exists() );
38 assertTrue( new File( "./target/test-target/war-package/scripts/controls.js" ).exists() );
39 }
40 }