Revamp zxing.appspot.com to use maven-gwt-plugin and its conventions
git-svn-id: https://zxing.googlecode.com/svn/trunk@2922 59b500cc-1b3d-0410-9834-0bbf25fbcc57
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="Generator" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/Generator/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento project="Generator"/> </runtimeClasspathEntry> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war war -startupUrl Generator.html com.google.zxing.web.generator.Generator"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Generator"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
</launchConfiguration>
|
|
@ -1,84 +0,0 @@
|
|||
--- Generated by GWT WebAppCreator ---
|
||||
|
||||
Congratulations, you've successfully generated a starter project! What next?
|
||||
|
||||
-- Option A: Import your project into Eclipse (recommended) --
|
||||
|
||||
If you use Eclipse, you can simply import the generated project into Eclipse.
|
||||
We've tested against Eclipse 3.4 and 3.5. Later versions will likely also
|
||||
work, earlier versions may not.
|
||||
|
||||
If the directory containing this file does not have a .classpath or .project
|
||||
file, generate them by running 'ant eclipse.generate'
|
||||
|
||||
In Eclipse, go to the File menu and choose:
|
||||
|
||||
File -> Import... -> Existing Projects into Workspace
|
||||
|
||||
Browse to the directory containing this file,
|
||||
select "Generator".
|
||||
|
||||
Be sure to uncheck "Copy projects into workspace" if it is checked.
|
||||
|
||||
Click Finish.
|
||||
|
||||
You can now browse the project in Eclipse.
|
||||
|
||||
To launch your web app in GWT development mode, go to the Run menu and choose:
|
||||
|
||||
Run -> Open Debug Dialog...
|
||||
|
||||
Under Java Application, you should find a launch configuration
|
||||
named "Generator". Select and click "Debug".
|
||||
|
||||
You can now use the built-in debugger to debug your web app in development mode.
|
||||
|
||||
If you supplied the junit path when invoking webAppCreator, you should see
|
||||
launch configurations for running your tests in development and production
|
||||
mode.
|
||||
|
||||
-- Option B: Build from the command line with Ant --
|
||||
|
||||
If you prefer to work from the command line, you can use Ant to build your
|
||||
project. (http://ant.apache.org/) Ant uses the generated 'build.xml' file
|
||||
which describes exactly how to build your project. This file has been tested
|
||||
to work against Ant 1.7.1. The following assumes 'ant' is on your command
|
||||
line path.
|
||||
|
||||
To run development mode, just type 'ant devmode'.
|
||||
|
||||
To compile your project for deployment, just type 'ant'.
|
||||
|
||||
To compile and also bundle into a .war file, type 'ant war'.
|
||||
|
||||
If you supplied the junit path when invoking webAppCreator, you can type 'ant
|
||||
test' to run tests in development and production mode.
|
||||
|
||||
For a full listing of other targets, type 'ant -p'.
|
||||
|
||||
-- Option C: Using another IDE --
|
||||
|
||||
GWT projects can be run in other IDEs as well, but will require some manual
|
||||
setup. If you go this route, be sure to:
|
||||
|
||||
* Have your IDE build .class files into 'war/WEB-INF/classes'.
|
||||
* Add gwt-user.jar and gwt-dev.jar to your project build path.
|
||||
* When creating a launch configuration, add a classpath entry for your 'src'
|
||||
folder (this is somewhat unusual but GWT needs access to your source files).
|
||||
|
||||
If you get stuck, try to mimic what the Ant 'build.xml' would do.
|
||||
|
||||
-- Option D: Using Maven --
|
||||
|
||||
If you have generated your project with the option '-maven', you have a 'pom.xml'
|
||||
file ready to use. Assuming you have 'maven2' installed in your system, 'mvn' is
|
||||
in your path, and you have access to maven repositories, you should be able to run:
|
||||
|
||||
mvn clean # delete temporary stuff
|
||||
mvn test # run all the tests (gwt and junit)
|
||||
mvn gwt:run # run development mode
|
||||
mvn gwt:compile # compile to javascript
|
||||
mvn package # generate a .war package ready to deploy
|
||||
|
||||
For more information about other available goals, read maven and gwt-maven-plugin
|
||||
documentation (http://maven.apache.org, http://mojo.codehaus.org/gwt-maven-plugin)
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2008 ZXing authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<project name="zxing.appspot.com" default="build" basedir=".">
|
||||
|
||||
<!-- Arguments to gwtc and devmode targets -->
|
||||
<property name="gwt.args" value="" />
|
||||
|
||||
<path id="project.class.path">
|
||||
<pathelement location="src/war/WEB-INF/classes"/>
|
||||
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
|
||||
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
|
||||
<!-- Add any additional non-server libs (such as JUnit) -->
|
||||
<fileset dir="src/war/WEB-INF/lib" includes="**/*.jar"/>
|
||||
</path>
|
||||
|
||||
<target name="libs" description="Copy libs to WEB-INF/lib">
|
||||
<mkdir dir="src/war/WEB-INF/lib" />
|
||||
<copy todir="src/war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
|
||||
<copy todir="src/war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar" />
|
||||
<!-- Add any additional server libs that need to be copied -->
|
||||
</target>
|
||||
|
||||
<target name="javac" depends="libs" description="Compile java source to bytecode">
|
||||
<mkdir dir="src/war/WEB-INF/classes"/>
|
||||
<javac srcdir="src/main/java" includes="**" encoding="utf-8"
|
||||
destdir="src/war/WEB-INF/classes"
|
||||
source="6" target="6" nowarn="true"
|
||||
debug="true" debuglevel="lines,vars,source"
|
||||
includeantruntime="false">
|
||||
<classpath refid="project.class.path"/>
|
||||
</javac>
|
||||
<copy todir="src/war/WEB-INF/classes">
|
||||
<fileset dir="src/main/java" excludes="**/*.java"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
|
||||
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
|
||||
<classpath>
|
||||
<pathelement location="src/main/java"/>
|
||||
<path refid="project.class.path"/>
|
||||
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
|
||||
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
|
||||
</classpath>
|
||||
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
|
||||
<jvmarg value="-Xmx256M"/>
|
||||
<arg value="-strict"/>
|
||||
<arg line="-war"/>
|
||||
<arg value="src/war"/>
|
||||
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
|
||||
<arg line="${gwt.args}"/>
|
||||
<arg value="com.google.zxing.web.generator.Generator"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="devmode" depends="javac" description="Run development mode">
|
||||
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
|
||||
<classpath>
|
||||
<pathelement location="src/main/java"/>
|
||||
<path refid="project.class.path"/>
|
||||
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
|
||||
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
|
||||
</classpath>
|
||||
<jvmarg value="-Xmx256M"/>
|
||||
<arg value="-startupUrl"/>
|
||||
<arg value="Generator.html"/>
|
||||
<arg line="-war"/>
|
||||
<arg value="src/war"/>
|
||||
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
|
||||
<arg line="${gwt.args}"/>
|
||||
<arg value="com.google.zxing.web.generator.Generator"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="build" depends="gwtc" description="Build this project" />
|
||||
|
||||
<target name="war" depends="build" description="Create a war file">
|
||||
<zip destfile="Generator.war" basedir="src/war"/>
|
||||
</target>
|
||||
|
||||
<target name="clean" description="Cleans this project">
|
||||
<delete dir="src/war/WEB-INF/classes" failonerror="false" />
|
||||
<delete dir="src/war/generator" failonerror="false" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -19,13 +19,19 @@
|
|||
|
||||
<artifactId>zxing.appspot.com</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
<version>${gwt.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>${gwt.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -36,40 +42,29 @@
|
|||
<version>2.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<!-- TODO use Maven GWT plugin to actually build this -->
|
||||
<properties>
|
||||
<gwt.version>2.5.1</gwt.version>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>gwt</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>gwt.sdk</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="build.compiler" value="extJavac"/>
|
||||
<ant target="build"/>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<version>${gwt.version}</version>
|
||||
<configuration>
|
||||
<inplace>true</inplace>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<name>ZXing Appspot-based encoder</name>
|
||||
<description>GWT-based encoder app hosted at zxing.appspot.com</description>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
|
||||
<application>zxing</application>
|
||||
<version>8</version>
|
||||
<application>zxing-hrd</application>
|
||||
<version>9</version>
|
||||
</appengine-web-app>
|
|
@ -1,5 +1,5 @@
|
|||
application: zxing-hrd
|
||||
version: 8
|
||||
version: 9
|
||||
runtime: python27
|
||||
api_version: 1
|
||||
threadsafe: true
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |