Author: [email protected]
Date: Mon Jul 6 08:18:20 2009
New Revision: 5669
Modified:
branches/crawlability/distro-source/linux/build.xml
branches/crawlability/distro-source/mac/build.xml
branches/crawlability/distro-source/windows/build.xml
branches/crawlability/eclipse/user/.classpath
branches/crawlability/servlet/build.xml
branches/crawlability/user/build.xml
branches/crawlability/user/src/com/google/gwt/user/tools/.classpathcrawlablesrc
branches/crawlability/user/src/com/google/gwt/user/tools/WebAppCreator.java
branches/crawlability/user/src/com/google/gwt/user/tools/webcrawlable.xmlsrc
Log:
Update to WebAppCreator and build system to allow for creation of new
crawlable apps via eclipse plugin + WebAppCreator. TODO: allow users to
have access to source of CrawlServlet.
Modified: branches/crawlability/distro-source/linux/build.xml
==============================================================================
--- branches/crawlability/distro-source/linux/build.xml (original)
+++ branches/crawlability/distro-source/linux/build.xml Mon Jul 6 08:18:20
2009
@@ -12,7 +12,12 @@
<tarfileset file="${gwt.build.lib}/gwt-dev-${dist.platform}.jar"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-dev-oophm.jar"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-user.jar"
prefix="${project.distname}" />
- <tarfileset file="${gwt.build.lib}/gwt-servlet.jar"
prefix="${project.distname}" />
+ <tarfileset file="${gwt.build.lib}/gwt-servlet.jar"
prefix="${project.distname}" />
+ <zipfileset file="${gwt.build.lib}/gwt-crawl.jar"
prefix="${project.distname}/crawl" />
+ <tarfileset dir="${gwt.tools}/crawl" includes="*.jar"
prefix="${project.distname}/crawl" />
+
+ <tarfileset
dir="${gwt.build}/out/user/bin/com/google/gwt/user/crawl/"
includes="CrawlServlet.class" prefix="${project.distname}/crawl" />
+
<tarfileset file="${gwt.build.lib}/gwt-benchmark-viewer.war"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-soyc-vis.jar"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-api-checker.jar"
prefix="${project.distname}" />
Modified: branches/crawlability/distro-source/mac/build.xml
==============================================================================
--- branches/crawlability/distro-source/mac/build.xml (original)
+++ branches/crawlability/distro-source/mac/build.xml Mon Jul 6 08:18:20
2009
@@ -13,6 +13,14 @@
<tarfileset file="${gwt.build.lib}/gwt-dev-oophm.jar"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-user.jar"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-servlet.jar"
prefix="${project.distname}" />
+
+ <tarfileset file="${gwt.build.lib}/gwt-crawl.jar"
prefix="${project.distname}/crawl" />
+
+ <tarfileset dir="${gwt.tools}/crawl" includes="*.jar"
prefix="${project.distname}/crawl" />
+
+ <tarfileset
dir="${gwt.build}/out/user/bin/com/google/gwt/user/crawl/"
includes="CrawlServlet.class" prefix="${project.distname}/crawl" />
+
+
<tarfileset file="${gwt.build.lib}/gwt-benchmark-viewer.war"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-soyc-vis.jar"
prefix="${project.distname}" />
<tarfileset file="${gwt.build.lib}/gwt-api-checker.jar"
prefix="${project.distname}" />
Modified: branches/crawlability/distro-source/windows/build.xml
==============================================================================
--- branches/crawlability/distro-source/windows/build.xml (original)
+++ branches/crawlability/distro-source/windows/build.xml Mon Jul 6
08:18:20 2009
@@ -13,6 +13,14 @@
<zipfileset file="${gwt.build.lib}/gwt-dev-oophm.jar"
prefix="${project.distname}" />
<zipfileset file="${gwt.build.lib}/gwt-user.jar"
prefix="${project.distname}" />
<zipfileset file="${gwt.build.lib}/gwt-servlet.jar"
prefix="${project.distname}" />
+
+ <zipfileset file="${gwt.build.lib}/gwt-crawl.jar"
prefix="${project.distname}/crawl" />
+
+ <zipfileset dir="${gwt.tools}/crawl" includes="*.jar"
prefix="${project.distname}/crawl" />
+
+ <tarfileset
dir="${gwt.build}/out/user/bin/com/google/gwt/user/crawl/"
includes="CrawlServlet.class" prefix="${project.distname}/crawl" />
+
+
<zipfileset file="${gwt.build.lib}/gwt-benchmark-viewer.war"
prefix="${project.distname}" />
<zipfileset file="${gwt.build.lib}/gwt-soyc-vis.jar"
prefix="${project.distname}" />
<zipfileset file="${gwt.build.lib}/gwt-api-checker.jar"
prefix="${project.distname}" />
Modified: branches/crawlability/eclipse/user/.classpath
==============================================================================
--- branches/crawlability/eclipse/user/.classpath (original)
+++ branches/crawlability/eclipse/user/.classpath Mon Jul 6 08:18:20 2009
@@ -11,5 +11,21 @@
<classpathentry kind="var" path="GWT_TOOLS/lib/w3c/sac/sac-1.3.jar"/>
<classpathentry kind="var"
path="GWT_TOOLS/lib/w3c/flute/flute-1.3.jar"/>
<classpathentry combineaccessrules="false" kind="src"
path="/gwt-dev-mac"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/commons-codec-1.3.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/commons-collections-3.2.1.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/commons-httpclient-3.1.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/commons-io-1.4.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/commons-lang-2.4.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/commons-logging-1.1.1.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/cssparser-0.9.5.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/htmlunit-2.5.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/htmlunit-core-js-2.5.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/nekohtml-1.9.12.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/sac-1.3.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/serializer-2.7.1.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/servlet-api-2.5-20081211.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/xalan-2.7.1.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/xercesImpl-2.8.1.jar"/>
+ <classpathentry kind="lib"
path="/Users/kprobst/work/gwt-tools/crawl/xml-apis-1.3.04.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/crawlability/servlet/build.xml
==============================================================================
--- branches/crawlability/servlet/build.xml (original)
+++ branches/crawlability/servlet/build.xml Mon Jul 6 08:18:20 2009
@@ -10,6 +10,18 @@
<target name="build" description="Packages this project into a jar">
<mkdir dir="${gwt.build.lib}" />
+ <!-- build gwt-crawl.jar - don't need to do this here, because user is
built before and does it -->
+<!-- <mkdir dir="${gwt.build.lib}/crawldeps" /> -->
+ <!-- unjar each jar, rejar into one jar -->
+<!-- <unzip dest="${gwt.build.lib}/crawldeps">
+ <patternset>
+ <include name="**/*.class"/>
+ <exclude name="META-INF/**"/>
+ </patternset>
+ <zipfileset dir="${gwt.tools}/crawl" includes="*.jar"/>
+ </unzip> -->
+
+
<!-- build gwt-servlet.jar -->
<gwt.jar>
<fileset dir="${gwt.user.bin}">
@@ -26,19 +38,8 @@
</gwt.jar>
- <!-- build gwt-crawl.jar -->
- <mkdir dir="${gwt.build.lib}/crawldeps" />
- <!-- unjar each jar, rejar into one jar -->
- <unzip dest="${gwt.build.lib}/crawldeps">
- <patternset>
- <include name="**/*.class"/>
- <exclude name="META-INF/**"/>
- </patternset>
- <zipfileset dir="${gwt.tools}/crawl" includes="*.jar"/>
- </unzip>
-
<!-- apply jarjar replacement rules where necessary, rejar -->
-<!-- <jarjar destfile="${gwt.build.lib}/gwt-crawl.jar">
+ <!-- <jarjar destfile="${gwt.build.lib}/gwt-crawl.jar">
<patternset>
<exclude name="META-INF/**"/>
</patternset>
@@ -47,18 +48,49 @@
<rule pattern="net.**" result="com.google.gwt.cra...@1.@2" />
<rule pattern="org.**" result="com.google.gwt.cra...@1.@2" />
<rule pattern="java_cup.**" result="com.google.gwt.cra...@1.@2" />
+ <rule pattern="javax.**" result="com.google.gwt.cra...@1.@2" />
</jarjar> -->
- <gwt.jar destfile="${gwt.build.lib}/gwt-crawl.jar">
+<!-- build gwt-crawl.jar -->
+<!-- <gwt.jar destfile="${gwt.build.lib}/gwt-crawl.jar">
<patternset>
<exclude name="META-INF/**"/>
</patternset>
<fileset dir="${gwt.build.lib}/crawldeps"/>
- </gwt.jar>
+ </gwt.jar> -->
+
+
+
</target>
<target name="clean" description="Cleans this project's intermediate and
output files">
<delete file="${project.lib}" />
+ </target>
+
+
+ <target name="crawljar">
+
+
+ <mkdir dir="${gwt.build.lib}/crawldeps" />
+ <!-- unjar each jar, rejar into one jar -->
+ <unzip dest="${gwt.build.lib}/crawldeps">
+ <patternset>
+ <exclude name="META-INF/**"/>
+ </patternset>
+ <zipfileset dir="${gwt.tools}/crawl" includes="*.jar"/>
+ </unzip>
+
+ <jarjar destfile="${gwt.build.lib}/gwt-crawl.jar">
+ <patternset>
+ <exclude name="META-INF/**"/>
+ </patternset>
+ <fileset dir="${gwt.build.lib}/crawldeps"/>
+ <rule pattern="com.**" result="com.google.gwt.crawl.c...@1" />
+ <rule pattern="net.**" result="com.google.gwt.crawl.n...@1" />
+ <rule pattern="org.**" result="com.google.gwt.crawl.o...@1" />
+ <rule pattern="java_cup.**"
result="com.google.gwt.crawl.java_c...@1" />
+ <rule pattern="javax.**" result="com.google.gwt.crawl.jav...@1" />
+ </jarjar>
</target>
</project>
Modified: branches/crawlability/user/build.xml
==============================================================================
--- branches/crawlability/user/build.xml (original)
+++ branches/crawlability/user/build.xml Mon Jul 6 08:18:20 2009
@@ -34,6 +34,8 @@
<mkdir dir="${javac.out}" />
<gwt.javac>
<classpath>
+ <pathelement location="${gwt.tools}/crawl/htmlunit-2.5.jar" />
+
<pathelement
location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
<pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
<pathelement
location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
@@ -41,6 +43,9 @@
<pathelement location="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
<pathelement location="${gwt.tools.lib}/w3c/flute/flute-1.3.jar" />
<pathelement location="${gwt.dev.jar}" />
+
+
+
</classpath>
</gwt.javac>
@@ -73,6 +78,19 @@
<target name="build" depends="compile" description="Build and package
this project">
<mkdir dir="${gwt.build.lib}" />
+
+
+<!-- <mkdir dir="${gwt.build.lib}/crawldeps" /> -->
+ <!-- unjar each jar, rejar into one jar -->
+<!-- <unzip dest="${gwt.build.lib}/crawldeps">
+ <patternset>
+ <include name="**/*.class"/>
+ <exclude name="META-INF/**"/>
+ </patternset>
+ <zipfileset dir="${gwt.tools}/crawl" includes="*.jar"/>
+ </unzip> -->
+
+
<gwt.jar>
<fileset dir="src" excludes="**/package.html" />
<fileset dir="super" excludes="**/package.html" />
@@ -80,7 +98,18 @@
<zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
<zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
<zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3.jar" />
+
+ <!-- <fileset dir="${gwt.build.lib}/crawldeps" /> -->
+
</gwt.jar>
+
+
+<!-- build gwt-crawl.jar -->
+ <gwt.jar destfile="${gwt.build.lib}/gwt-crawl.jar">
+ <fileset dir="${javac.out}"
includes="com/google/gwt/user/crawl/CrawlServlet.class" />
+ </gwt.jar>
+
+
</target>
<target name="checkstyle" description="Static analysis of source">
Modified:
branches/crawlability/user/src/com/google/gwt/user/tools/.classpathcrawlablesrc
==============================================================================
---
branches/crawlability/user/src/com/google/gwt/user/tools/.classpathcrawlablesrc
(original)
+++
branches/crawlability/user/src/com/google/gwt/user/tools/.classpathcrawlablesrc
Mon Jul 6 08:18:20 2009
@@ -3,7 +3,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="@gwtUserPath"/>
<classpathentry kind="lib" path="@gwtDevPath"/>
- <classpathentry kind="lib" path="war/WEB-INF/lib/gwt-crawl.jar"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
Modified:
branches/crawlability/user/src/com/google/gwt/user/tools/WebAppCreator.java
==============================================================================
---
branches/crawlability/user/src/com/google/gwt/user/tools/WebAppCreator.java
(original)
+++
branches/crawlability/user/src/com/google/gwt/user/tools/WebAppCreator.java
Mon Jul 6 08:18:20 2009
@@ -240,8 +240,8 @@
String gwtUserPath = installPath + '/' + "gwt-user.jar";
String gwtDevPath = installPath + '/' + Utility.getDevJarName();
String gwtServletPath = installPath + '/' + "gwt-servlet.jar";
+ String gwtCrawlPath = installPath + "/crawl/";
String gwtOophmPath = installPath + '/' + "gwt-dev-oophm.jar";
- String gwtCrawlPath = installPath + '/' + "gwt-crawl.jar";
// Public builds generate a DTD reference.
String gwtModuleDtd = "";
@@ -268,6 +268,8 @@
File warDir = Utility.getDirectory(outDir, "war", true);
File webInfDir = Utility.getDirectory(warDir, "WEB-INF", true);
File libDir = Utility.getDirectory(webInfDir, "lib", true);
+ File classesDir = Utility.getDirectory(webInfDir, "classes", true);
+ File crawlServletClassDir =
Utility.getDirectory(webInfDir, "classes/com/google/gwt/user/crawl/", true);
File moduleDir = Utility.getDirectory(srcDir,
modulePackageName.replace(
'.', '/'), true);
File clientDir = Utility.getDirectory(moduleDir, "client", true);
@@ -316,6 +318,7 @@
List<FileCreator> files = new ArrayList<FileCreator>();
List<FileCreator> libs = new ArrayList<FileCreator>();
List<FileCreator> classes = new ArrayList<FileCreator>();
+
if (!onlyEclipse) {
files.add(new FileCreator(moduleDir, moduleShortName + ".gwt.xml",
"Module.gwt.xml"));
@@ -335,9 +338,34 @@
}
if (crawlable) {
- files.add(new
FileCreator(serverDir, "CrawlServlet.java", "CrawlServlet.java"));
+// files.add(new
FileCreator(serverDir, "CrawlServlet.java", "CrawlServlet.java"));
+
+ classes.add(new
FileCreator(crawlServletClassDir, "CrawlServlet.class", gwtCrawlPath
+ "CrawlServlet.class"));
+
files.add(new FileCreator(webInfDir, "web.xml", "webcrawlable.xml"));
- libs.add(new FileCreator(libDir, "gwt-crawl.jar", gwtCrawlPath));
+
+ // read the directory here and copy all files from the crawl
directory into the WEB-INF/lib directory
+
+
+ libs.add(new FileCreator(libDir, "htmlunit-2.5.jar", gwtCrawlPath
+ "htmlunit-2.5.jar"));
+ libs.add(new FileCreator(libDir, "commons-codec-1.3.jar",
gwtCrawlPath + "commons-codec-1.3.jar"));
+ libs.add(new FileCreator(libDir, "htmlunit-core-js-2.5.jar",
gwtCrawlPath + "htmlunit-core-js-2.5.jar"));
+ libs.add(new FileCreator(libDir, "commons-collections-3.2.1.jar",
gwtCrawlPath + "commons-collections-3.2.1.jar"));
+ libs.add(new FileCreator(libDir, "commons-httpclient-3.1.jar",
gwtCrawlPath + "commons-httpclient-3.1.jar"));
+ libs.add(new FileCreator(libDir, "sac-1.3.jar", gwtCrawlPath
+ "sac-1.3.jar"));
+ libs.add(new FileCreator(libDir, "commons-io-1.4.jar", gwtCrawlPath
+ "commons-io-1.4.jar"));
+ libs.add(new FileCreator(libDir, "serializer-2.7.1.jar",
gwtCrawlPath + "serializer-2.7.1.jar"));
+ libs.add(new FileCreator(libDir, "commons-lang-2.4.jar",
gwtCrawlPath + "commons-lang-2.4.jar"));
+ libs.add(new FileCreator(libDir, "servlet-api-2.5-20081211.jar",
gwtCrawlPath + "servlet-api-2.5-20081211.jar"));
+ libs.add(new FileCreator(libDir, "xalan-2.7.1.jar", gwtCrawlPath
+ "xalan-2.7.1.jar"));
+ libs.add(new FileCreator(libDir, "cssparser-0.9.5.jar", gwtCrawlPath
+ "cssparser-0.9.5.jar"));
+ libs.add(new FileCreator(libDir, "xercesImpl-2.8.1.jar",
gwtCrawlPath + "xercesImpl-2.8.1.jar"));
+ libs.add(new FileCreator(libDir, "xml-apis-1.3.04.jar", gwtCrawlPath
+ "xml-apis-1.3.04.jar"));
+ libs.add(new FileCreator(libDir, "commons-logging-1.1.1.jar",
gwtCrawlPath + "commons-logging-1.1.1.jar"));
+ libs.add(new FileCreator(libDir, "nekohtml-1.9.12.jar", gwtCrawlPath
+ "nekohtml-1.9.12.jar"));
+ libs.add(new FileCreator(libDir, "gwt-crawl.jar", gwtCrawlPath
+ "gwt-crawl.jar"));
+
+
if (!noEclipse) {
files.add(new
FileCreator(outDir, ".classpath", ".classpathcrawlable"));
}
@@ -381,6 +409,19 @@
Util.copy(is, os);
}
}
+
+ // copy classes directly
+ for (FileCreator fileCreator : classes) {
+ FileInputStream is = new FileInputStream(fileCreator.sourceName);
+ File file = Utility.createNormalFile(fileCreator.destDir,
+ fileCreator.destName, overwrite, ignore);
+
+ if (file != null) {
+ FileOutputStream os = new FileOutputStream(file);
+ Util.copy(is, os);
+ }
+ }
+
}
protected boolean run() {
Modified:
branches/crawlability/user/src/com/google/gwt/user/tools/webcrawlable.xmlsrc
==============================================================================
---
branches/crawlability/user/src/com/google/gwt/user/tools/webcrawlable.xmlsrc
(original)
+++
branches/crawlability/user/src/com/google/gwt/user/tools/webcrawlable.xmlsrc
Mon Jul 6 08:18:20 2009
@@ -24,7 +24,7 @@
<!-- Servlet filter for crawlability -->
<filter>
<filter-name>crawlServlet</filter-name>
- <filter-class>@serverPackage.CrawlServlet</filter-class>
+ <filter-class>com.google.gwt.user.crawl.CrawlServlet</filter-class>
</filter>
<filter-mapping>
<filter-name>crawlServlet</filter-name>
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---