星期六, 一月 15, 2005

如何用Linux下Sendmail把所有的近来的Email全部转发到另外一个Sendmail Server上呢?

这种模式叫做:smart Host模式.
在/etc/sendmail.cf里,找到DS关键词.
在后面加入你要转发到的Senmail server的名字

必须是名字,如果用IP可能不能成功.同sendmail版本有关.
1.在/etc/hosts加入一行
10.2.5.1 MailGW

2.在/etc/sendmail.cf里加入
# "Smart" relay host (may be null)
DSMailGW

就可以了.然后可以用.
mail -v 来跟踪一下发送过程


问题:为什么Linux启动的时候在Sendmail就停在那里,非常慢?

原因:可能的原因是修改了网卡IP.
你必须在/etc/hosts
把localhost加在IP不是127.0.0.1的那行

如下:
10.2.5.240 localhost SZSE199

星期二, 一月 11, 2005

JBOSS如何在Web加如虚拟目录

I made the following changes. Not all of them may be required. You can try one at a time.
1. jboss/server/default/conf/jboss-service.xml
Code:


<server>
<!-- Load all jars from the JBOSS_DIST/server/<config>/lib directory. This
can be restricted to specific jars by specifying them in the archives
attribute.
-->
<classpath codebase="lib" archives="*"/>

<!-- Set the virtual directory to be used by the application
Ref: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48300 -->
<attribute name="Config">
<Server>
<Service name="JBoss-Tomcat">
<Engine name="MainEngine" defaultHost="localhost">
<Host name="localhost">
<!-- Default context parameters -->
<DefaultContext cookies="true" crossContext="true" override="true"/>
<!-- Add a static context /Storage using directory /tmp/images -->
<Context docBase="C:/images" appBase="/cmpe275" path="/images"/>
</Host>
</Engine>
</Service>
</Server>
</attribute>
<!-- Virtual directory setting - END -->




one more place
Code:

<!-- ==================================================================== -->
<!-- Deployment Scanning -->
<!-- ==================================================================== -->
<!-- An mbean for hot deployment/undeployment of archives.
-->
<mbean code="org.jboss.deployment.scanner.URLDeploymentScanner" name="jboss.deployment:type=DeploymentScanner,flavor=URL">

<attribute name="URLs">
deploy/cmpe275, file:///C:/images/
</attribute>





2. jboss/server/default/deploy/jbossweb-tomcat50.sar/META-INF/jboss-service.xml
Code:

<server>
<mbean code="org.jboss.web.tomcat.tc5.Tomcat5" name="jboss.web:service=WebServer">
<!-- Get the flag indicating if the normal Java2 parent first class
loading model should be used over the servlet 2.3 web container first
model.
-->
<attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="LenientEjbLink">true</attribute>
<!-- A flag indicating if the JBoss Loader should be used. This loader
uses a unified class loader as the class loader rather than the tomcat
specific class loader.
-->

<!-- Set the virtual directory to be used by the application
Ref: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48300 -->
<attribute name="Config">
<Server>
<Service name="JBoss-Tomcat">
<Engine name="MainEngine" defaultHost="localhost">
<Host name="localhost">
<!-- Default context parameters -->
<DefaultContext cookies="true" crossContext="true" override="true"/>
<!-- Add a static context /Storage using directory /tmp/images -->
<Context docBase="C:/images" appBase="/cmpe275" path="/images"/>
</Host>
</Engine>
</Service>
</Server>
</attribute>
<!-- Virtual directory setting - END -->
<attribute name="UseJBossWebLoader">true</attribute>





3. jboss/server/default/deploy/jbossweb-tomcat50.sar/server.xml
Code:

<Host name="localhost" autoDeploy="false" deployOnStartup="false" deployXML="false">
<!-- Default context parameters -->

<DefaultContext cookies="true" crossContext="true" override="true"/>
<!-- Add a static context /Storage using directory /tmp/images -->
<Context docBase="C:/images" path="/cmpe275/images"/>





4. copy web.xml to
jboss/server/default/conf

This has worked for me. Hope this helps you.
There has to be easier way to solve this.

星期一, 一月 10, 2005

JbuilderX如何把任意类型的文件都打包到War或Jar里?

以Jbuildx为列
1.选择Tools/Prefefences/Browser..File Types


2,选则Module的老鼠右键选择properties..
入图:


