Re: svn commit: r610562 - in /ant/ivy/core/trunk: ./ src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/ src/java/org/apache/ivy/core/retrieve/ src/java/org/apache/ivy/core/settings/ test/java/

2008-01-09 Thread Gilles Scokart
2008/1/9, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Author: maartenc
> Date: Wed Jan  9 13:02:58 2008
> New Revision: 610562
>
> URL: http://svn.apache.org/viewvc?rev=610562&view=rev
> Log:
> NEW: Add support for importing environment variables (IVY-608)
>
> Modified:
> ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
> URL:
> http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java?rev=610562&r1=610561&r2=610562&view=diff
>
> ==
> --- ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
> (original)
> +++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
> Wed Jan  9 13:02:58 2008
> @@ -361,21 +362,6 @@
>  m.appendTail(sb);
>
>  return sb.toString();
> -}
> -
> -public static void main(String[] args) {
> -String pattern =
> "[organisation]/[module]/build/archives/[type]s/"
> -+ "[artifact]-[revision].[ext]";
> -System.out.println("pattern= " + pattern);
> -System.out.println("resolved= "
> -+ substitute(pattern, "apache", "Test", "1.0", "test",
> "jar", "jar"));
> -
> -Map variables = new HashMap();
> -variables.put("test", "mytest");
> -variables.put("test2", "${test}2");
> -pattern = "${test} ${test2} ${nothing}";
> -System.out.println("pattern= " + pattern);
> -System.out.println("resolved= " + substituteVariables(pattern,
> variables));
>  }
>
>  /**
>
>
Shouldn't this be put in a unit test?

-- 
Gilles Scokart


Re: ProjectHelper : parsing from InputStream

2008-01-09 Thread Gilles Scokart
But If you want to  pass an input stream as parameter, it is to allow to
read build file from an other source than a file.  In those case, there is
not necessarily a File basedir, but it can be something else.

Maybe passing an URL instead of a File would be more flexible?

Gilles

2008/1/10, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> > -Ursprüngliche Nachricht-
> > Von: Stefan Bodewig [mailto:[EMAIL PROTECTED]
> > Gesendet: Donnerstag, 10. Januar 2008 06:10
> > An: dev@ant.apache.org
> > Betreff: Re: ProjectHelper : parsing from InputStream
> >
> > "Benjamin de Dardel" <[EMAIL PROTECTED]> writes:
> >
> > > 1: Should I copy and rewrite ProjectHelperImpl for my personal use
> > > ?
> >
> > You can do that, if you want to 8-)
> >
> > > Or is there another way
> >
> > No, there isn't.  See below.
> >
> > > 2: Do you need my contribution for refactoring helpers to accept
> > > multiple sources ?
> >
> > We've started discussing this more than once but never came to a
> > solution that ended up in svn.  If you want to help us not dropping
> > the ball, you are welcome.
> >
> > The problem is a bit more complex than just allowing a different
> > source.  The main problem are build files that do not specify a
> > basedir attribute on the project tag since Ant then uses the directory
> > holding the build file to resolve relative file references - which
> > certainly doesn't work if it doesn't have a File reference pointing to
> > the input.
>
>
> Could the API require specifying the basedir?
>
>   /**
>* Parses the given buildfile.
>* @param is InputStream providing the content of the buildfile
>* @param basedir The (absolute) basedir for use in the project
>*if the parsed buildfile doesnt specify an absolute
>*path.
>*/
>   parse(InputStream is, File basedir);
>
>   is() + basedir="C:/temp" --> c:/temp
>   is( c:/temp
>   is( C:/
>   is() + basedir="C:/temp" --> D:
>
>   is() + basedir=null --> D:
>   is() + basedir=null --> exception
>   is() + basedir=null -->
> on windows: root directory of the system drive
> on unix   : root directory '/'
>   is() + basedir=null --> exception
>
>
>
> Jan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


AW: ProjectHelper : parsing from InputStream

2008-01-09 Thread Jan.Materne
> -Ursprüngliche Nachricht-
> Von: Stefan Bodewig [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 10. Januar 2008 06:10
> An: dev@ant.apache.org
> Betreff: Re: ProjectHelper : parsing from InputStream
> 
> "Benjamin de Dardel" <[EMAIL PROTECTED]> writes:
> 
> > 1: Should I copy and rewrite ProjectHelperImpl for my personal use
> > ?
> 
> You can do that, if you want to 8-)
> 
> > Or is there another way
> 
> No, there isn't.  See below.
> 
> > 2: Do you need my contribution for refactoring helpers to accept
> > multiple sources ?
> 
> We've started discussing this more than once but never came to a
> solution that ended up in svn.  If you want to help us not dropping
> the ball, you are welcome.
> 
> The problem is a bit more complex than just allowing a different
> source.  The main problem are build files that do not specify a
> basedir attribute on the project tag since Ant then uses the directory
> holding the build file to resolve relative file references - which
> certainly doesn't work if it doesn't have a File reference pointing to
> the input.


Could the API require specifying the basedir?

  /**
   * Parses the given buildfile.
   * @param is InputStream providing the content of the buildfile
   * @param basedir The (absolute) basedir for use in the project
   *if the parsed buildfile doesnt specify an absolute
   *path. 
   */
  parse(InputStream is, File basedir);

  is() + basedir="C:/temp" --> c:/temp
  is( c:/temp
  is( C:/
  is() + basedir="C:/temp" --> D:

  is() + basedir=null --> D:
  is() + basedir=null --> exception
  is() + basedir=null --> 
on windows: root directory of the system drive
on unix   : root directory '/'
  is() + basedir=null --> exception



Jan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Locator bugs

2008-01-09 Thread Stefan Bodewig
"Alia B." <[EMAIL PROTECTED]> writes:

> I was trying to run ant (v1.7) via jsp but i'm getting
> java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Locator
> it works ok via java but not jsp, is this a configration problem or this is
> a bug?

The bug talked about in this thread is not related to your problem.

You seem to be missing ant-launcher.jar in your CLASSPATH when you
invoke Ant via the JSP.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ProjectHelper : parsing from InputStream

2008-01-09 Thread Stefan Bodewig
"Benjamin de Dardel" <[EMAIL PROTECTED]> writes:

> 1: Should I copy and rewrite ProjectHelperImpl for my personal use
> ?

You can do that, if you want to 8-)

> Or is there another way

No, there isn't.  See below.

> 2: Do you need my contribution for refactoring helpers to accept
> multiple sources ?

We've started discussing this more than once but never came to a
solution that ended up in svn.  If you want to help us not dropping
the ball, you are welcome.

The problem is a bit more complex than just allowing a different
source.  The main problem are build files that do not specify a
basedir attribute on the project tag since Ant then uses the directory
holding the build file to resolve relative file references - which
certainly doesn't work if it doesn't have a File reference pointing to
the input.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating information on current external task

2008-01-09 Thread Stefan Bodewig
Steve Loughran <[EMAIL PROTECTED]> writes:

> -speaking of which, how do I rebuild the site?

You need velocity or another Anakia built site tree on your machine (I
use the mail ASF-site) and then

ant -f docs.xml -Dsite.dir=path/to/site-tree

should do.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ivy:install

2008-01-09 Thread kermitt

I attached my previous post from user mailling. I take a moment tonight to
figure out the error.

In my mind, I wanted to synchronize two repositories which is not possible
regarding the code. As if overwrite is set to false an IOException is thrown
as soon as an existing artifact is found. 

I feel like synchronization would be a good feature, what do you think of?  

There is different way to handle the feature but it would requires API
change somehow. We need distingate the case of an exception of Input Output
and the "file already exist" case.

Some suggestions:

void publish(Artifact artifact, File src, boolean overwrite) throws
IOException, ExistingArtifactUncheckedException;

=> Would unify error message regarding duplicate as IOException is filled
with various message according the resolver.

void publish(Artifact artifact, File src, boolean overwrite,boolean
skipExistingFile) throws IOException;






Trace confuse me a bit , I am using SFTP and I would suggest to add to
SFTPRepository.java line 137:
if (!overwrite && checkExistence(destination, c)) {
throw new IOException("destination file " + destination + "
exists and overwrite == true");
}

regards,


Hello,

I have two repo : local , integration

I tried to use ivy:install to migrate my modules between them. 

After publishing in local, i start a new task to migrate new dependencies I
could have added to my local repo during my developpement:

  


[ivy:install] :: installing com.foo.test#Basic;1.53 ::
[ivy:install] :: resolving dependencies ::
[ivy:install]   found com.foo.test#Basic;1.53 in fs-local
[ivy:install]   found foo#AntCommon;1.39D in remote-private
[ivy:install]   found junit#junit;3.8.1 in remote-private
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] downloading
d:\javadev\local-repository\com.foo.test\Basic\jars\Basic-1.53.jar ...
[ivy:install] .. (1kB)
[ivy:install] .. (0kB)
[ivy:install]   [SUCCESSFUL ] com.foo.test#Basic;1.53!Basic.jar (20ms)
[ivy:install] :: installing in remote ::
[ivy:install]   published Basic to
./repository/private/com.foo.test/Basic/jars/Basic-1.53.jar
[ivy:install]   published ivy to
./repository/private/com.foo.test/Basic/ivy-1.53.xml
[ivy:install] missing artifact foo#AntCommon;1.39D!AntCommon.zip:
[ivy:install]
d:\javadev\repository\.ivy-cache\foo\AntCommon\zips\AntCommon-1.39D.zip file
does not exist

BUILD FAILED
C:\javadev\src\AntCommon\src\build-common.xml:321: impossible to install
com.foo.test#Basic;1.53: java.io.IOException: destination file exists and
overwrite == true

Total time: 1 minute 1 second



I tried with ivy 1.4.1 and ivy 2.0 beta 1 same error, if I put transitive to
false I don't get this error. I guess there is an issue with the artifact
being reprocessed one more time when transitive. 
I don't really want to put overwrite="true" because I have so many artifact
it would take too long ...


-- 
View this message in context: 
http://www.nabble.com/ivy%3Ainstall-tp14724560p14724560.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30094] - Performance enhancements using java.nio & lazy calls

2008-01-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30094


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #21368|java.nio changes against Ant|[faulty] java.nio changes
description|1.7.0, in unified diff  |against Ant 1.7.0, in
   |format  |unified diff format




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30094] - Performance enhancements using java.nio & lazy calls

2008-01-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30094


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #21368|0   |1
is obsolete||




--- Additional Comments From [EMAIL PROTECTED]  2008-01-09 12:06 ---
Created an attachment (id=21369)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21369&action=view)
java.nio changes against Ant 1.7.0, in unified diff format


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30094] - Performance enhancements using java.nio & lazy calls

