|
@@ -50,21 +50,27 @@ |
50 |
50 |
|
|
51 |
51 |
|
// ------------------------------------------------ GWT Parameters ------------------------------------------------- |
52 |
52 |
|
|
53 |
|
- |
public static final Parameter GWTat = def( "GWTat", Form.STRING, "JAR name w/ optional path for the JAR." ); |
|
53 |
+ |
public static final Parameter GWT = def( "GWT", Form.STRING, "The 'package' Name of the 'root' '.gwt.xml' file. e.g. 'org.sample.MyGwtApplication'" ); |
54 |
54 |
|
|
55 |
|
- |
public static final Parameter GWT = def( "GWT", Form.STRING, "JAR name w/ optional path for the JAR." ); |
|
55 |
+ |
public static final Parameter GWTat = def( "GWTat", Form.STRING, "The directory to find the GWT JARs. Required if 'GWT' indicated" ); |
56 |
56 |
|
|
57 |
|
- |
public static final Parameter GWTwar = def( "GWTwar", Form.STRING, "JAR name w/ optional path.", // |
58 |
|
- |
"Default: '$target$/GWTCompilerOutput'." ); |
|
57 |
+ |
public static final Parameter GWTwar = def( "GWTwar", Form.STRING, "The directory to put the GWT Compiler's output in.", // |
|
58 |
+ |
"Default: '$target$/GWTCompilerOutput'." ); |
59 |
59 |
|
|
60 |
|
- |
public static final Parameter GWTstyle = def( "GWTwar", Form.STRING, "JAR name w/ optional path. - DETAILED", // |
61 |
|
- |
"Default: 'XXX'." ); |
|
60 |
+ |
public static final Parameter GWTstyle = def( "GWTstyle", Form.STRING, "GWT Compiler's output 'style'. Options are: OBF, PRETTY, or DETAILED. Note: OBF == Obfuscated.", // |
|
61 |
+ |
"Default: 'OBF'." ); |
62 |
62 |
|
|
63 |
|
- |
public static final Parameter GWTlogging = def( "GWTwar", Form.STRING, "JAR name w/ optional path.", // |
64 |
|
- |
"Default: 'INFO'." ); |
|
63 |
+ |
public static final Parameter GWTlogging = def( "GWTlogging", Form.STRING, "Logging level for the GWT Compiler. Options are: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL.", // |
|
64 |
+ |
"Default: 'INFO'." ); |
65 |
65 |
|
|
66 |
|
- |
public static final Parameter GWTmx = def( "GWTwar", Form.STRING, "JAR name w/ optional path.", // |
67 |
|
- |
"Default: '128m'." ); |
|
66 |
+ |
public static final Parameter GWTmx = def( "GWTmx", Form.STRING, "the -Xmx value for the GWT Compiler.", // |
|
67 |
+ |
"Default: '128m'." ); |
|
68 |
+ |
|
|
69 |
+ |
public static final String GWT_DEV = "gwt-dev.jar"; |
|
70 |
+ |
public static final String GWT_USER = "gwt-user.jar"; |
|
71 |
+ |
public static final String GWT_SERVLET = "gwt-servlet.jar"; |
|
72 |
+ |
|
|
73 |
+ |
private static final String[] GWT_JARS = {GWT_DEV, GWT_USER, GWT_SERVLET}; |
68 |
74 |
|
|
69 |
75 |
|
// ------------------------------------------------ Default Support ------------------------------------------------ |
70 |
76 |
|
|
|
@@ -75,6 +81,40 @@ |
75 |
81 |
|
defaultSOURCE(); |
76 |
82 |
|
defaultRESOURCES(); |
77 |
83 |
|
defaultJAR(); |
|
84 |
+ |
defaultGWT(); |
|
85 |
+ |
} |
|
86 |
+ |
|
|
87 |
+ |
protected void defaultGWT() |
|
88 |
+ |
{ |
|
89 |
+ |
String zGWT = getGWT(); |
|
90 |
+ |
if ( null != zGWT ) |
|
91 |
+ |
{ |
|
92 |
+ |
verifyGWTlibs( getGWTat() ); |
|
93 |
+ |
defaultKey( GWTwar, "$target$/GWTCompilerOutput" ); |
|
94 |
+ |
defaultKey( GWTstyle, "OBF" ); |
|
95 |
+ |
defaultKey( GWTlogging, "INFO" ); |
|
96 |
+ |
defaultKey( GWTmx, "128m" ); |
|
97 |
+ |
} |
|
98 |
+ |
} |
|
99 |
+ |
|
|
100 |
+ |
protected void verifyGWTlibs( String pRelativeGWTlibsDir ) |
|
101 |
+ |
{ |
|
102 |
+ |
if ( pRelativeGWTlibsDir == null ) |
|
103 |
+ |
{ |
|
104 |
+ |
throw new IllegalStateException( "GWT specified, but GWTat!" ); |
|
105 |
+ |
} |
|
106 |
+ |
if ( !dirExists( pRelativeGWTlibsDir ) ) |
|
107 |
+ |
{ |
|
108 |
+ |
throw new IllegalStateException( "GWTat '" + pRelativeGWTlibsDir + "' is not a directory!" ); |
|
109 |
+ |
} |
|
110 |
+ |
File zGWTdir = canonicalizePath( getCanonicalProjectDir(), pRelativeGWTlibsDir ); |
|
111 |
+ |
for ( String zGwtJar : GWT_JARS ) |
|
112 |
+ |
{ |
|
113 |
+ |
if ( !new File( zGWTdir, zGwtJar ).isFile() ) |
|
114 |
+ |
{ |
|
115 |
+ |
throw new IllegalStateException( "GWTat '" + pRelativeGWTlibsDir + "' -> '" + zGWTdir.getPath() + "' did not contain: " + zGwtJar ); |
|
116 |
+ |
} |
|
117 |
+ |
} |
78 |
118 |
|
} |
79 |
119 |
|
|
80 |
120 |
|
protected void defaultJAR() |
|
@@ -226,6 +266,36 @@ |
226 |
266 |
|
return getPath( APPDIR.getName() ); |
227 |
267 |
|
} |
228 |
268 |
|
|
|
269 |
+ |
public String getGWT() |
|
270 |
+ |
{ |
|
271 |
+ |
return get( GWT.getName() ); |
|
272 |
+ |
} |
|
273 |
+ |
|
|
274 |
+ |
public String getGWTat() |
|
275 |
+ |
{ |
|
276 |
+ |
return get( GWTat.getName() ); |
|
277 |
+ |
} |
|
278 |
+ |
|
|
279 |
+ |
public String getGWTwar() |
|
280 |
+ |
{ |
|
281 |
+ |
return get( GWTwar.getName() ); |
|
282 |
+ |
} |
|
283 |
+ |
|
|
284 |
+ |
public String getGWTstyle() |
|
285 |
+ |
{ |
|
286 |
+ |
return get( GWTstyle.getName() ); |
|
287 |
+ |
} |
|
288 |
+ |
|
|
289 |
+ |
public String getGWTlogging() |
|
290 |
+ |
{ |
|
291 |
+ |
return get( GWTlogging.getName() ); |
|
292 |
+ |
} |
|
293 |
+ |
|
|
294 |
+ |
public String getGWTmx() |
|
295 |
+ |
{ |
|
296 |
+ |
return get( GWTmx.getName() ); |
|
297 |
+ |
} |
|
298 |
+ |
|
229 |
299 |
|
// ---------------------------------- Generic accessors for the underlying Data (map) ------------------------------ |
230 |
300 |
|
|
231 |
301 |
|
public boolean has( Object key ) |