[sip-comm-dev] ant build.xml <exec> issue


#1

Hi Emil, I think I have found a solution for the portability issue
regarding junitreport and exec task in build.xml.

I have replaced this piece of code:

       <exec executable="ant" output="${test.html.reports.dir}/output.txt">
            <env key="CLASSPATH"
                 path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/>
            <arg value="htmlreport"/>
       </exec>

with this:

        <ant inheritAll="false" antfile="build.xml" target="htmlreport">
            <property name="java.class.path"
                        refid="java.class.path.junitreport">
                <classpath id="java.class.path.junitreport"
                        path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/>
            </property>
        </ant>

Then I have run ant with cc-buildloop target on windows 98 and now reports are
built.

There is a problem: ant task doesn't redirect output
to ${test.html.reports.dir}/output.txt like exec task. I can't figure
out how to do that. If you have an idea please tell me.

In the attachment there is a patch which contains my changes of build.xml.
It's a patch for 2006-06-17 nightbuild.

What do you think about my changes?
If you need further information just ask.

Thank you for your time,

Andrea Cardani

build.xml-exec.2006-05-17.patch (1.02 KB)


#2

Hello Andrea,

Fist, congratulations for your progress! Hope you keep this spirit up.

Now, I just tried your new task but unfortunately it doesn't seem to work.

More inline:

Andrea Cardani wrote:

with this:

        <ant inheritAll="false" antfile="build.xml" target="htmlreport">
            <property name="java.class.path"
                        refid="java.class.path.junitreport">
                <classpath id="java.class.path.junitreport"
                        path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/>
            </property>
        </ant>

I believe the java.class.path java property is read only during runtime.
Once your process has been started you may modify it as much as you won't
and it won't change anything.. In the current version of the build.xml we're changing it before the child exec has actually been launched which is why it works (if you forget about the windows problem of course :slight_smile: ).

So what happens on my machine for example is that I get the following error:

      [java] Java Result: 255
      [echo] Generating HTML test reports ...

htmlreport:

BUILD FAILED
/home/emcho/devel/sip-communicator-1.0/build.xml:297: Following error occured while executing this line
/home/emcho/devel/sip-communicator-1.0/build.xml:323: Could not find xalan2 nor xalan1 in the classpath. Check http://xml.apache.org/xalan-j

If you didn't get the same error then you may have copied xalan.jar to a
location that was in the default ant classpath (such as ANT_HOME/lib for
example).

Then I have run ant with cc-buildloop target on windows 98 and now reports are built.

There is a problem: ant task doesn't redirect output
to ${test.html.reports.dir}/output.txt like exec task. I can't figure out how to do that. If you have an idea please tell me.

Why is that a problem? The ant task takes an output param according to
the ant docs. Doesn't it work?

Anyway. Despite all this I am still very glad you're tackling issue.

Hope to hear from you again

Cheers
Emi

···

In the attachment there is a patch which contains my changes of build.xml.
It's a patch for 2006-06-17 nightbuild.

What do you think about my changes?
If you need further information just ask.

Thank you for your time,

Andrea Cardani

------------------------------------------------------------------------

--- b1.xml 2006-05-18 00:04:14.000000000 +0200
+++ build.xml 2006-05-18 00:02:46.000000000 +0200
@@ -293,13 +293,11 @@
              see its "Build Successful" output line as users might confuse it
              for a general build success while this might not be the case.-->
         <echo message="Generating HTML test reports ..."/>
- <ant inheritAll="false" antfile="build.xml" target="htmlreport">
- <property name="java.class.path"
- refid="java.class.path.junitreport">
- <classpath id="java.class.path.junitreport"
- path="\{java\.class\.path\}:lib/xalan\-2\.6\.0\.jar\.ant&quot;/&gt; \- &lt;/property&gt; \- &lt;/ant&gt; \+ &lt;exec executable=&quot;ant&quot; output=&quot;{test.html.reports.dir}/output.txt">
+ <env key="CLASSPATH"
+ path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/>
+ <arg value="htmlreport"/>
+ </exec>
         <echo message="Done."/>
          <!-- Check whether testing went alright and fail if not.-->

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hello again,

