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

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

[ivy:retrieve] :: Ivy 2.2.x-local-20100818095649 - 20100818095649 ::
http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url =
[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
[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)

  [xmlbean] Time to build schema type system: 1.452 seconds
  [xmlbean] Time to generate code: 0.842 seconds
  [xmlbean] Compiling 154 source files to
  [xmlbean] Time to compile code: 7.614 seconds
  [xmlbean] Building jar:

  [xmlbean] Time to build schema type system: 0.899 seconds
  [xmlbean] Time to generate code: 0.108 seconds
  [xmlbean] Compiling 36 source files to
  [xmlbean] Time to compile code: 1.941 seconds
  [xmlbean] Building jar:

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

    [javac] Compiling 99 source files to
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]                                              ^
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:
uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 warnings

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

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

Total time: 21 seconds

        ---> 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.

Ranjith Kumar.K
Received on Monday, 23 August 2010 05:50:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:54:57 UTC