turbine layout control(一)envirement setup

本文介绍如何使用Maven 1.x搭建Jakarta Turbine应用环境,并解决过程中遇到的依赖下载错误问题。详细步骤包括配置Maven环境变量、安装M.E.T.A.插件及手动部署依赖文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值