Here are some pointers I found on how one could extend ant's classpath.
They might be useful in our case:

http://enitsys.sourceforge.net/ant-classloadertask/
http://www.cenqua.com/clover/doc/ant/installopts.html

Good luck
Emil

Emil Ivov wrote:

···

Hello Andrea,

Fist, congratulations for your progress! Hope you keep this spirit
up.

Now, I just tried your new task but unfortunately it doesn't seem to
work.

More inline:

Andrea Cardani wrote:

with this:

<ant inheritAll="false" antfile="build.xml" target="htmlreport"> <property name="java.class.path" refid="java.class.path.junitreport"> <classpath
id="java.class.path.junitreport" path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/> </property> </ant>

I believe the java.class.path java property is read only during
runtime. Once your process has been started you may modify it as much
as you won't and it won't change anything.. In the current version of
the build.xml we're changing it before the child exec has actually
been launched which is why it works (if you forget about the windows
problem of course :slight_smile: ).

So what happens on my machine for example is that I get the following
error:

[java] Java Result: 255 [echo] Generating HTML test reports ...

htmlreport:

BUILD FAILED /home/emcho/devel/sip-communicator-1.0/build.xml:297:
Following error occured while executing this line /home/emcho/devel/sip-communicator-1.0/build.xml:323: Could not find
xalan2 nor xalan1 in the classpath. Check
http://xml.apache.org/xalan-j

If you didn't get the same error then you may have copied xalan.jar
to a location that was in the default ant classpath (such as
ANT_HOME/lib for example).

Then I have run ant with cc-buildloop target on windows 98 and now
reports are built.

There is a problem: ant task doesn't redirect output to
${test.html.reports.dir}/output.txt like exec task. I can't figure
out how to do that. If you have an idea please tell me.

Why is that a problem? The ant task takes an output param according
to the ant docs. Doesn't it work?

Anyway. Despite all this I am still very glad you're tackling issue.

Hope to hear from you again

Cheers Emi

In the attachment there is a patch which contains my changes of
build.xml. It's a patch for 2006-06-17 nightbuild.

What do you think about my changes? If you need further information
just ask.

Thank you for your time,

Andrea Cardani

------------------------------------------------------------------------

--- b1.xml 2006-05-18 00:04:14.000000000 +0200 +++ build.xml
2006-05-18 00:02:46.000000000 +0200 @@ -293,13 +293,11 @@ see its
"Build Successful" output line as users might confuse it for a
general build success while this might not be the case.--> <echo
message="Generating HTML test reports ..."/> - <ant
inheritAll="false" antfile="build.xml" target="htmlreport"> -
<property name="java.class.path" -
refid="java.class.path.junitreport"> - <classpath
id="java.class.path.junitreport" -
path="\{java\.class\.path\}:lib/xalan\-2\.6\.0\.jar\.ant&quot;/&gt; \- &lt;/property&gt; \- &lt;/ant&gt; \+ &lt;exec executable=&quot;ant&quot; output=&quot;{test.html.reports.dir}/output.txt"> + <env
key="CLASSPATH" +
path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/> +
<arg value="htmlreport"/> + </exec> <echo message="Done."/>

<!-- Check whether testing went alright and fail if not.-->

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail:
dev-unsubscribe@sip-communicator.dev.java.net For additional
commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

And hallo again,

Wanted to let you know that I've found a solution to the problem so in
case you haven't been working on it for the last day I could so that you
and anyone else could switch to something more interesting.

Just let me know.

Emil

Emil Ivov wrote:

···

Hello again,

Here are some pointers I found on how one could extend ant's
classpath. They might be useful in our case:

http://enitsys.sourceforge.net/ant-classloadertask/ http://www.cenqua.com/clover/doc/ant/installopts.html

Good luck Emil

Emil Ivov wrote:

Hello Andrea,

Fist, congratulations for your progress! Hope you keep this spirit up.

