KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > archiver > ManifestConfiguration


1 package org.apache.maven.archiver;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 /**
20  * Capture common manifest configuration.
21  *
22  * @author <a HREF="mailto:brett@apache.org">Brett Porter</a>
23  * @version $Id: ManifestConfiguration.java 209060 2005-07-04 11:59:42Z evenisse $
24  * @todo is this general enough to be in Plexus Archiver?
25  */

26 public class ManifestConfiguration
27 {
28     private String JavaDoc mainClass;
29
30     private String JavaDoc packageName;
31
32     /**
33      * @todo boolean instead
34      */

35     private String JavaDoc addClasspath;
36
37     /**
38      * @todo boolean instead
39      */

40     private String JavaDoc addExtensions;
41
42     /**
43      * This gets prefixed to all classpath entries.
44      */

45     private String JavaDoc classpathPrefix = "";
46
47     public String JavaDoc getMainClass()
48     {
49         return mainClass;
50     }
51
52     public boolean isAddClasspath()
53     {
54         return addClasspath != null ? Boolean.valueOf( addClasspath ).booleanValue() : false;
55     }
56
57     public boolean isAddExtensions()
58     {
59         return addExtensions != null ? Boolean.valueOf( addExtensions ).booleanValue() : false;
60     }
61
62     public String JavaDoc getPackageName()
63     {
64         return packageName;
65     }
66
67     public String JavaDoc getClasspathPrefix()
68     {
69         String JavaDoc cpp = classpathPrefix.replaceAll( "\\\\", "/" );
70
71         if ( cpp.length() != 0 && !cpp.endsWith("/") )
72         {
73             cpp += "/";
74         }
75         
76         return cpp;
77     }
78 }
79
Popular Tags