View Javadoc

1   package org.codehaus.mojo.javascript;
2   
3   /*
4    * Derivative Work
5    * Copyright 2010 SOFTEC sa. All rights reserved.
6    *
7    * Original Work
8    * Copyright 2001-2005 The Apache Software Foundation.
9    *
10   * Licensed under the Apache License, Version 2.0 (the "License");
11   * you may not use this file except in compliance with the License.
12   * You may obtain a copy of the License at
13   *
14   *      http://www.apache.org/licenses/LICENSE-2.0
15   *
16   * Unless required by applicable law or agreed to in writing, software
17   * distributed under the License is distributed on an "AS IS" BASIS,
18   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   * See the License for the specific language governing permissions and
20   * limitations under the License.
21   */
22  
23  import java.io.File;
24  
25  /**
26   * Goal which packages scripts and resources as a javascript archive to be
27   * installed / deployed in maven repositories.
28   * 
29   * @goal package
30   * @phase package
31   * @author <a href="mailto:nicolas@apache.org">Nicolas De Loof</a>
32   */
33  public class PackageMojo
34      extends AbstractPackageMojo
35  {
36      /**
37       * The output directory of the js file.
38       * 
39       * @parameter default-value="${project.build.directory}"
40       */
41      private File outputDirectory;
42  
43      /**
44       * Optional classifier
45       * 
46       * @parameter
47       */
48      private String classifier;
49  
50      /**
51       * Location of the scripts files.
52       * 
53       * @parameter default-value="${project.build.outputDirectory}"
54       */
55      private File scriptsDirectory;
56  
57      File getOutputDirectory()
58      {
59          return outputDirectory;
60      }
61  
62      String getClassifier()
63      {
64          return classifier;
65      }
66  
67      File getScriptsDirectory()
68      {
69          return scriptsDirectory;
70      }
71  }