You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/01/04 03:01:45 UTC
svn commit: r608711 - in /tapestry/tapestry5/trunk:
tapestry-core/src/site/apt/guide/project-layout.apt
tapestry-core/src/site/resources/images/projectlayout.png
tapestry-core/src/site/site.xml tapestry5.ipr
Author: hlship
Date: Thu Jan 3 18:01:43 2008
New Revision: 608711
URL: http://svn.apache.org/viewvc?rev=608711&view=rev
Log:
TAPESTRY-1802: Add documentation for the intended project layout
Added:
tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/project-layout.apt
tapestry/tapestry5/trunk/tapestry-core/src/site/resources/images/projectlayout.png (with props)
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/site/site.xml
tapestry/tapestry5/trunk/tapestry5.ipr
Added: tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/project-layout.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/project-layout.apt?rev=608711&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/project-layout.apt (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/project-layout.apt Thu Jan 3 18:01:43 2008
@@ -0,0 +1,63 @@
+ ---
+ Project Layout
+ ---
+
+Project Layout
+
+ This is the <suggested> layout for your Tapestry project; it is the layout of folders and files
+ created by the {{{../../quickstart/}Tapestry Quickstart Archetype}}. If you are creating your
+ own build using Ant, you may use whatever conventions work for you ... as long as everything gets
+ packaged up into the right place in the target WAR.
+
+ Parts of this project layout mimics the format of an <exploded WAR> (a WAR file unpackaged onto the
+ file system). This will often enable you to run your application directly from your workspace,
+ without any special build or packaging process, while developing. Each of the major IDEs has plugins
+ to allow you to accomplish this task ... and its one of the things (combined with
+ {{{reload.html}live class reloading}} that makes working with Tapestry a breeze.
+
+ Below is a sample project, whose root package is <<<com.example.myapp>>>:
+
+[../images/projectlayout.png] Project Layout
+
+* Main source files
+
+ Main Java source files, the files that will be compiled into the WAR file, are
+ in <<<src/main/java>>>. This is <only> Java source files. You can see
+ the <<<Start.java>>> source file inside the <<<pages>>> subpackage, and
+ the <<<Layout.java>>> source file inside the <<<components>>> subpackage. The package names
+ demonstrated here are required, dictated by the
+ rules for {{{component-classes.html}component classes}}.
+
+ Compiled Java classes will ultimately be packaged in the WAR inside the
+ <<<WEB-INF/classes>>> folder.
+
+* Classpath Resources
+
+ Resource files are under <<<src/main/resources>>>. This includes the
+ {{{localization.html}message catalog}} for the Start page (<<<Start.properties>>>),
+ as well as the message catalog and
+ {{{templates.html}component template}} for the Layout component (<<<Layout.tml>>>). These files will
+ also be packaged into the <<<WEB-INF/classes>>> folder of the WAR.
+
+ Component templates will always be stored in the resources folder. Templates for pages may be packaged in the WAR proper instead.
+
+* Context Resources
+
+ The WAR is built primarily from the <<<src/main/webapp>>> folder; this is where ordinary files are stored
+ (such as images and stylesheets). Page templates may also be stored here (<<<Start.tml>>>). The file <<<src/main/webapp/WEB-INF/web.xml>>>
+ is the servlet container deployment descriptor, which has a very specific
+ {{{conf.html}configuration}} for Tapestry.
+
+ The build tool (usually Maven) will be responsible for putting compiled classes and resources into the <<<WEB-INF/classes>>>
+ folder of the WAR, and for putting the Tapestry library, and its dependencies (as well as any additional libraries defined
+ by your application) into the <<<WEB-INF/lib>>> folder.
+
+* Testing
+
+ The folders <<<src/test/java>>> and <<<src/test/resources>>> are used when compiling and executing tests. Files in these
+ folders are <not> packaged into the final WAR.
+
+
+
+
+
Added: tapestry/tapestry5/trunk/tapestry-core/src/site/resources/images/projectlayout.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/resources/images/projectlayout.png?rev=608711&view=auto
==============================================================================
Binary file - no diff available.
Propchange: tapestry/tapestry5/trunk/tapestry-core/src/site/resources/images/projectlayout.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: tapestry/tapestry5/trunk/tapestry-core/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/site.xml?rev=608711&r1=608710&r2=608711&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/site.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/site.xml Thu Jan 3 18:01:43 2008
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Copyright 2006, 2007 The Apache Software Foundation
-
- 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.
--->
-
+<!--
+ Copyright 2006, 2007 The Apache Software Foundation
+
+ 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="Tapestry Core">
<bannerLeft>
<name>Tapestry 5</name>
@@ -54,6 +54,7 @@
</menu>
<menu name="User Guide">
+ <item name="Project Layout" href="guide/project-layout.html"/>
<item name="Component Classes" href="guide/component-classes.html"/>
<item name="Component Templates" href="guide/templates.html"/>
<item name="Component Parameters" href="guide/parameters.html"/>
Modified: tapestry/tapestry5/trunk/tapestry5.ipr
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry5.ipr?rev=608711&r1=608710&r2=608711&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry5.ipr (original)
+++ tapestry/tapestry5/trunk/tapestry5.ipr Thu Jan 3 18:01:43 2008
@@ -97,6 +97,7 @@
<module name="tapestry-core">
<files>
<file url="file://$PROJECT_DIR$/tapestry-core/src/test/app1/WEB-INF/web.xml" />
+ <file url="file://$PROJECT_DIR$/tapestry-core/target/site-webapp/WEB-INF/web.xml" />
</files>
</module>
<module name="tapestry-project" />