??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲无线码在线一区观看,亚洲精品国产首次亮相,亚洲一区无码精品色http://www.tkk7.com/tufanshu/category/9675.html没有风雨w的q, 没有坎坷不必走…? zh-cnWed, 28 Feb 2007 23:36:51 GMTWed, 28 Feb 2007 23:36:51 GMT60appfuse的安装配|篇http://www.tkk7.com/tufanshu/archive/2006/04/07/39904.html雪地孤`雪地孤`Fri, 07 Apr 2006 11:55:00 GMThttp://www.tkk7.com/tufanshu/archive/2006/04/07/39904.htmlhttp://www.tkk7.com/tufanshu/comments/39904.htmlhttp://www.tkk7.com/tufanshu/archive/2006/04/07/39904.html#Feedback0http://www.tkk7.com/tufanshu/comments/commentRss/39904.htmlhttp://www.tkk7.com/tufanshu/services/trackbacks/39904.html 在网上找了很久,看了很多的文,l于appfuse成功的编译,发布了:q样感谢q大|友的无U奉献了Q好了,闲话说了,具体的操作如下:
Appfuse1.9,JDK1.5,ANT1.6.2,Mysql5.0,Tomcat5.5

一.环境讄Q?br />以下环境变量均按本机的安装\径设|即可?br />ANT_HOME,
JAVA_HOME,
CATALINA_HOME,
MYSQL_HOME
Path中加?br />%JAVA_HOME%bin;%ANT_HOME%bin;%CATALINA_HOME%bin;%MYSQL_HOME%bin;
?在eclipse中用ant~译Q发布,试appfuse
1.Create New Java Project in Eclipse
Open Eclipse (either with an existing or a new workspace) and to go File ?New ?Project. Then select "Java Project" and hit the Next button. In the Project Name field, enter the name of your project (i.e. appfuse) and the directory that your project lives (i.e. c:\source\appfuse) in the box below. If you're prompted to switch the Java Perspective, choose Yes.
If you try to build the project at this point, you'll likely get numerous errors. Most of them involve the fact that the UserForm class can not be found. This is because all of the ActionForms in AppFuse (if you're using the Struts version) are generated from POJOs with XDoclet.

All of the tasks for XDoclet are configured in the Ant build.xml file so the easiest thing to do is to run "ant gen-forms" to generate the ActionForms. If you have Ant 1.6.2+ installed and in your path, you can do this from the command line. The next step shows you how configure Eclipse to run your AppFuse build.xml.

2.Configuring Ant in Eclipse

The easiest way to configure Eclipse for AppFuse is to install Ant on your hard drive (i.e. c:\Tools\apache-ant-1.6.2) and then point Eclipse's ANT_HOME to this directory. To do this, go to Window ?Preferences ?Ant ?Runtime. Then click the "Ant Home" button and select the installation folder on your hard drive.

If you'd rather use Eclipse's built-in Ant, you'll need to add junit.jar to its classpath. To do this, go to Window ?Preferences ?Ant ?Runtime. Then click the "Add JARs" button and select junit.jar from appfuse/lib/junit3.8.1/lib/junit.jar. Click OK until you arrive back at the workbench view.

Next, add the catalina-ant.jar (from $CATALINA_HOME/server/lib) to the ant classpath. Then in the property tab, add tomcatTasks.properties (in lib/ant-contrib) file as a global properties file.

Below is a screenshot of what your Ant Runtime classpath should look like after the above modifications:
ant-runtime.png

3.Add build.xml to Ant View
Now we need to add the build.xml to Eclipse's Ant View. To do this, go to Window ?Show View ?Ant. Then click on the first icon in this view (screenshot below) to add AppFuse's build file.
ant-view.png

4.Run Ant
After adding the build.xml, you should be able to expand it in the Ant View and execute any of the targets. I usually do "test-all" to verify all the tests pass in my initial project. For a list of targets I use most often, see AppFuse Ant Targets.
Now if you run the "compile" target and then refresh the project (right-click on project ?Refresh) you shouldn't see any errors in the "Problems" pane. You should now be able to compile and create classes as you normally would. Sometimes when my imports aren't resolving correctly in Eclipse, I do have to run Project ?Clean in Eclipse.