3.还有一种最简洁的方法,假如Filters
加入Include型的Filter,Module的老鼠右键选择properties/Content/Filter,加入*.*类型的过滤.



星期五, 一月 07, 2005

JAVA JMX Programming Rapid ..

http://java.sun.com/developer/technicalArticles/J2SE/jmx.html
很好.

星期三, 一月 05, 2005

如何用XML-RPC来传递汉字参数.

我这里使用的是xml.apache.org的实现.
关键的一点:改变字符集合可以使用:org.apache.xmlrpc.XmlRpc.setEncoding("UTF-8");

这会影响对传递的数据的encode.
下面用一个简单的Client/Server/Handler来说明XML-RPC的实现:

Client的实现


package home.wxk;

import org.apache.xmlrpc.*;
import java.util.Vector;

public class RpcClient {
public RpcClient() {
}
public static void main(String[] args) throws Exception
{
//org.apache.xmlrpc.XmlRpc.setEncoding("UTF-8");
XmlRpcClient xmlrpc = new XmlRpcClient ("http://localhost:8080");
Vector params = new Vector ();
// params.addElement (new String(" 123".getBytes(),"UTF-8"));
params.addElement(new String("这时候汉字的未来xmlrpc123".getBytes(),"ISO-8859-1"));
// this method returns a string
String a="";
// try
// {
a=(String)xmlrpc.execute("hello.sayHello", params);
System.out.println("........"+a);
// }catch(Exception e)
// {
// System.out.println("异常:......."+a);
// }
}
}

服务器端的实现


package home.wxk;
import org.apache.xmlrpc.*;

public class RpcServer {

public static void initServer() {
// XmlRpc.setDriver("org.apache.xerces.parsers.SAXParser");
//start the server
System.out.println("Starting XML-RPC Server......");
org.apache.xmlrpc.XmlRpc.setEncoding("ISO-8859-1");
WebServer server = new WebServer(8080);
//register our handler class

server.addHandler("hello", new HelloHandler());
server.start();

System.out.println("Now accepting requests......");
}

public static void main(String[] args){
initServer();
}

}

Handler的实现


package home.wxk;

public class HelloHandler {
public String sayHello(String name) throws Exception
{
System.out.println("I am come ing..."+name+new String(name.getBytes("UTF-8")+new String(name.getBytes("ISO-8859-1")+new String(name.getBytes()))));
String echo="Hello 你好";
//String returnstr=new String(name.getBytes(),"ISO-8859-1");
return new String(name.getBytes(),"iso-8859-1");
}
}

Groovy Beta 8 的一个bug

Beta 8修改了GroovyClassLoader在反复运行大量小脚本的情况下会泄露内存的问题.但是又把GroovyShell.execute的默认行为给修改了.
execute在beta 7中,会首先判定才cache中是否有同名的scriptText,如果有,则运行Cached的脚本.但Beta 8却扔出了一个:duplicate class definition:

Guillaume Laforge
回复到:
"Hello William,

In CVS Head, there should be a fix that solved your problem.
When beta-9 is released, could you please check if this issue is still
present? Thanks in advance."

当然,我在Beta 9 released的时候,会检查这个问题是否纠正了.
我的Payroll系统Groovy这可是核心的技术了.

星期二, 十二月 21, 2004

如何编写Jboss startup Service

http://www.jboss.org/wiki/Wiki.jsp?page=ExampleHelloWorldService

编写在启动Jboss的时候就开始启动或服务的Bean.

星期五, 十二月 17, 2004

整合Java和C++

让你更加容易使用JNI

http://www.javaworld.com/javaworld/jw-05-2002/jw-0510-integrate.html
准备翻译下.

星期四, 十二月 16, 2004

XML-RPC active digram

准备今天开始配置compiere

http://www.compiere.org/

ASM Java ByteCode生成软件.

http://asm.objectweb.org/

主要用来生成java bytecode代码.是Groovy的核心.

需要多了解

星期三, 十二月 15, 2004

是XMLHTTPRequest还是XML-PRC?

这里有些学习的例子:
http://jsolait.net/examples/xmlrpc/
目前IE和FireFox 1.0都支持XMLHTTPRequest方法来时间简单的javascript
->java之间的交换.

XML-RPC可以在Javascript中调用?

Java平台下的压力测试工具

Web Stress test Tool
.今天TTS上的压力测试工具看起来好像不错.
GPL的软件,可以打包在自己的工具箱里.