Now, I just tried your new task but unfortunately it doesn't seem
to work.

More inline:

Andrea Cardani wrote:

with this:

<ant inheritAll="false" antfile="build.xml" target="htmlreport">
<property name="java.class.path" refid="java.class.path.junitreport"> <classpath id="java.class.path.junitreport" path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/> </property> </ant>

I believe the java.class.path java property is read only during runtime. Once your process has been started you may modify it as
much as you won't and it won't change anything.. In the current
version of the build.xml we're changing it before the child exec
has actually been launched which is why it works (if you forget
about the windows problem of course :slight_smile: ).

So what happens on my machine for example is that I get the
following error:

[java] Java Result: 255 [echo] Generating HTML test reports ...

htmlreport:

BUILD FAILED /home/emcho/devel/sip-communicator-1.0/build.xml:297: Following error occured while executing this line /home/emcho/devel/sip-communicator-1.0/build.xml:323: Could not
find xalan2 nor xalan1 in the classpath. Check http://xml.apache.org/xalan-j

If you didn't get the same error then you may have copied xalan.jar
to a location that was in the default ant classpath (such as ANT_HOME/lib for example).

Then I have run ant with cc-buildloop target on windows 98 and
now reports are built.

There is a problem: ant task doesn't redirect output to ${test.html.reports.dir}/output.txt like exec task. I can't
figure out how to do that. If you have an idea please tell me.

Why is that a problem? The ant task takes an output param according
to the ant docs. Doesn't it work?

Anyway. Despite all this I am still very glad you're tackling
issue.

Hope to hear from you again

Cheers Emi

In the attachment there is a patch which contains my changes of build.xml. It's a patch for 2006-06-17 nightbuild.

What do you think about my changes? If you need further
information just ask.

Thank you for your time,

Andrea Cardani

------------------------------------------------------------------------

--- b1.xml 2006-05-18 00:04:14.000000000 +0200 +++ build.xml 2006-05-18 00:02:46.000000000 +0200 @@ -293,13 +293,11 @@ see its
"Build Successful" output line as users might confuse it for a general build success while this might not be the case.--> <echo message="Generating HTML test reports ..."/> - <ant inheritAll="false" antfile="build.xml" target="htmlreport"> - <property name="java.class.path" - refid="java.class.path.junitreport"> - <classpath id="java.class.path.junitreport" - path="\{java\.class\.path\}:lib/xalan\-2\.6\.0\.jar\.ant&quot;/&gt; \- &lt;/property&gt; \- &lt;/ant&gt; \+ &lt;exec executable=&quot;ant&quot; output=&quot;{test.html.reports.dir}/output.txt"> + <env key="CLASSPATH" + path="${java.class.path}:lib/xalan-2.6.0.jar.ant"/> + <arg
value="htmlreport"/> + </exec> <echo message="Done."/>

<!-- Check whether testing went alright and fail if not.-->

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Alle Saturday 20 May 2006 02:25, Emil Ivov ha scritto:

And hallo again,

Wanted to let you know that I've found a solution to the problem so in
case you haven't been working on it for the last day I could so that you
and anyone else could switch to something more interesting.

Just let me know.

Emil

It is ok for me. If you have found any new solution just try it. It isn't a
problem for me because at the moment I have no idea about how to solve the
issue since java.class.path property set in ant task doesn't work.
You were right. I realize the only reason why my modified build.xml worked was
because I was using ant 1.6.5 binary version which has Xalan in the ant
default classpath. I have tried my build.xml with ant 1.6.0 and it give me
the same error log you sent me.

I can't wait to see your solution because I really want to learn how to solve
this classpath problem! :slight_smile:

In an email you wrote me you said I could implement the
ProtocolProviderService over a protocol of my choice. What protocol can I
implement? What about IRC or gadu gadu?

Regards,

Andrea

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

Hello Andrea,

I realize the only reason why my modified build.xml worked was because I was using ant 1.6.5 binary version which has Xalan in the ant default classpath. I have tried my build.xml with ant 1.6.0 and it give me the same error log you sent me.