NOTE: If you're using the internal version of Ant, you may get an error message like the one below:
BUILD FAILED: C:\source\appfuse\build.xml:802: The following error occurred while executing this line:
C:\source\appfuse\build.xml:780: The following error occurred while executing this line:
java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
This is because there are tasks that require Xerces to be in your Ant classpath [reference]. I added xercesImpl.jar and xml-apis.jar (from my self-installed version of Ant) to Eclipse's Ant classpath to solve this.
5.Run JUnit Tests in Eclipse
It's also possible to run your JUnit tests in Eclipse. But before running them, you need to run the "war" target. After this target completes, refresh your project.
After you have successfully done so, in Eclipse open a test you'd like to run (i.e. UserDaoTest) and go to Run ?Debug As ?JUnit Test. Note that you may have to run the "db-load" target before you run your tests every so often. I did have the following method in the Base*TestCase class for each layer, but this caused DBUnit to reload the database before every test in a Test class. Removing it reduces the execution time of "test-all" by more than 30 seconds.

 

    protected void setUp() throws Exception {
        DataSource ds = (DataSource) ctx.getBean("dataSource");
        IDatabaseConnection conn = new DatabaseConnection(ds.getConnection());
        IDataSet dataSet =
            new XmlDataSet(new FileInputStream("metadata/sql/sample-data.xml"));
        // clear table and insert only sample data
        DatabaseOperation.CLEAN_INSERT.execute(conn, dataSet);
        conn.close();
    } 


If the instructions above don't work for running JUnit tests in Eclipse, I suggest just using the command line - i.e. ant test-dao -Dtestcase=UserDAO. Running tests from the command line always works. ;-)

好了 Q在eclipse中基本按以上操作可以成功了Q等有时_我来译一下,虽然我的e文比较烂Q但是还是乐于让大家校正?br />Q)原文的地址Q?a >http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseEclipse
问题描述
1.刚开始的时候,我们的mysql的用户名和密码可能和appfuse的默认的用户和密码会不一LQ这个可以到properties.xml文g中修改ؓ我们安装mysql是设|的用户名和密码Q我的修改如下:
 <!-- Defaults for database.properties -->
    <property name="database.jar" location="${mysql.jar}"/>
    <property name="database.type" value="mysql"/>
    <property name="database.name" value="appfuse"/>
    <property name="database.host" value="localhost"/>
    <property name="database.username" value="root"/>
    <property name="database.password" value="780121"/>
   
    <!-- database URL for creating other dbs - used in db-create target -->
    <property name="database.admin.url" value="jdbc:${database.type}://${database.host}/mysql"/>
    <property name="database.admin.username" value="root"/>
    <property name="database.admin.password" value="780121"/>
    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
    <property name="database.driver_class" value="com.mysql.jdbc.Driver"/>
    <property name="database.url"
        value="jdbc:${database.type}://${database.host}/${database.name}?useUnicode=true&amp;amp;characterEncoding=utf-8"/>
    <property name="database.show_sql" value="true"/>

我是修改了root用户的密码,当然你也可以建立test用户q给初始密码Q)
2.q接数据库的问题解决后,另外一个问题有出来了,建立user_role表的时候出问题了:org.dbunit.dataset.NoSuchTableException: user_role
q个问题的解x式如下:
setup-tomcat deploy
ant setup -Ddatabase.username=foo -Ddatabase.password=bar
q个主要是先执行以下build.xml中的setup-tomcate deploy指o可以了Q)
原蝲地址Q?a >http://b0r0j0.blogbus.com/logs/2005/12/1725103.html



雪地孤` 2006-04-07 19:55 发表评论
]]>
վ֩ģ壺 ŷպþAV| ɫһ| 91۲޾Ʒ| AV˾Ʒһ| ȫ߲ëƬ| պƷѹۿ| 츾ҹƵ| Ƶ߾Ʒ| ޳˵Ӱվ| һëƬaŮ˴̼Ƶ| aƵƷѹۿ| ձĻһ| Ʒާѡ벥 | h⶯߹ۿ| 鶹avŮһ| һ| ɫƬѹۿ| һ˿www߹ۿ| ҹƷþþþþ| ҹAëƬƵ| ޴ɫ߹ۿ| ëƬѹۿַ| avһ߲| Ƶ77777| ɫ߹ۿ| ߿Ƭ˳Ӿ| ˳ɵӰ| 91ѹۿ| 91߾Ʒһ| Ʒһ | ҹ޾Ʒ| ĻѾþ99 | ޳avƬ| ޹Ʒþ| ƷƵѹۿ| avҹƷһ| Ʒһ | Ʒþһ| һӰԺ | ˳ŷ| һػƸѴƬ|