http://www.jcrawler.com

星期五, 十二月 10, 2004

Maven 1.2 命令行语法一览表


__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2

可用的 [Plugins] / 目标
===========================
genapp ......................... 基于模板来产生应用程序
jdiff .......................... 生成两个版本之间API的不同的报告
junitdoclet .................... 生成单元测试

注意:[]之间的关键词表示maven 后跟随的目标名称,后续的名称表示子项目
比如:maven abbot editor.

[abbot] 运行修道士(abbot)测试
editor ......................... 调用修道士costello编辑器
editor-webstart ................ 调用修道士costello编辑器在一个WebStart应用里
test ........................... 运行修道士(abbot)测试
test-webstart .................. 运行测试在一个webstart引用上

[announcement] 生成发布声明
generate ....................... 生成发布声明
generate-all ................... 生成发布声明对所有的发布
mail ........................... 发送一个包含发布生命的Email

[ant] 生成ant build.xml文件
generate-build ................. 生成ant build.xml文件

[antlr] ( 没有缺省的目标 )
generate ....................... 根据antlr语法生成源代码
prepare-filesystem ............. 为altlr处理生成所有必须的字典

[appserver] ( 没有缺省的目标 )
clean .......................... 安全的删除一个已经安装的AppServer实例
cycle .......................... 强迫安装和启动一个appserver实例

init ........................... 初始化plugin必须的资源
install ........................ 安装一个appserver实例
reinstall ...................... 重安装一个appserver实例
restart ........................ 重新启动一个appserver实例
start .......................... 启动一个appserver实例
stop ........................... 停止一个appserver实例

[artifact] ( 没有缺省的目标 )

[ashkelon] ( 没有缺省的目标 )

[aspectj] Weave with AspectJ
compile ........................ Weave classes with AspectJ
test-compile ................... Weave tests with AspectJ

[aspectwerkz] ( 没有缺省的目标 )
attributec ..................... Compile AspectWerkz javadoc attributes (
xml-defined aspects)
compile ........................ Compile AspectWerkz java sources
weave .......................... Weave aspects (offline mode)

[castor] ( 没有缺省的目标 )
prepare-filesystem ............. 准备所有必须的字典为 castor 处理


[changelog] ( 没有缺省的目标 )

[changes] ( 没有缺省的目标 )
report ......................... 生成改变报告

[checkstyle] 执行 checkstyle 检查
report ......................... 执行 checkstyle 检查

[clean] 删除所有项目部件
clean .......................... 删除所有项目部件

[clover] 使用Clover生成测试覆盖率报告
html-report .................... Generate HTML test coverage reports with
Clover
off ............................ Deactivates Clover
on ............................. Activates Clover
report ......................... Generates the Clover reports
swing-report ................... Generate Swing test coverage reports with
Clover
test ........................... Compile project code with Clover and
executes the unit tests
test-single .................... Compile code with Clover and execute a
single unit test
xml-report ..................... Generate XML test coverage reports with
Clover

[console] 运行Maven控制台
help ........................... 打印帮助信息
listGoals ...................... 列出所有可用目标

[cruisecontrol] ( 没有缺省的目标 )
configure ...................... 更新Cruise 控制配置文件

run ............................ 运行Cruise控制

[dashboard] 生成仪表板报告
report ......................... 生成仪表板报告

[dist] 建立完整的配送.
build .......................... 建立完整的配送.
build-bin ...................... 建立二进制的配送.
build-setup .................... 配置建立陪送的目录
build-src ...................... 建立源代码配送.
deploy ......................... 发布一个配送
deploy-bin ..................... 发布一个二进制配送
deploy-bin-snapshot ............ 发布一个二进制配送
deploy-snapshot ................ 发布一个快照配送
deploy-src ..................... 发布一个源代码配送
deploy-src-snapshot ............ 发布一个源代码配送
prepare-bin-filesystem ......... 建立二进制的配送文件系统.
prepare-src-filesystem ......... 建立源代码的配送

[docbook] ( 没有缺省的目标 )
transform ...................... Transform any docbook-simple source into
xdocs for later use

[ear] 建立一个ear文件
deploy ......................... 发布ear 到远程知识库
deploy-snapshot ................ 发布快照版本的ear到远程知识库
ear ............................ 建立一个ear文件
generate-ear-descriptor ........ 生成 ear描述
init ........................... 初始化ear需要的文件系统和其他资源
install ........................ 在本地知识库里安装ear
install-snapshot ............... 安装快照版本的ear在本地知识库里

