At line 1 added 2 lines. |
<div style="border: 1px solid #F0C000; background-color: #FFFFCE; padding: 10px">__NOTE:__ This wiki and its contents are for AppFuse 1.x. If you'd like to use AppFuse 2.x, please see the [new wiki|http://appfuse.org] or the [AppFuse 2.x QuickStart Guide|http://appfuse.org/display/APF/AppFuse+QuickStart].</div> |
|
At line 3 changed 8 lines. |
# [Download|Downloads] the source version or checkout the ''appfuse'' module from CVS (cvs -d :pserver:[email protected]:/cvs co appfuse). |
# Install J2SE 1.4+, set a JAVA_HOME environment variable, install Ant 1.6.2+, set an ANT_HOME environment variable. |
# Install MySQL 3.23.x+ (recommend 4.0.18) and Tomcat 4.1.x+ (recommend 5.0.28). Set a CATALINA_HOME environment variable to point to your Tomcat installation. Optionally, you can see my [development environment setup|DevelopmentEnvironment] and get links to download the above packages. |
# Setup a local SMTP server or change mail.properties (in the web/WEB-INF/classes directory) and build.properties (in the root -- for log4j messages) to point to an existing one - they default to ''localhost''. |
# Copy lib/junit3.8.1/junit.jar to $ANT_HOME/lib. |
# Run __ant new -Dapp.name=YOURAPPNAME -Ddb.name=YOURDBNAME__. This will create a directory named YOURAPPNAME in the same directory as appfuse. <div class="note" style="margin: 5px; background-color: #fcc"> __WARNING:__ Some app.name values will not work - don't use "test", anything with "appfuse" in it or anything that starts with numbers. Also, two dashes (-) in a name will mess things up.</div> |
# Navigate to the new directory and run __ant setup__ to create the database and setup your app on Tomcat. The database setup will only work if your root user has no password. You can change this in build.properties if necessary. If you want to test and make sure everything works, run __ant test-all__ - make sure Tomcat is stopped when you do this. |
# Run __ant test-reports__ - there will be a message after it runs telling you how you can view the generated reports. |
# Install J2SE 1.4.2+ and set a JAVA_HOME environment variable pointing to your installation directory. |
# [Download|https://appfuse.dev.java.net/servlets/ProjectDocumentList] the source version or checkout the 1.9.x branch from Subversion (svn co https://appfuse.dev.java.net/svn/appfuse/branches/BRANCH_1-9-x appfuse). <!--div class="note" style="margin: 10px"> __NOTE:__ You can download AppFuse 1.8, Ant 1.6.5, Tomcat 5.0.28 and MySQL 4.1.11 (for Windows) using [the all-in-one installer|https://appfuse.dev.java.net/files/documents/1397/13863/appfuse-installer-1.8.zip]. View this package's [README.txt|https://appfuse.dev.java.net/source/browse/*checkout*/appfuse/extras/myjavapack/README-dist.txt] for more information.</div--> |
# Install Ant 1.6.5+ and set an ANT_HOME environment variable. Install Tomcat 4.1.x+ (recommend 5.5.20) and set a CATALINA_HOME environment variable to point to your Tomcat installation. Checkout my [development environment setup|DevelopmentEnvironment] to get links for these packages and to see where I usually install them. |
# Install MySQL 3.23.x+ (recommend 5.0+). <div class="note" style="margin: 10px"> __NOTE:__ If you're using MySQL 4.1.7, make sure to use a UTF-8 character set and an InnoDB table type. [Here's how|http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseSupport#ref-AppFuseSupport-5].</div> |
# [Setup a local SMTP server|AppFuseSMTP] or change mail.properties (in the web/WEB-INF/classes directory) and build.properties (in the root -- for log4j messages) to point to an existing one - they default to ''localhost''. |
# Copy lib/junit3.8.1/junit.jar to $ANT_HOME/lib.<div class="note" style="margin: 10px">__NOTE:__ You may see an ant-junit.jar file already in $ANT_HOME/lib. This jar is not the JUnit library, rather it is for the Ant junit task which will use the junit.jar that you place here.</div> |
# If you're planning on using iBATIS (instead of Hibernate) or a web framework other than Struts, install that now using the instructions below. |
# Run __ant new__ from the appfuse directory. You will be prompted for an application name, database name and package name. After entering these, a directory containing your new application will be created in the same directory as appfuse. <div class="note" style="margin: 10px; background-color: #fcc"> __WARNING:__ Some application values will not work - don't use "test", anything with "appfuse" in it or anything that starts with numbers. Also, two dashes (-) in a name will mess things up.</div> |
# Navigate to your new project's directory and run __ant setup__ (or __ant setup-db setup-tomcat deploy__) to create the database, configure Tomcat and deploy your application. The database setup will only work if your root user has no password. You can change this in build.properties if necessary. Need [assistance with mysql setup|assistance with ant setup]? |
# If you want to test and make sure everything works, run __ant test-all__ - make sure Tomcat is stopped when you do this. Next, run __ant test-reports__ - there will be a message after it runs telling you how you can view the generated reports. |
At line 19 added 3 lines. |
|
<div class="note" style="margin-left: 40px"> __NOTE:__ If you're developing with AppFuse on Unix, run "ant fixcrlf" before running the installers. You can also download a pre-built version that already has the web framework option you're looking for.</div> |
|
At line 18 changed 1 line. |
* If you'd like to use [JSF|http://www.myfaces.org] as the web framework, view the README.txt in {{extras/jsf}}. |
* If you'd like to use [JSF|http://myfaces.apache.org/] as the web framework, view the README.txt in {{extras/jsf}}. |
At line 21 changed 2 lines. |
* If you'd like you can write a script to automate the creation and testing of your project from AppFuse. There are a couple in CVS that I use for testing: [spring+ibatis|https://appfuse.dev.java.net/nonav/source/browse/*checkout*/appfuse/test-spring.sh?content-type=text/plain] and [webwork|https://appfuse.dev.java.net/nonav/source/browse/*checkout*/appfuse/test-spring.sh?content-type=text/plain]. Note that using "appfuse" in a real-world project name is a bad idea as it'll find/replace things it shouldn't. |
* If you don't want to install iBATIS, Spring MVC or WebWork - you should delete their installers in the {{extras}} folder before checking your project into source control. |
* If you'd like you can write a script to automate the creation and testing of your project from AppFuse. There are a couple in CVS that I use for testing: [spring+ibatis|https://appfuse.dev.java.net/source/browse/*checkout*/appfuse/Attic/test-spring.sh?content-type=text/plain] and [webwork|https://appfuse.dev.java.net/nonav/source/browse/*checkout*/appfuse/Attic/test-webwork.sh?content-type=text/plain]. Note that using "appfuse" in a real-world project name is a bad idea as it'll find/replace things it shouldn't. |
* If you don't want to install iBATIS, Spring MVC, WebWork, JSF or Tapestry - you should delete their installers in the {{extras}} folder before checking your project into source control. |
At line 25 removed 16 lines. |
|
---- |
|
Usually, after you get all this to work - it's likely you'll want to change all your package names to "com.company" rather than "org.appfuse". Thanks to Ben Gill, this is now <strong>much</strong> easier than it used to be. ''Thanks Ben!'' |
|
All you need is the [rename-packages tool|https://appfuse.dev.java.net/files/documents/1397/7833/rename-packages-0.9.zip]. View the [README|https://appfuse.dev.java.net/servlets/ProjectDocumentView?documentID=7836] file instructions for installing and using. The source for this project can also be [downloaded|https://appfuse.dev.java.net/servlets/ProjectDocumentList?folderID=2072]. This tool should work regardless of whether you've installed any options or not. |
|
%%note __NOTE:__ Don't forget to back up your project directory before using it! Just in case... ;-)%% |
|
If you rename the org.appfuse.webapp.form package to, say test.web.form, you also have to edit the ConverterUtil in the src/service package. Method getOpposingObject is your friend, take a look at |
|
[{Java2HtmlPlugin |
|
name = StringUtils.replace(name, "model", "webapp.form"); |
name = StringUtils.replace(name, "webapp.form", "model"); |
}] |