Thursday, March 27, 2008

http-bind ที่ openfire

ปัญหา http-bin กับ server หลายๆตัวต้องทำการ config ที่ Apache จึงจะใช้ได้
http-bin ของ openfire ก็เหมือนกัน มันต้อง config ทั้งบน Apache และตัว Openfire เองด้วย
ขั้นตอนยังไม่มีโอกาสทำเอง เต้ทำให้บนเครื่องจริง และทอมก็ทำให้บนเครื่อง beta ปัจจุบันนี้

แต่เอาหน้าที่บอกวิธีมาเก็บไว้ ให้ดูแต่ส่วนที่ config ตัว openfire เค้าร config jwchat ไม่ต้องไปดูมันก็ได้ เราทำแล้วใน xmpp4js

กระทู้ http://www.igniterealtime.org/community/message/156841

ตอบโดย ethan

Sep 25, 2007 10:40 PM in response to: ethan Re: My openfire http-binding with jwchat sucks
It is ok now. Thanks Amish Mehta from
https://sourceforge.net/forum/forum.php?thread_id=1802250&forum_id=317560

jwchat can now be used through both apache(http://localhost) and openfire jetty (http://localhost:8080/jwchat/index.html)

Following is the relative complete configuration. And my software version is jwchat 1.0 beta3 + openfire 3.3.3

1 config the httpd.conf file of apache

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so


ServerName localhost
DocumentRoot /var/www/jwchat

Options +MultiViews

AddDefaultCharset UTF-8
ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/http://127.0.0.1:8080/http-bind/


2Open config.js and comment all BACKENDS except 'Native Binding'

3 Edit jsjac.js and setvar JSJACHBC_USE_BOSH_VER = false; /* true; */

4Edit jwchat.html and just before line:con.connect(oArg);
Add this line:oArg.authtype = 'nonsasl';

5Log into OpenFire as an administrator and add two server properties:
xmpp.httpbind.client.requests.polling = 0xmpp.httpbind.client.requests.wait = 10

6 restart openfire and apache,then login through http://localhost
it is ok

===================
ถ้ายังไม่ได้ดูที่ link http://www.linuxquestions.org/questions/linux-server-73/authentication-error-openfirejwchat-http-binding-612818/

...and another issue bites the dust of the 'solved' stack on my (virtual) desk!
I got the thing running, and as usual feel compelled to explain how I did it, to save the hair on the heads of our future sys admins...
In this case I will list the points one has to cover in order to achieve the working Openfire 3.4.2 running with JWChat 1.0beta3 setup.
Get Openfire up and running, meaning that there are accounts for clients, you can log in with standalone clients, etc.

Extract the JWChat zip/tar.gz to a directory in your webroot (usually /var/www/).
Enable HTTP-binding, and the BOSH 1.6 support in the UI of Openfire.
Make sure that you can access the JWChat folder via a regular URL to your webserver.

Configure your httpd.conf (or */sites-enabled/000-default) to proxy '/http-bind/' to 'http://127.0.0.1:8080/http-bind/' (this is or course the default port for unsecure HTTP-binding. I advise setting up secure access later, when this is working)

Now, check that this proxy re-direct is working (proxy module will need to be loaded, and if you use apache2.x you may wanna check the readme's on http://www.igniterealtime.org/community/) by visiting 'http://myweb.server/http-bind/'. You should be redirected to 'http://127.0.0.1:8080/http-bind', meaning your browser will be sent to 'http://myweb.server:8080/http-bind/' and you should receive an error from Jetty.
When this is working, and you are an English speaking person (I ain't tested no other languages yet, and browser charsets could well play a role here) delete all the 'funky language files' from the jwchat dir in your webroot, so that only .html.html files and the .js scripts remain. (Yes, leave the images alone, as well.)

Next add
xmpp.httpbind.client.requests.polling 0
xmpp.httpbind.client.requests.wait 10

to your Openfire config, and you should be almost set to go.
In my case I had to edit the jsjac.js library to get the thing working, due to a bug/limitation. If you have a newer release I recommend you try your setup out, without executing the next step:
Edit jsjac.js and replace the instances of --> ",charset=utf-8' <-- with --> ",' <--. Just to explain that in a clearer way, delete the text charset=utf-8.
OK, Mr Chatmaster, you should have a working install now. Don't forget to restart apache, and maybe openfire to be on the safe side, flush the cache of your browser, and you're good to go.
regards
PelliX

PS: there is a typo that reads "instrunctions" instead of "instructions" when you perform a search in 'Open Chatrooms'.Last edited by PelliX : 01-12-2008 at 10:03 AM.

===================
Hello Poil,I was looking into your issue, and there are a couple of little pointers I can give you, but it would be nice if you could maybe post the (relevant) logs from your Openfire server. Anyhow, you may wanna add an extra line to your 'httpd.conf' or '~/site-enabled/000-default' or what you are currently using for the apache config:your config:
Quote:

ServerName jwchat.mydomain.com
DocumentRoot /home/mydomain/sd/jwchat/www/


When looking at this, I am a little puzzled that the directory is ~/jwchat/www/ and not /www(/html)/jwchat or similiar, but OK, I guess you have that pointing to the right spot.

Quote:


Options FollowSymLinksAllowOverride None


Options +Multiviews

AddDefaultCharset UTF-8
ProxyRequests On#ProxyPassReverse /http-bind/ http://127.0.0.1:8080/http-bind/
ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/
ProxyTimeout 10000

ErrorLog /var/log/apache2/jwchat.mydomain.error.log
LogLevel warn
CustomLog /var/log/apache2/jwchat.mydomain.acces.log combined
ServerSignature Off


Now, I had a little scrape with this part (regarding the proxy redirect) myself.

You may wanna add

"ProxyPass http-bind/ http://127.0.0.1:8080/http-bind/"

as well as

"ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/"

just to be on the safe side, and I also checked my config, and appear to have an 'AllowOverride All' directive in that section. You might wanna try this, too. You would appear to be using Apache2x, which requires the mod_proxy module (and I think mod_proxy_http) to be active in your apache config, I don't want to nag, but are you sure that the proxy redirect is working? I.e. when you visit http://your.server.i.p/http-bind/" you should be redirected to http://your.server.i.p:8080/http-bind and you should receive an error from the Jetty service (I think a good old '404', but I'm not quite sure on that one anymore).

As for replacing the charset value in the jsjac library, it's a dirty hack, but it should work, IF you are using the exact same version. Now as I remember there are two references to utf-8 in the library, and I am more than willing to send you a copy of mine via email if you like. Also, you have the MultiViews directive configured, which the INSTALL does tell you to do. I also have this configured, but as you may have read in my previous posts, I deleted all non-US international files, and that worked for me. There have been some speculations that it could even be the encoding or language setting of the browser causing the failure in some cases. I used firefox 2 and IE6 to test all this, and never noticed any difference, even when changing the encoding settings in the browser. Could you maybe post those logs should all the above info not help?

Cheers

PelliX

Sunday, March 09, 2008

โค้ด filter ตัว openfile dialog ของ c# และสั่งให้ os run programm ที่ assign อยู่กับ file type

ประมาณนี้ ง่ายๆ แต่หาตั้งนาน

OpenFileDialog of = new OpenFileDialog();
of.InitialDirectory = @"c:\";
of.Filter = "Wav Files (*.wav)*.wav";
of.FilterIndex = 2;
if (of.ShowDialog() == DialogResult.OK)
{
//szFileName = of.FileName;
System.Diagnostics.Process.Start(of.FileName, "");
}

วันหลังมาหาที่นี่ 555 จดไว้ๆ

วันนี้ลง openfire เข้าคู่ xmpp4js ใหม่

เนื่องจากปัญหา http ที่ยุ่งยาก และวิธีแก้ที่ทำตาม forum ให้ set proxy มาเป็น localhost หรือ ทำ virtual host
นั้น พอใช้งานจริง chat ไปสักพักจะขึ้น error exception title is not object (ประมาณนี้)
แล้วก็เป็น error บน javascript ขึ้นมา

พอดีมีเวลา และพี่เติ้ลก็ให้เครื่องมาลองยำเองเลย
ก็เลยลบ ลงใหม่ให้หมด

เริ่ม ลบ openfire, ลบ xmpp4js, ลบ appserv, ลบ xampp (mysql ก็ไปด้วย ดีนะที่ไม่มีข้อมูล เพราะลืม backup)

เริ่มลงใหม่
ก่อนอื่นไป download software ที่เกี่ยวข้อง

เนื่องจากอ่านในเวบนี้ http://zeank.in-berlin.de/jhb/
พูดถึง http-bind เอาไว้ง่ายๆว่าเป็น package servlet ให้เอาไป deploy แล้วก็จะเล่น jabber http-bind เจ้าปัญหาได้
และถ้ามีปัญหาก็ไปโหลด package jar file เพิ่มก็จะแก้ได้
ดูๆน่าจะง่ายกว่าการ config จริงๆตอนแรกไม่รู้หรอกว่ามันจะช่วยเรายังไง แต่ฟางเส้นเดียวก็ต้องคว้าเอาไว้ก่อน เลยโหลดเอาไว้ ทั้ง .war และ source
ระวังเวลาโหลดแล้วมันจะเปลี่ยน .war เป็น .zip ผมแก้กลับ กันไว้ก่อน

ดังนั้นเราตค้องหา webserver ที่ run servlet ได้ ก็ง่ายๆอีกก็คือ Tomcat แต่ลอง check ดูว่า Xampp ของเราสามารถ run Servlet ได้ด้วยมั้ย.. ไปเจอ plugin ว่าสามารถลง Tomcat เป็น plugin ได้ เลยโหลดมาทั้ง xampp ตัวใหม่ 1.6.6a และ Tomcat plugin (แต่สุดท้ายตัว xampp ดันโหลดไม่สมบูรณ์ เลยไปใช้ตัวเก่า xampp1.6.5) ส่วน link ก็นี่ http://www.apachefriends.org/en/xampp-windows.html (เกือบลืม)

ลงไปมันทั้ง xampp และ Tomcat ลงเสร็จถึงรู้ว่ามันแยกกัน Run ก็เดาๆไว้แล้วว่าต้องแยก port 8080 เป็นของ Tomcat และ port 80 ของ php แหงมๆ ก็เป็นไปตามนั้น

จากนั้นเอา xmpp4js มาลง จากเวบเดิม ยังเป็น SNAPSHOT0.2 อยู่
เจ้าของก็นี่ http://blog.devspan.com/2008/02/xmpp4js-initial-release.html
ตัว source ก็นี่ http://sourceforge.net/project/showfiles.php?group_id=209465&package_id=251329&release_id=579308

ดูๆแล้วโหลดมาทั้ง ตัวเปล่าๆและตัว with lancher (แบบ double คลิ๊ก run ได้เลย)
แต่ดูการวาง Folder แล้ว เอาตัวหลังมาใช้ดีกว่า เพราะเคยเห็นแต่วางแบบนี้ (ไม่ต่างกันมั้ง) ตัดเอาแต่ส่วนของ root มาใส่ใน webapps
แก้ชื่อ Folder ใหม่เป็น xmpp4js ลอง run ดู (อย่าลืมแก้ destination ใน simple file ที่เป็น html และใน xmpp4js.js -- มั้งนะจำชื่อไม่ได้ ตัว javascript ที่เป็นตัวหลัก-- อันนี้แต่ groupchat -- มันดัน fix destination อยู่นิ)

error จะเห็นได้ชัดเจนว่า มันเรียกร้องหา http-bind และบอกประมาณ http-bind cannot reach
ตอนแรกจะไปแก้ที่ virtualhost แต่คิดก็ลืมไป เพราะยังไม่ลง openfire จะมี http-bind ได้ไง
ตอนนี้ชี้ ไปที่ server จริงเลย ก็ว่าจะชี้ proxy ไปที่ server จริงตามไป ถ้าไม่ได้ ก็ลง openfire บนเครื่องพี่เติ้ลนี้

แต่คิดๆอีกที เรามาลองใช้ package http-bind ที่โหลดมาตอนแรกดีกว่า แค่ deploy war file เอง หมูๆ ถ้าได้ก็เฮ..
เลยก็อบไปวางไว้บน xampp/tomcat/webapps ก็คือ webapps ของ tomcat นั่งเอง
พอวางปุ้บอารามใจร้อน ไปลองเลย ก็เละอยู่ดี error เหมือเดิม
ไปดูที่ Folder ที่ Tomcat extract ออกมา ก็อ๋อ เพราะ Folder มันเป็นชื่ออื่น เลยจัดการเปลี่ยนมันซะ เป็น /http-bind
ลองเรียน 127.0.0.1/http-bind ก็ขึ้นเป็น servlet ตอบรับดีซะด้วย อย่างนี้มีลุ้น..

เลยลองอีกทีคราวนี้ลง psi มาอีกตัวเป็นคู่คุยกันเพื่อทดสอบ ปรากฏว่า psi เห็น user ที่ on ด้วย xmpp4js เป็น offline
แต่ว่า มันสามารถคุยกันได้ นิ้งงงเลย... ไม่มี error title null อีกแล้ว
เหอๆ มาจดไว้เท่านี้แหละ ยังไม่กล้าลง openfire บนเครื่องตัวเอง ยิงไป server จริงไปก่อนจนกว่าจะมีเครื่องใหม่
กลัว http-bind มันตีกัน

=====

ขอเพิ่มเติมอีกนิด
พอดีวันนี้กลับมาดูเพื่อจะลองลง http bind เพื่อเข้าคู่กับ Connection manager เนื่องจากสันนิษฐานว่า
http-bind ของ CM น่าจะคล้ายๆของ XMPP4JS หรือ soashable นี่แหละ

แต่พอเอา .war ไป deploy กลับเกิดอาการ unsupported class version error ก็รู้ว่าต้องแก้ด้วยการลง Jdk ตัวใหม่ (Jdk6 ก็พอ) แต่ลงใหม่ก็แล้ว set JAVA_HOME ใน Enviromentsetting ก็แล้วไม่หาย

ตอนหลังจึงมารู้ว่า Tomcat ที่ start ด้วย bat file (ที่ผมลงจาก plugin ของXaMPP นั้นหละ)
มันดันมีการ set JAVA_HOME ใหม่เฉย

ต้องแก้ด้วย ใช้ Jdk5 แล้วมีปัญหา ต้องแก้ที่ script ตรงๆด้วย พอแก้แล้วก็ deploy ได้ปกติเลย

Wednesday, March 05, 2008

ในที่สุด ก็ deploy jar ลงไปได้ด้วย maven

http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html
http://maven.apache.org/guides/getting-started/index.html

D:\soashable\js-plugin>mvn install:install-file -DgroupId=org.codehaus.mojo.javascript -DartifactId=javascript-maven-extensions -Dversion=1.0-alpha-1-SNAPSHOT -Dpackaging=jar -Dfile=\target\maven-javascript-plugin-0.1.jar[INFO] Scanning for projects...[INFO] Searching repository for plugin with prefix: 'install'.WAGON_VERSION: 1.0-beta-2[INFO] ------------------------------------------------------------------------[INFO] Building Javascript Maven Plugin[INFO] task-segment: [install:install-file] (aggregator-style)[INFO] ------------------------------------------------------------------------[INFO] [install:install-file][INFO] Installing D:\soashable\js-plugin\target\maven-javascript-plugin-0.1.jarto C:\Documents and Settings\adisorn_s\.m2\repository\org\codehaus\mojo\javascript\javascript-maven-extensions\1.0-alpha-1-SNAPSHOT\javascript-maven-extensions-1.0-alpha-1-SNAPSHOT.jar[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 2 seconds[INFO] Finished at: Wed Mar 05 15:24:15 GMT+07:00 2008[INFO] Final Memory: 3M/254M[INFO] ------------------------------------------------------------------------
D:\soashable\js-plugin>

มันฟ้อง error ใช้ mvn install ไม่ผ่านซักที
ฟ้องว่าให้ deploy หรือ โหลด path ตรงจากเวบ

ที่แท้เราต้องรู้เองว่า mvn compile
mvn install ของเราที่ทำได้แล้วนั้น ได้ jar ไว้ที่ไหน
แล้วเราต้อง deploy jar ลงในเครื่อง (ไปอยู่ใน documemt and setting นั่งเอง)

ปล. เนื่องจาก xmpp4js มันต้องการ package ของ mojo ก็เลยต้องมาทำยังงี้ เห้อ ยุ่งอยู่ดี

Tuesday, March 04, 2008

เอา command maven ที่ลองมาใส่ไว้

D:\>mvn archetype:create -DgroupId=test -DartifactId=test -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp[INFO] Scanning for projects...[INFO] Searching repository for plugin with prefix: 'archetype'.[INFO] ------------------------------------------------------------------------[INFO] Building Maven Default Project[INFO] task-segment: [archetype:create] (aggregator-style)[INFO] ------------------------------------------------------------------------Downloading: http://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-common/2.0-alpha-2/archetype-common-2.0-alpha-2.pom16K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-core/2.0.8/maven-core-2.0.8.pom6K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven/2.0.8/maven-2.0.8.pom11K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/6/maven-parent-6.pom19K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-settings/2.0.8/maven-settings-2.0.8.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-model/2.0.8/maven-model-2.0.8.pom3K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.4.6/plexus-utils-1.4.6.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.11/plexus-1.0.11.pom8K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.pom3K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-containers/1.0.3/plexus-containers-1.0.3.pom492b downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.4/plexus-1.0.4.pom5K downloadedDownloading: http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom998b downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.pom6K downloadedDownloading: http://repo1.maven.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom3K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.pom637b downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-providers/1.0-beta-2/wagon-providers-1.0-beta-2.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon/1.0-beta-2/wagon-1.0-beta-2.pom5K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/4/maven-parent-4.pom9K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom3K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.pom680b downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.0.8/maven-plugin-parameter-documenter-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2.pom1K downloadedDownloading: http://repo1.maven.org/maven2/test/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pomDownloading: http://repo1.maven.org/maven2/test/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pomDownloading: http://repo1.maven.org/maven2/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.8/maven-reporting-api-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-reporting/2.0.8/maven-reporting-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-9/doxia-sink-api-1.0-alpha-9.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia/1.0-alpha-9/doxia-1.0-alpha-9.pom8K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-profile/2.0.8/maven-profile-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-artifact/2.0.8/maven-artifact-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-repository-metadata/2.0.8/maven-repository-metadata-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-error-diagnostics/2.0.8/maven-error-diagnostics-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-artifact-manager/2.0.8/maven-artifact-manager-2.0.8.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry/2.0.8/maven-plugin-registry-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/commons-cli/commons-cli/1.0/commons-cli-1.0.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.8/maven-plugin-api-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2.pom851b downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.pom6K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom1K downloadedDownloading: http://repo1.maven.org/maven2/plexus/plexus-containers/1.0.2/plexus-containers-1.0.2.pom471b downloadedDownloading: http://repo1.maven.org/maven2/plexus/plexus-root/1.0.3/plexus-root-1.0.3.pom5K downloadedDownloading: http://repo1.maven.org/maven2/plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.pom740b downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-descriptor/2.0.8/maven-plugin-descriptor-2.0.8.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-monitor/2.0.8/maven-monitor-2.0.8.pom1K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2.pom1K downloadedDownloading: http://repo1.maven.org/maven2/com/jcraft/jsch/0.1.27/jsch-0.1.27.pom965b downloadedDownloading: http://repo1.maven.org/maven2/classworlds/classworlds/1.1/classworlds-1.1.pom3K downloadedDownloading: http://repo1.maven.org/maven2/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.pom1K downloadedDownloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom6K downloadedDownloading: http://repo1.maven.org/maven2/jdom/jdom/1.0/jdom-1.0.pom1K downloadedDownloading: http://repo1.maven.org/maven2/commons-io/commons-io/1.3.1/commons-io-1.3.1.pom6K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.3/plexus-velocity-1.1.3.pom976b downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-components/1.1.5/plexus-components-1.1.5.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.5/plexus-1.0.5.pom5K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom7K downloadedDownloading: http://repo1.maven.org/maven2/commons-collections/commons-collections/2.0/commons-collections-2.0.pom171b downloadedDownloading: http://repo1.maven.org/maven2/velocity/velocity/1.4/velocity-1.4.pom2K downloadedDownloading: http://repo1.maven.org/maven2/velocity/velocity-dep/1.4/velocity-dep-1.4.pom1K downloadedDownloading: http://repo1.maven.org/maven2/commons-collections/commons-collections/3.2/commons-collections-3.2.pom10K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom767b downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-invoker/2.0.6/maven-invoker-2.0.6.pom2K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/6/maven-shared-components-6.pom3K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-monitor/2.0/maven-monitor-2.0.pom400b downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven/2.0/maven-2.0.pom8K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.pom723b downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-common/2.0-alpha-2/archetype-common-2.0-alpha-2.jar227K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar164K downloadedDownloading: http://repo1.maven.org/maven2/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar106K downloadedDownloading: http://repo1.maven.org/maven2/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.jar25K downloadedDownloading: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar306K downloadedDownloading: http://repo1.maven.org/maven2/jdom/jdom/1.0/jdom-1.0.jar149K downloadedDownloading: http://repo1.maven.org/maven2/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar81K downloadedDownloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.3/plexus-velocity-1.1.3.jar7K downloadedDownloading: http://repo1.maven.org/maven2/commons-collections/commons-collections/3.2/commons-collections-3.2.jar557K downloadedDownloading: http://repo1.maven.org/maven2/velocity/velocity/1.4/velocity-1.4.jar352K downloadedDownloading: http://repo1.maven.org/maven2/velocity/velocity-dep/1.4/velocity-dep-1.4.jar505K downloadedDownloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-invoker/2.0.6/maven-invoker-2.0.6.jar24K downloaded[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.[INFO] Setting property: velocimacro.messages.on => 'false'.[INFO] Setting property: resource.loader => 'classpath'.[INFO] Setting property: resource.manager.logwhenfound => 'false'.[INFO] [archetype:create][INFO] Defaulting package to group ID: test[INFO] artifact org.apache.maven.archetypes:maven-archetype-webapp: checking for updates from centralDownloading: http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.jar3K downloaded[INFO] ----------------------------------------------------------------------------[INFO] Using following parameters for creating OldArchetype: maven-archetype-webapp:RELEASE[INFO] ----------------------------------------------------------------------------[INFO] Parameter: groupId, Value: test[INFO] Parameter: packageName, Value: test[INFO] Parameter: basedir, Value: D:\[INFO] Parameter: package, Value: test[INFO] Parameter: version, Value: 1.0-SNAPSHOT[INFO] Parameter: artifactId, Value: test[INFO] ********************* End of debug info from resources from generated POM ***********************[INFO] OldArchetype created in dir: D:\test[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 3 minutes 9 seconds[INFO] Finished at: Wed Mar 05 12:39:01 GMT+07:00 2008[INFO] Final Memory: 7M/254M[INFO] ------------------------------------------------------------------------
D:\>


สุดท้ายได้ Folder test มาตัวนึง ที่เหลือไม่รู้มันเอาไปไว้ไหนไม่รู้ ยังไม่ได้หา เห็นโหลดเยอะแยะ
ยังงงงงอยุ่ เดี๋ยวมาดูต่อพรุ่งนี้ วันนี้บ่ายไปทำเรื่องอื่นและ

jabber on web with xmpp4js

วันนี้จะทำเรื่อง xmpp4js


ได้ตัว xmpp4js จาก soashable.sourceforge.net แต่มันมีการใช้ Maven tools ในการทำ โปรเจค มันอาจไม่จำเป็นต้องเข้าไปยุ่ง แค่เอา code ที่ต้องการมาโมก็น่าจะพอ
แต่ไอ้ Maven เนี่ย คืออะไรเลยลองหาๆ เมื่อก่อนแค่ ant เอามา build ก็ว่ายุ่งยากและ ทำไมไม่ทำเป็น installer หรือ wizard หรือ copy paste ง่ายๆไม่ได้หรือไงน้ะ กะไอ้โปรเจค opensource เนี่ย
(โดยเฉพาะ apache)
เมื่อก่อนต้องเรียนรู้เรื่อง Revision SVN Tools เพื่อหาทางโหลด code มาวันนี้ต้องรู้จัก maven เพื่อทั้งโหลด ทั้ง build ด้วย
มันต่างกันนะ เมื่อวันก่อนต้อง โหลด opensource ชื่อ punjab มามั้ง เพราะจะทำ http binfing
แต่ก็ไม่สำเร็จ เพราะมัน ต้องการ prerequsite (เขียนถูกมั้ยนี่) อีกมากมาย และไอ้ prerequire package เหล่านั้น มันก็มี prerequire package ต่อๆไป ต่อๆไป ไม่หยุด สุดท้าย งงครับ งงเอง โหลดอะไรมาเพื่อะไร 6-7 ตัว เพื่อจะเอา plugin ตัวเดียว
ก็เลยไม่มองข้าม maven ไป คิดว่ามันน่าจะช่วยให้ชีวิตเราง่ายขึ้น
ดูการทดลองของคนใน Narisa มาลองทำมั้ง และก็ที่นี่
และ Blog ของคุณ pphetra
เป็นต้นขั้วที่ดีให้อ่านง่ายและสาวต่อว่ามันคืออะไร ใช้ยังไง ดีหรือเปล่า
ตอนนี้ต้องการเอามา build project ของ soashable http://soashable.sourceforge.net/getting-started-dev.html ก็ยังงๆนะ ยังโหลดตัวอื่นๆด้วย SVN Tools ของเราอยู่ แล้ว Maven จะใช้ตอนไหนก็ไม่รู้.. เอาเป็นว่า เดี๋ยวมาติดตามตอนต่อไปกันนะ