[eclipse] 生成Eclipse项目文件
add-maven-repo ................. 确定classpath变量MAVEN_REPO
clean .......................... 清除eclipse生成的文件
external-tools ................. 为每种目标生成一个Eclipse外部工具
external-tools-21 .............. 为每种目标生成一个Eclipse 2.1 外部工具
generate-classpath ............. 生成Eclipse .classpath 文件
generate-project ............... 生成Eclipse .project文件

[ejb] 建立一个ejb文件
deploy ......................... 发布ejb到远程知识库
deploy-client .................. 发布ejb client到远程知识库
deploy-snapshot ................ 发布快照版本的ejb到远程知识库
ejb ............................ 建立一个ejb文件
ejb-client ..................... 建立一个client ejb文件
init ........................... 为建立ejb初始文件系统和其他资源
install ........................ 在本地知识库安装ejb
install-client ................. 在本地知识库安装ejb client
install-snapshot ............... 在本地知识库安装快照版本的ejb

[faq] 从FAQ XML生成FAQ xdoc文件

[fo] This simply pre-requisites the fo:fo goal.
fo ............................. Generates an fo xml document from the ${
maven.pdf.navigationFile} file supplied as
part of the documentation.

[gump] Generate Gump descriptor from Maven
descriptor
generate-descriptor ............ Generate Gump descriptor from Maven
descriptor

[hibernate] ( 没有缺省的目标 )
aggregate-mappings ............. Aggregate multiple .hbm.xml files into one
file
schema-export .................. Export Hibernate schema

[html2xdoc] Generates XDoc documentation from normal
HTML files
transform ...................... Performs the html to xdoc transformation

[idea] Generate IDEA project files
idea ........................... Generate IDEA .ipr, .iml and .iws project
files
module ......................... Generate IDEA .iml project files
project ........................ Generate IDEA .ipr project files
workspace ...................... Generate IDEA .iws project files

[j2ee] Check that a war file is valid
validate-war ................... Check that a war file is valid

[jalopy] Format all sources with code convention
conformance
format ......................... Format all sources with code convention
conformance
taskdef ........................ Define the jalopy task to Ant and Jelly

[jar] Create the deliverable jar file.
deploy ......................... Deploy a jar to the remote repository
deploy-snapshot ................ Deploy a snapshot jar to the remote
repository
install ........................ Install the jar in the local repository
install-snapshot ............... Install a snapshot jar in the local
repository
jar ............................ Create the deliverable jar file.
snapshot ....................... Create a snapshot jar, ie '
id-YYYYMMDD.hhmmss.jar'

[java] ( 没有缺省的目标 )
compile ........................ Compile the project
jar ............................ Create the deliverable jar file.
jar-resources .................. Copy any resources that must be present in
the deployed JAR file
prepare-filesystem ............. Create the directory structure needed to
compile

[javacc] ( 没有缺省的目标 )
javacc-generate ................ Generate source from javacc grammar

[javadoc] ( 没有缺省的目标 )
deploy ......................... Deploys the jar containing javadoc to the
remote repository
deploy-snapshot ................ Deploys the snapshot version of jar
containing javadoc to remote repository
install ........................ Install the jar containing javadoc in the
local repository
install-snapshot ............... Install the snapshot version of the jar
containing javadoc in the local repository

[jboss] 生成特定的JBoss server配置文件
configure ...................... 建立特定的JBoss Server配置
deploy-ear ..................... 发布${maven.final.name}.ear
deploy-ejb ..................... 发布${maven.final.name}.jar
deploy-exploded-warfile ........ 调用'war:webapp' 目标并且发布结果
说明'maven.war.webapp.dir' 必须用.war结尾
deploy-warfile ................. 调用'war' 目标并且发布结果
dist ........................... 生成zipped JBoss配置
install ........................ 安装zip到本地知识库
package ........................ 建立制定JBoss Server的配置
start .......................... 启动JBoss 使用我们制定的Server配置
stop ........................... 停止JBoss
undeploy-ear ................... 卸载 ${maven.final.name}.ear
undeploy-ejb ................... 卸载${maven.final.name}.jar
undeploy-exploded-warfile ...... 卸载'war:webapp' 必须用.war文件结尾

undeploy-warfile ............... 卸载the result of the 'war' goal