I didn't know that xalan is included in ant 1.6.5. This is cool. If I
knew it was the case I wouldn't have bothered everyone with the issue
and probably accepted to post a mesage saying that u need ant 1.6.5 to
build.

Well anyway, now that we have it working we might as well remain 1.6.0
compatible.

I can't wait to see your solution because I really want to learn how
to solve this classpath problem! :slight_smile:

No big deal actually. Instead of using the exec command I tried
executing ant through its Launcher (main) class. This lets you modify
its classpath and should work on all operating systems since the
launcher is the same everywhere so we shouldn't have the windows issue
anymore.

In an email you wrote me you said I could implement the ProtocolProviderService over a protocol of my choice. What protocol can I implement? What about IRC or gadu gadu?

Any protocol you wish. If you're looking for a widely used protocol that
no one is currently working on, you might have a look on Yahoo!

Gadu gadu is of course an option too.

As for IRC I am afraid it's a bit early because I am not sure
sip-communicator's architecture would allow it right now. From a user
point of view IRC does not work the same way as the other protocols
we're discussing and this may impose some extensions on both the
interfaces of the ProtocolProviderService and the GUI.

We were also talking about having an implementation of the JXTA instant
messaging protocol so you could also have a go there if it interests you.

Good luck!
Emil


#7

Alle Sunday 21 May 2006 16:56, Emil Ivov ha scritto:

Any protocol you wish. If you're looking for a widely used protocol that
no one is currently working on, you might have a look on Yahoo!

Gadu gadu is of course an option too.

As for IRC I am afraid it's a bit early because I am not sure
sip-communicator's architecture would allow it right now. From a user
point of view IRC does not work the same way as the other protocols
we're discussing and this may impose some extensions on both the
interfaces of the ProtocolProviderService and the GUI.

We were also talking about having an implementation of the JXTA instant
messaging protocol so you could also have a go there if it interests you.

Good luck!
Emil

Hi Emil, for me is ok to implement Yahoo.
I found these resources which explain ymsg:

http://jymsg9.sourceforge.net/
http://www.carbonize.co.uk/Tutorials/Vb/ymsg.php
http://www.venkydude.com/articles/yahoo.htm
http://freehost02.websamba.com/brittanyfoo/writings/yafoo.html

Do you happen to know any other good
resource which explain Yahoo protocol?

Thank you for your time,

Andrea Cardani

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#8

Hello Andrea,

This seems like a good start.

I know that JClaim support yahoo messenger

http://jclaim.sourceforge.net

but I think they are using http://jymsg9.sourceforge.net/ and you've
already found this.

I'll try to put up documentation on the protocol provider service one of
these days and will let you know as soon as I am done.

Until then I wish you good luck exploring the Yahoo messenger protocol
stacks.

Emil

Andrea Cardani wrote:

···

Alle Sunday 21 May 2006 16:56, Emil Ivov ha scritto:

Any protocol you wish. If you're looking for a widely used protocol
that no one is currently working on, you might have a look on Yahoo!

Gadu gadu is of course an option too.

As for IRC I am afraid it's a bit early because I am not sure sip-communicator's architecture would allow it right now. From a user point of view IRC does not work the same way as the other protocols we're discussing and this may impose some extensions on both the interfaces of the ProtocolProviderService and the GUI.

We were also talking about having an implementation of the JXTA instant messaging protocol so you could also have a go there if it interests you.

Good luck! Emil

Hi Emil, for me is ok to implement Yahoo. I found these resources which explain ymsg:

http://jymsg9.sourceforge.net/ http://www.carbonize.co.uk/Tutorials/Vb/ymsg.php http://www.venkydude.com/articles/yahoo.htm http://freehost02.websamba.com/brittanyfoo/writings/yafoo.html

Do you happen to know any other good resource which explain Yahoo protocol?

Thank you for your time,

Andrea Cardani

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net For additional commands, e-mail: dev-help@sip-communicator.dev.java.net