W3C home > Mailing lists > Public > public-qa-dev@w3.org > August 2010

How to build console unicorn version

From: Ranjith <ranjith.k@sedin.co.in>
Date: Mon, 23 Aug 2010 11:19:55 +0530
Message-ID: <AANLkTinr=OXev-0=aqq8z7Ka0JUXx98CsrmWbPwsiALJ@mail.gmail.com>
To: public-qa-dev@w3.org
Hi all,
     I have successfully builded Unicorn using ant and executed it on
Tomcat, It runs fine in Tomcat no issues. Instead of running it on tomcat
server or any other web server it should be implemented in console version.
(I don`t want to run it on any web server).

    My goal on this application is, build a console version of unicorn

    Can anyone tell me how to do this,
        ---> How to run the unicorn main class program? (by execute it using
ant, it will be plus for me).
        ---> I googled and found that there is no way of running a WAR file
in command line, Is there anyway we can run war file at console?
        ---> How to call the unicorn.war file and use it on a simple java
program?

I tried this one "ant retrieve generate_observer generate_tasklist
default_conf jar" but it ends with this error,

goten@MetalBig:/media/Netpad/unicorn/unicorn$ ant retrieve generate_observer
generate_tasklist default_conf jar
Buildfile: build.xml

retrieve:
[ivy:retrieve] :: Ivy 2.2.x-local-20100818095649 - 20100818095649 ::
http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url =
jar:file:/usr/share/ant/lib/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: org.w3c#unicorn;working@MetalBig
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found javax.servlet#servlet-api;2.5 in public
[ivy:retrieve]  found commons-collections#commons-collections;3.2.1 in
public
[ivy:retrieve]  found commons-fileupload#commons-fileupload;1.2.1 in public
[ivy:retrieve]  found portlet-api#portlet-api;1.0 in public
[ivy:retrieve]  found commons-io#commons-io;1.4 in public
[ivy:retrieve]  found commons-lang#commons-lang;2.5 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.1.1 in public
[ivy:retrieve]  found log4j#log4j;1.2.12 in public
[ivy:retrieve]  found logkit#logkit;1.0.1 in public
[ivy:retrieve]  found avalon-framework#avalon-framework;4.1.3 in public
[ivy:retrieve]  found javax.mail#mail;1.4.1 in public
[ivy:retrieve]  found javax.activation#activation;1.1 in public
[ivy:retrieve]  found com.yahoo.platform.yui#yuicompressor;2.3.6 in public
[ivy:retrieve]  found org.apache.velocity#velocity;1.6.4 in public
[ivy:retrieve]  found oro#oro;2.0.8 in public
[ivy:retrieve]  found jdom#jdom;1.0 in public
[ivy:retrieve]  found logkit#logkit;2.0 in public
[ivy:retrieve]  found ant#ant;1.6 in public
[ivy:retrieve]  found werken-xpath#werken-xpath;0.9.4 in public
[ivy:retrieve]  found org.apache.velocity#velocity-tools;2.0 in public
[ivy:retrieve]  found commons-beanutils#commons-beanutils;1.7.0 in public
[ivy:retrieve]  found commons-digester#commons-digester;1.8 in public
[ivy:retrieve]  found commons-chain#commons-chain;1.1 in public
[ivy:retrieve]  found commons-validator#commons-validator;1.3.1 in public
[ivy:retrieve]  found dom4j#dom4j;1.1 in public
[ivy:retrieve]  found sslext#sslext;1.2-0 in public
[ivy:retrieve]  found org.apache.struts#struts-core;1.3.8 in public
[ivy:retrieve]  found antlr#antlr;2.7.2 in public
[ivy:retrieve]  found org.apache.struts#struts-taglib;1.3.8 in public
[ivy:retrieve]  found org.apache.struts#struts-tiles;1.3.8 in public
[ivy:retrieve]  found org.apache.xmlbeans#xmlbeans;2.4.0 in public
[ivy:retrieve]  found stax#stax-api;1.0.1 in public
[ivy:retrieve] :: resolution report :: resolve 1826ms :: artifacts dl 173ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  javax.servlet#servlet-api;2.4 by
[javax.servlet#servlet-api;2.5] in [default]
[ivy:retrieve]  commons-io#commons-io;1.3.2 by [commons-io#commons-io;1.4]
in [default]
[ivy:retrieve]  logkit#logkit;1.0.1 by [logkit#logkit;2.0] in [default]
[ivy:retrieve]  javax.servlet#servlet-api;2.3 by
[javax.servlet#servlet-api;2.5] in [default]
[ivy:retrieve]  commons-lang#commons-lang;2.4 by
[commons-lang#commons-lang;2.5] in [default]
[ivy:retrieve]  commons-logging#commons-logging;1.1 by
[commons-logging#commons-logging;1.1.1] in [default]
[ivy:retrieve]  commons-logging#commons-logging;1.0.3 by
[commons-logging#commons-logging;1.1.1] in [default]
[ivy:retrieve]  commons-digester#commons-digester;1.6 by
[commons-digester#commons-digester;1.8] in [default]
[ivy:retrieve]  commons-collections#commons-collections;3.2 by
[commons-collections#commons-collections;3.2.1] in [default]
[ivy:retrieve]  commons-logging#commons-logging;1.0.4 by
[commons-logging#commons-logging;1.1.1] in [default]
[ivy:retrieve]  org.apache.velocity#velocity;1.6.2 by
[org.apache.velocity#velocity;1.6.4] in [default]
[ivy:retrieve]  commons-lang#commons-lang;2.2 by
[commons-lang#commons-lang;2.5] in [default]
 ---------------------------------------------------------------------
|                  |            modules            ||   artifacts   |
 |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
 |      default     |   43  |   0   |   0   |   12  ||   31  |   0   |
---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.w3c#unicorn
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  31 artifacts copied, 0 already retrieved (9672kB/656ms)

generate_observer:
  [xmlbean] Time to build schema type system: 1.452 seconds
  [xmlbean] Time to generate code: 0.842 seconds
  [xmlbean] Compiling 154 source files to
/tmp/xbean8588899213160360142.d/classes
  [xmlbean] Time to compile code: 7.614 seconds
  [xmlbean] Building jar:
/media/Netpad/unicorn/unicorn/lib/unicorn-response.jar

generate_tasklist:
  [xmlbean] Time to build schema type system: 0.899 seconds
  [xmlbean] Time to generate code: 0.108 seconds
  [xmlbean] Compiling 36 source files to
/tmp/xbean8538209884522555853.d/classes
  [xmlbean] Time to compile code: 1.941 seconds
  [xmlbean] Building jar:
/media/Netpad/unicorn/unicorn/lib/unicorn-tasklist.jar

default_conf:
     [copy] Copying 9 files to /media/Netpad/unicorn/unicorn/build/classes

compile:
    [javac] Compiling 99 source files to
/media/Netpad/unicorn/unicorn/build/classes
    [javac]
/media/Netpad/unicorn/unicorn/src/org/w3c/unicorn/contract/WADLUnmarshallerXPath.java:34:
warning: com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl is Sun
proprietary API and may be removed in a future release
    [javac] import com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl;
    [javac]                                              ^
    [javac]
/media/Netpad/unicorn/unicorn/src/org/w3c/unicorn/contract/WADLUnmarshallerXPath.java:145:
warning: com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl is Sun
proprietary API and may be removed in a future release
    [javac]  this.aXPath = new XPathFactoryImpl().newXPath();
    [javac]                    ^
    [javac] Note:
/media/Netpad/unicorn/unicorn/src/org/w3c/unicorn/util/UCNProperties.java
uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 warnings

jar:
    [mkdir] Created dir: /media/Netpad/unicorn/unicorn/dist

BUILD FAILED
/media/Netpad/unicorn/unicorn/build.xml:78: Manifest file:
/media/Netpad/unicorn/unicorn/WebContent/META-INF/Manifest.MF does not
exist.

Total time: 21 seconds
goten@MetalBig:/media/Netpad/unicorn/unicorn$

        ---> Is there anyway we can convert a war into jar file.

Note : My goal is not to execute it on localhost or any web servers
everything should be executed in command line itself I want to post the uri
from the command line parameter and get the report in plain text and print
it on the console itself. please be brief because I`m newbie to advanced
Java technologies and Unicorn, also guide me with the links it will be
useful for me to understand.
Thanks in advance.

-- 
Cheers,
Ranjith Kumar.K
http://ranjithtenz.wordpress.com
Received on Monday, 23 August 2010 05:50:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 August 2010 05:50:30 GMT