[jbuilder] 生成JBuilder项目文件
generate-library ............... 生成JBuilder[id_project].library文件
generate-project ............... 生成JBuilder [id_project].jpx文件

[jcoverage] Generate HTML test coverage reports with
JCoverage
html-report .................... Generate HTML test coverage reports with
JCoverage
merge .......................... Merge two or more instrumentation files
into one
on ............................. perform the coverage analysis

[jdee] Generate JDEE project file
generate-project ............... Generate project file in basedir

[jdeveloper] Generate JDeveloper project files
generate-project ............... Generate jdeveloper .jpr
scanSources .................... Scans the source in order to integrate them
into JDeveloper files

[jellydoc] Generates the tag documentation
doclet ......................... A doclet which outputs all the Jelly tag
related metadata as XML
xml-doclet ..................... Creates an XML representation of the doclet
information

[jetty] Run Jetty
config ......................... Generate a Jetty configuration file
run ............................ Run Jetty
run-war ........................ Run Jetty on the current war project

[jnlp] Generate JNLP file and sign all jars
generate-jnlp .................. Generate the .jnlp file and sign all jars
generate-keystore .............. Generate a keystore file
init ........................... Initialize jnlp plugin

[junit-report] ( 没有缺省的目标 )
report ......................... Generate a report from the test results

[latex] ( 没有缺省的目标 )
generate ....................... Generate documentation from latex source
prepare-filesystem ............. Prepare the filesystem for latex processing

[latka] Run the project's latka tests
jmeter-convert ................. Convert a jmeter jmx file to a latka suite
single ......................... Execute a single test defined using the '
testcase' variable
test ........................... Run the project's latka tests

[license] Generate an XML file from the license file
transfer ....................... Generate a xml file from your license file

[maven-ashkelon-plugin] ( 没有缺省的目标 )

[maven-changelog-plugin] ( 没有缺省的目标 )
report ......................... Generate a changelog report

[maven-changes-plugin] ( 没有缺省的目标 )

[maven-checkstyle-plugin] ( 没有缺省的目标 )

[maven-clover-plugin] ( 没有缺省的目标 )

[maven-cruisecontrol-plugin] ( 没有缺省的目标 )

[maven-dashboard-plugin] ( 没有缺省的目标 )

[maven-developer-activity-plugin] ( 没有缺省的目标 )
report ......................... Generate developer and file activity reports

[maven-faq-plugin] ( 没有缺省的目标 )
report ......................... Generate FAQs

[maven-file-activity-plugin] ( 没有缺省的目标 )
report ......................... Generate developer and file activity reports

[maven-javadoc-plugin] ( 没有缺省的目标 )
report ......................... Generate API documentation

[maven-jcoverage-plugin] ( 没有缺省的目标 )
deregister ..................... Deregister the jcoverage plugin
register ....................... Register the maven-jcoverage-plugin.
report ......................... Run the default report (html).

[maven-jdepend-plugin] ( 没有缺省的目标 )
report ......................... Generate a dependency report with JDepend

[maven-jdiff-plugin] ( 没有缺省的目标 )
report ......................... Generate an api difference report between
versions

[maven-jellydoc-plugin] ( 没有缺省的目标 )
report ......................... Generates the tag documentation

[maven-jira-plugin] ( 没有缺省的目标 )
report ......................... Generate report with all entries defined in
Jira

[maven-junit-report-plugin] ( 没有缺省的目标 )

[maven-jxr-plugin] ( 没有缺省的目标 )
report ......................... Generate HTML cross reference sources

[maven-license-plugin] ( 没有缺省的目标 )
report ......................... Generate an XML file from the license.txt

[maven-linkcheck-plugin] ( 没有缺省的目标 )
clearcache ..................... Removes the cache file
report-real .................... Generate link check results and then
transform to HTML

[maven-multichanges-plugin] ( 没有缺省的目标 )

[maven-multiproject-plugin] ( 没有缺省的目标 )

[maven-pmd-plugin] ( 没有缺省的目标 )

[maven-simian-plugin] Generate Simian (Code Similarity Analyzer)
report.

[maven-tasklist-plugin] ( 没有缺省的目标 )
report ......................... Generate a list of tasks from @todo tags in
your code

[multichanges] ( 没有缺省的目标 )

