|
friendforsale_sample_manual
friendforsale sample build instruction(JAVA Version)Prequisites before building friendforsale sampleIn order to build sample, you must have the following:
o See: http://java.sun.com/ for installation instructions. o Instructions for downloading and installing Subversion can be found here: http://subversion.tigris.org/ o Instructions for downloading and installing Maven can be found here: http://maven.apache.org/download.html Getting the codeCreate a subdirectory and checkout the sample code from its Subversion repository
Or download via this url http://easy-opensocial-apps.googlecode.com/files/friendforsale-java-1.0.zip and extract Building and running the code:To build a Web Archive(WAR) file:
To run friendforsale sample on jetty: The XML spec you can access via http://localhost:<port>/friendsale.xml You can add this url to SNS which support opensocial or shindig run locally. More configuration:
Database: The database configuration file at: ~\easy-opensocial-apps\javascriptAPI\server\java\friendforsale\src\main\resources\META-INF\persistence.xml The sample use "default" persistence-unit which use a hsqldb database, You can change the setting to your own database Server Setting: Use ~easy-opensocial-apps\javascriptAPI\client\friendforsale\i18n\ALL_ALL.xml config your client and server by edit the following line:<msg name="frontendURL">http://localhost</msg> <msg name="backendURL">http://localhost</msg> for example: if your want change the server to python or php backend,you can change the backendURL. friendforsale使用指南安装friendforsale应用示例的条件:你必须有以下东西:
o 参考: http://java.sun.com/ o 如何安装 Subversion: http://subversion.tigris.org/ o Maven安装说明: http://maven.apache.org/download.html 获得代码:建立一个文件夹然后checkout代码
或者从下面的url下载 http://easy-opensocial-apps.googlecode.com/files/friendforsale-java-1.0.zip 然后解压 编译并运行代码:打包成WAR:
在jetty上运行friendforsale示例: XML文件在下面地址应该可以访问到 http://localhost:<port>/friendsale.xml 你可以把这个url添加到支持opensocial的SNS网站上,或者自己本地的shindig服务器上 更多配置:
数据库: 数据库的配置文件在: ~\easy-opensocial-apps\javascriptAPI\server\java\friendforsale\src\main\resources\META-INF\persistence.xml 示例中使用的"default"持久化单元,使用的是hsqldb数据库 你可以修改配置用你自己的数据库 服务器设置: 在下面的文件中配置你前端xml和后端数据服务的地址 ~easy-opensocial-apps\javascriptAPI\client\friendforsale\i18n\ALL_ALL.xml<msg name="frontendURL">http://localhost</msg> <msg name="backendURL">http://localhost</msg> 比如你可以用python的后端数据服务,只要修改backendURL的值即可 |
► Sign in to add a comment
在打包的时候得到如下错误,敬请指点。谢谢!
Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.
D:\easy-opensocial-apps\easy-opensocial-apps\javascriptAPI\server\java\friendfor sale>mvn package -e + Error stacktraces are turned on. INFO? Scanning for projects... INFO? ------------------------------------------------------------------------ INFO? Building friendforsale INFO? task-segment: package? INFO? ------------------------------------------------------------------------ INFO? [resources:resources] WARNING? Using platform encoding (GB18030 actually) to copy filtered resources,
INFO? Copying 6 resources to ../friendforsale-1.0-SNAPSHOT/common INFO? Copying 18 resources to ../friendforsale-1.0-SNAPSHOT/ INFO? Copying 5 resources to / INFO? ------------------------------------------------------------------------ ERROR? BUILD ERROR INFO? ------------------------------------------------------------------------ INFO? \\config\catalog.xml (找不到网络路径。)INFO? ------------------------------------------------------------------------ INFO? Trace org.apache.maven.lifecycle.LifecycleExecutionException?: \\config\catalog.xml (找 不到网络路径。)
ultLifecycleExecutor.java:703) fecycle(DefaultLifecycleExecutor?.java:540) ltLifecycleExecutor.java:519) dleFailures(DefaultLifecycleExecutor?.java:371) ts(DefaultLifecycleExecutor?.java:332) fecycleExecutor.java:181) java:39) sorImpl.java:25)Caused by: org.apache.maven.plugin.MojoExecutionException?: \\config\catalog.xml (找不到网络路径。)
.java:166) nManager.java:483) ultLifecycleExecutor.java:678) Caused by: org.apache.maven.shared.filtering.MavenFilteringException?: \\config\c atalog.xml (找不到网络路径。) aultMavenFileFilter.java:96) erResources(DefaultMavenResourcesFiltering?.java:293) .java:162) Caused by: java.io.FileNotFoundException?: \\config\catalog.xml (找不到网络路径。 ) 58) aultMavenFileFilter.java:91) INFO? ------------------------------------------------------------------------ INFO? Total time: 8 seconds INFO? Finished at: Thu May 21 14:08:49 CST 2009 INFO? Final Memory: 7M/13M INFO? ------------------------------------------------------------------------ D:\easy-opensocial-apps\easy-opensocial-apps\javascriptAPI\server\java\friendfor sale>我也遇到同样的问题 请各位指教
INFO? \\META-INF\persistence.xml (找不到网络路径。)
编译碰到不少问题
opensocial-common那个工程直接用mvn compile通过不了,我后来用ant编译放到mvn的repository里面,再编译friendforsale通过 friendforsale的pom.xml需要改一个地方
中的<targetPath>/</targetPath>改为<targetPath>.</targetPath> 不然复制时候出错。不知为啥。、
编译后,加载到tomcat或者运行jetty,添加到socialsite里面,friendsale只能显示
loading.....
根本用不了