turbine layout control(一)envirement setup
official website
http://turbine.apache.org/index.html
demo tutorial
http://henning.schmiedehausen.org/turbine/
read book <turbine trutorial.pdf>
Introduction to Maven and Turbine
maven1
download maven1 from http://maven.apache.org/maven-1.x/index.html
http://archive.apache.org/dist/maven/binaries/maven-1.0.2.zip get the file 1.0.2 version
Jakarta Turbine
a platform for building applications, not just running them
a toolbox for building web applications
jakarta velocity to render view templates
db torque for persistence (I may not use this)
Maven and M.E.T.A.(Maven Environment for Turbine Applications) installaction
install maven
MAVEN_HOME=E:\tool\maven-1.0.2
path=E:\tool\maven-1.0.2\bin
open a cmd window and type command > maven -v
install M.E.T.A
cmd>maven -DartifactId=maven-turbine-plugin -DgroupId=turbine -Dversion=1.3 plugin:download
intall the M.E.T.A failed
maven cmd console output mess code, I can't see what is the error. So I get the file maven.jar from E:\tool\maven-1.0.2\lib.
find the file messages_zh_CN.properties from org/apache/maven/messages and delete it, then we can see the error message clearly.
error message :
Attempting to download commons-io-20030203.000550.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-io/jars/commons-io-20030203.000550.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-io-20030203.000550.jar.
Attempting to download commons-net-1.1.0.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-net/jars/commons-net-1.1.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-net-1.1.0.jar.
Attempting to download commons-httpclient-2.0.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-httpclient-2.0.jar.
Attempting to download commons-lang-2.0.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-lang-2.0.jar.
Attempting to download commons-logging-1.0.3.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.3.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-logging-1.0.3.jar.
Attempting to download jsch-0.1.5.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/jsch/jars/jsch-0.1.5.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download jsch-0.1.5.jar.
Attempting to download commons-jelly-20030902.160215.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-20030902.160215.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-jelly-20030902.160215.jar.
Attempting to download commons-jelly-tags-velocity-20030303.205659.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-tags-velocity-20030303.205659.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-jelly-tags-velocity-20030303.205659.jar.
Attempting to download velocity-1.4-dev.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/velocity/jars/velocity-1.4-dev.jar]: java.io.IOException: Unknown error downloading; status code was: 301 WARNING: Failed to download velocity-1.4-dev.jar.
The build cannot continue because of the following unsatisfied dependencies:
compare to the maven2 , maven 1 can modify the build.properties to add some respostories to maven1.
To access the repository from your project, add the following line to your project.properties or build.properties.
maven.repo.remote=http://download.java.net/maven/1/,http://www.ibiblio.org/maven/,http://mirrors.ibiblio.org/pub/mirrors/maven2/,http://localhost:8081/nexus/content/groups/public/
But it still can't work because of the directory name jars. so copy the jars to the respository is a good way to solve this problem.
after that , we type cmd:
cmd>maven -g
console output:
turbine:install-demo
turbine:java-compile
turbine:setup-torque
turbine:torque-copy-app-om
turbine:torque-copy-data-dtd
turbine:torque-copy-id-table-om
turbine:torque-copy-om
turbine:torque-copy-security-om
turbine:torque-datadtd
turbine:torque-datasql
turbine:torque-init
turbine:torque-insert-sql
turbine:torque-om-check
turbine:torque-security-datadtd
turbine:torque-security-datasql
turbine:torque-sql
turbine:war-webapp
turbine:webapp
uberjar:init
war:init
war:load
xdoc:dump-report-settings
xdoc:register-reports
we install the envirement successful.
Turbine buzzwords
Modules:
generic term for view parts and actions.Modules are organized in java package.
Tool:
Part of the tool box provided by Turbine
Action:
Part of the Controller, responsible for changing model state
Service:
Plugin-in part of the framework
The Turbine View is composed from
Page: Everything you see
Screen: Content of the page
Navigation: Top,Bottom,Menu
Layout: Where to put everything
official website
http://turbine.apache.org/index.html
demo tutorial
http://henning.schmiedehausen.org/turbine/
read book <turbine trutorial.pdf>
Introduction to Maven and Turbine
maven1
download maven1 from http://maven.apache.org/maven-1.x/index.html
http://archive.apache.org/dist/maven/binaries/maven-1.0.2.zip get the file 1.0.2 version
Jakarta Turbine
a platform for building applications, not just running them
a toolbox for building web applications
jakarta velocity to render view templates
db torque for persistence (I may not use this)
Maven and M.E.T.A.(Maven Environment for Turbine Applications) installaction
install maven
MAVEN_HOME=E:\tool\maven-1.0.2
path=E:\tool\maven-1.0.2\bin
open a cmd window and type command > maven -v
install M.E.T.A
cmd>maven -DartifactId=maven-turbine-plugin -DgroupId=turbine -Dversion=1.3 plugin:download
intall the M.E.T.A failed
maven cmd console output mess code, I can't see what is the error. So I get the file maven.jar from E:\tool\maven-1.0.2\lib.
find the file messages_zh_CN.properties from org/apache/maven/messages and delete it, then we can see the error message clearly.
error message :
Attempting to download commons-io-20030203.000550.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-io/jars/commons-io-20030203.000550.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-io-20030203.000550.jar.
Attempting to download commons-net-1.1.0.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-net/jars/commons-net-1.1.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-net-1.1.0.jar.
Attempting to download commons-httpclient-2.0.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-httpclient-2.0.jar.
Attempting to download commons-lang-2.0.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-lang-2.0.jar.
Attempting to download commons-logging-1.0.3.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.3.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-logging-1.0.3.jar.
Attempting to download jsch-0.1.5.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/jsch/jars/jsch-0.1.5.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download jsch-0.1.5.jar.
Attempting to download commons-jelly-20030902.160215.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-20030902.160215.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-jelly-20030902.160215.jar.
Attempting to download commons-jelly-tags-velocity-20030303.205659.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-tags-velocity-20030303.205659.jar]: java.io.IOException: Unknown error downloading; status code was: 301
WARNING: Failed to download commons-jelly-tags-velocity-20030303.205659.jar.
Attempting to download velocity-1.4-dev.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/velocity/jars/velocity-1.4-dev.jar]: java.io.IOException: Unknown error downloading; status code was: 301 WARNING: Failed to download velocity-1.4-dev.jar.
The build cannot continue because of the following unsatisfied dependencies:
compare to the maven2 , maven 1 can modify the build.properties to add some respostories to maven1.
To access the repository from your project, add the following line to your project.properties or build.properties.
maven.repo.remote=http://download.java.net/maven/1/,http://www.ibiblio.org/maven/,http://mirrors.ibiblio.org/pub/mirrors/maven2/,http://localhost:8081/nexus/content/groups/public/
But it still can't work because of the directory name jars. so copy the jars to the respository is a good way to solve this problem.
after that , we type cmd:
cmd>maven -g
console output:
turbine:install-demo
turbine:java-compile
turbine:setup-torque
turbine:torque-copy-app-om
turbine:torque-copy-data-dtd
turbine:torque-copy-id-table-om
turbine:torque-copy-om
turbine:torque-copy-security-om
turbine:torque-datadtd
turbine:torque-datasql
turbine:torque-init
turbine:torque-insert-sql
turbine:torque-om-check
turbine:torque-security-datadtd
turbine:torque-security-datasql
turbine:torque-sql
turbine:war-webapp
turbine:webapp
uberjar:init
war:init
war:load
xdoc:dump-report-settings
xdoc:register-reports
we install the envirement successful.
Turbine buzzwords
Modules:
generic term for view parts and actions.Modules are organized in java package.
Tool:
Part of the tool box provided by Turbine
Action:
Part of the Controller, responsible for changing model state
Service:
Plugin-in part of the framework
The Turbine View is composed from
Page: Everything you see
Screen: Content of the page
Navigation: Top,Bottom,Menu
Layout: Where to put everything