2008-01-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30094





--- Additional Comments From [EMAIL PROTECTED]  2008-01-09 11:54 ---
Created an attachment (id=21368)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21368&action=view)
java.nio changes against Ant 1.7.0, in unified diff format

I have modified the original NIO changes and applied them against Ant 1.7.0.
These changes work with the new Resources framework.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating information on current external task

2008-01-09 Thread Steve Loughran

Bytes Looser wrote:


Hi,

I am the maintainer of an external task, idldepend, useful for Corba
projects.
I published the task in 2002, and submitted it to this list using a mail
address that I do not access anymore (and the address itself is lost now).
This has not been a problem for the time being, as I included my new mail
addresses in my homepage, at
http://grasia.fdi.ucm.es/~luismi/idldepend

However, this site has been down for a while, and I cannot control when it
will be up and running again, so I have created a new website, at
http://www.byteslooser.com/idldepend

I would like, therefore, to update the information related to this task, to
point to that web address and including my mail [EMAIL PROTECTED]

I guess there will be some problem to update it like this, not being able to
answer to the original mail address??



no, we trust you. Whoever keeps the source up to date gets the links.

I've just checked in the changes...when the site is rebuilt the changes 
go out.


-speaking of which, how do I rebuild the site?



--
Steve Loughran  http://www.1060.org/blogxter/publish/5
Author: Ant in Action   http://antbook.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Linking to log files from generated JUnit reports