[multiproject] Run the site goal of all subprojects and
generate overview page
artifact ....................... Builds all artifacts for all subproject
clean .......................... Clean all subprojects
dependency-convergence-report .. Generate report which shows how consistent
are the versions of artitfacts between
projects
deploy ......................... Run 'artifact':deploy for all subprojects
deploy-snapshot ................ Run 'artifact':deploy-snapshot for all
subprojects
goal ........................... Run a given goal on all projects
install ........................ Run 'artifact':install for all subprojects
install-snapshot ............... Run 'artifact':install-snapshot for all
subprojects
site ........................... Run the site goal of all subprojects and
generate overview page

[native] Native compiler
compile ........................ Compile the native compiler
install ........................ Install the lib in the local repository
jniheader ...................... make jniheaders for classes

[nsis] Generate NSIS Installer .exe
generate-project ............... Generate NSIS project.nsh file
generate-setup ................. Generate NSIS .nsi file
installer ...................... Generate NSIS .exe file

[pdf] This is the default goal of the plugin and
simply pre-requisites the pdf:pdf goal.
pdf ............................ Generates a PDF document containing all
project documentation. The PDF is generated
from the .fo file generated in the fo:fo
goal.
prepare ........................ Stages all files needed to generate the PDF

[plugin] Build a plugin jar
download ....................... download and install a plugin from a remote
repo
download-artifact .............. download a plugin from a remote repo
generate-docs .................. Generate navigation, goals and properties
docs
generate-goals ................. Generate goals.xml for the plugin
generate-navigation ............ Generate navigation.xml for the plugin
generate-properties ............ Generate properties.xml for the plugin
install ........................ Install the plugin jar, prepare Maven to
expand it locally and clear caches
install-now .................... Build a plugin and load it into the
currently running instance of Maven.
plugin ......................... Build a plugin jar
uninstall ...................... Uninstall all versions of the plugin
uninstall-now .................. Uninstall all versions of the plugin,
including those in the currently running
instance of Maven

[pmd] Static Code Analyzer
cpd-report ..................... Generate duplicate source code report with
CPD
report ......................... Generate source code report with PMD

[pom] Validate the Maven XML project descriptor
contentvalidate ................ Validate the content of the Maven POM
deploy ......................... Deploy POM to the central repository.
deploy-snapshot ................ Deploys the snapshot version of the POM to
remote repository
install ........................ Install POM in the local repository.
install-snapshot ............... Install the snapshot version of the POM in
the local repository
validate ....................... Validate the Maven XML project descriptor

[rar] Build a rar file
deploy ......................... Deploys the rar to the remote repository
deploy-snapshot ................ Deploys the snapshot version of the rar to
remote repository
init ........................... Initialise filesystem and other resources
for a rar
install ........................ Install the rar in the local repository
install-snapshot ............... Install the snapshot version of the rar in
the local repository
load ........................... no-op goal
rar ............................ Build a rar file

[release] ( 没有缺省的目标 )

[repository] ( 没有缺省的目标 )
audit-copy-license ............. copy the license for the specified groupId
to the repository
audit-copy-licenses ............ copy all licenses in the audit file to the
repository
audit-create-directory ......... create the directory, specified by
directoryName, for all groups in the audit
file
audit-create-licenses .......... create the license directories, for all
groups in the audit file, in the repository
audit-generate-pom ............. generate a pom for the groupId provided,
based on the audit file
audit-generate-poms ............ generate a pom for all the groupId's in the
audit file
audit-rename-licenses .......... rename/link all licenses from their
original name to ${groupId}.license
copy-artifact .................. copy an artifact, specified by groupId,
artifact and type, to the repository
copy-jar ....................... copy a jar, specified by groupId and
artifact, to the repository
copy-snapshot-jar .............. copy a snapshot jar, specified by groupId
and artifact, to the repository
create-project ................. create a project, specified by groupId, in
the repository
delete-project ................. delete a project, specified by groupId, in
the repository

[scm] ( 没有缺省的目标 )
bootstrap-project .............. Bootstrap a project from SCM
checkout-project ............... Checkout a project
perform-release ................ Perform a release from SCM
prepare-release ................ Prepare for a release in SCM
update-project ................. Update a project from SCM

[shell] Generate Zsh files
zsh ............................ Generate Zsh files

[site] Generate the web site
deploy ......................... deploy the generated site docs
ear ............................ Create an EAR File from the generated site
fsdeploy ....................... Deploy the generated site by copying to the
site directory
ftpdeploy ...................... Deploy the generated site docs using ftp
sshdeploy ...................... Deploy the generated site docs using ssh
war ............................ Create a WAR File from the generated site

[struts] Ensure a war file containing a Struts
application is valid
validate-war ................... Ensure a war file containing a Struts
application is valid

[test] Test the application
compile ........................ Compile the TestCases and TestSuites
match .......................... Execute all the tests matching the given '
testmatch' variable
match-test ..................... [deprecated] please use the test:match goal
instead
prepare-filesystem ............. Create the needed directory structure
single ......................... Execute a single test defined using the '
testcase' variable
single-test .................... [deprecated] please use the test:single
goal instead
test ........................... Test the application
test-resources ................. Copy any resources that must be present for
run tests
ui ............................. Starts the Swing TestRunner front end

[tjdo] Enhance classes for use with Triactive JDO
drop-tables .................... Drops the tables managed by Triactive JDO.
enhance ........................ Provides the enhancement of classes to use
TJDO for persistence

[uberjar] Build a uberjar file
classworlds-conf ............... Generates a classworlds conf
deploy ......................... Deploys the uberjar to the remote repository
deploy-snapshot ................ Deploys the snapshot version of the
uberjar to remote repository
install ........................ Install the uberjar in the local repository
install-snapshot ............... Install the snapshot version of the uberjar
in the local repository
uberjar ........................ Build an uberjar

[war] Build a war file
clean .......................... Remove all artifacts created by war plugin
deploy ......................... Deploys the war to the remote repository
deploy-snapshot ................ Deploys the snapshot version of the war to
remote repository
inplace ........................ Deploy a webapp into maven.war.src - in
particular setting up WEB-INF/lib and
WEB-INF/classes
install ........................ Install the war in the local repository
install-snapshot ............... Install the snapshot version of the war in
the local repository
war ............................ Build a war file
war-resources .................. Copy webapp resources to target directory
webapp ......................... Build a webapp directory

[webserver] ( 没有缺省的目标 )
clean .......................... Safely delete an installed webserver
instance
cycle .......................... Forced install and start of a webserver
instance
init ........................... Initialize resources needed for the plugin
install ........................ Install a webserver instance
reinstall ...................... Reinstall a webserver instance
restart ........................ Restart a webserver instance
start .......................... Start a webserver instance
stop ........................... Stop a webserver instance

[wizard] ( 没有缺省的目标 )
ui ............................. Run the Maven Swing Wizard

[xdoc] Generate html project documentation xdoc
sources
copy-resources ................. copy static resources for use in xdocs
generated html
copy-user-resources ............ Copy user provided resources to docs
destination
generate-from-pom .............. Generates xdocs for site based on project
descriptor
init ........................... Generates the directory structure required
for xdocs
jelly-init ..................... Set up jelly xdoc requirements
jelly-transform ................ transform xdocs using jelly/jsl rather than
dvsl
performJSL ..................... Allows the LinkCheck plugin to xdoc a
single directory
transform ...................... Generate html project documentation xdoc
sources
validate ....................... Validate xdocs match the schema

今天开始学习Maven(专家,内行) Project Management Tools.

我现在挺厌烦用OpenSource的管理方面的工具的.包括CVS/ant等等,非常难用.基本上都不是 Ready for out Box.开箱即用的.
都要看大量的文档来牢记标记的语法.

可Groovy组里大家都在热烈的讨论Maven,this is too irritating.
我只好下载了maven 1.2 开始试用.免得被"边缘化"了.:).


简单翻译并记录中间看的资料吧.

1.首先下载.
http://maven.apache.org/
2.然后看帮助:
http://maven.apache.org/start/index.html
3.然后看如何使用:
http://maven.apache.org/start/use.html
在windowsXP下运行.
maven jar 和Maven site:generate
竟然连接到网络上下载了一堆的jar包,让我印象极坏.:(.
4.然后记录如何使用Maven来同Jbuilder和Jboss如何协作工作的经验了.

Very Large Scale Integration 超大规模集成Java实现

今天Sun公司网站上给出了一个用Java编写的电子CAD设计工具.
下载了看看了.

UI方面非常丑陋.不过竟然已经到了8.0了.看来用的人很多吧.
jar包下载的地址:http://ftp.gnu.org/pub/gnu/electric/

几天java.sun.co

星期三, 十二月 08, 2004

用JConsole来监控JVM

http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html