2008-01-09 Thread Steve Loughran

s p wrote:

Hi,

I'm am currently working on a patch for Ant 1.7 which would enable linking to logfiles from generated JUnit reports. The logfiles that are linked to would be logfiles generated by the application that is tested through JUnit supported Unit/Integration tests. 


To be able to do this I am adding a 'logdir' attribute to the junitreport task 
which specifies a root directory for logfiles. In the junit-frames.xsl, when 
generating the class.details, when a logfile matching the name of the classfile 
is found, a link will appear in the same way links will appear when there has 
been output to stdout or stderr when running the test.

Will any of you be interested in this patch ?

It would be great if this could be included in the Ant head branch. But if it 
won't we should consider not adapting the junitreport target but rather use our 
own stylesheet to override the one junitreport uses by default.



Interesting thought.

If you look at http://wiki.apache.org/ant/Proposals/EnhancedTestReports 
you can see what I'm thinking of in terms of improvements to the junit XML.


I wouldnt want to see explicit support for logs, because there are so 
many other things to add to test runs as attachments/links. the output 
of a program should be something you can just get at.


that said, logs are interesting as you may want a test run that grabs 
output at more detail than classic stdout/stderr, but instead use the 
full log4j/commons-logging/java.util.logging levels and have that 
handled in the main GUI, which means we could consider better logging 
inside the XML file itself -as long as that doesnt break other systems.


I'd like more people involvved in this; add your name to the list and 
let's start making progress on it!


--
Steve Loughran  http://www.1060.org/blogxter/publish/5
Author: Ant in Action   http://antbook.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ant Documentation

2008-01-09 Thread Steve Loughran

Matt Benson wrote:

You can also read about the gendoc sandbox Antlib at
http://ant.apache.org/antlibs/sandbox.html .  For some
reason this has been in the sandbox over 2.5 years.  I
don't know where the time has gone...



we use this @work to generate docs for libraries other than Ant 
itself...it would be nice to be able to generate docs of ant tasks that 
work outside ant's own manual


At work I'd be happy with java1.5+ annotations for this...for java1.4 
and below we could use whatever testng does to get the tags from javadocs.



Regarding docbook, I would be -1 to writing our docs themselves in 
docbook, +1 for some format that could be turned into docbook. Why? 
because docbook is pretty low level. You may have an emphasis section 
rather than  or , but you would be better off with 
project-specific XML clauses/or at least div/span IDs, e,g id="taskname" />, , so that you can choose better 
formatting from XML.


For docbook I've used the xml toolchain that goes through LateX; printed 
output is very nice.




--
Steve Loughran  http://www.1060.org/blogxter/publish/5
Author: Ant in Action   http://antbook.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]