I'll give this a try, if it works on Mac then I'm fine with the change.

On Tue, Jul 5, 2011 at 1:04 PM, Chris Poulsen <mailingl...@nesluop.dk> wrote:
> Hi,
>
> I decided to take another stab at getting tapestry-ioc tests running on my
> windows machine.
>
> It turns out that the creation of the temp-dir in ReloadTest.java doesn't
> work 100% like expected on windows. The generated url ends up as:
> "file:c:/blahblah/xxxx/" while it should be "file:/c:/blahblah/xxxx/" (slash
> before the drive letter).
>
> The following trivial change seems to fix it on windows, I don't know about
> other OS'es as my unix box is currently offline, but I guess the following
> solution has a good chance of working across the board:
>
> C:\code\framework\tapestry5>svn diff
> Index: tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/ReloadTest.java
> ===================================================================
> --- tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/ReloadTest.java
> (revision 1143145)
> +++ tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/ReloadTest.java
> (working copy)
> @@ -17,6 +17,7 @@
>  import java.io.File;
>  import java.io.IOException;
>  import java.lang.reflect.Modifier;
> +import java.net.URI;
>  import java.net.URL;
>  import java.net.URLClassLoader;
>
> @@ -68,7 +69,7 @@
>
>         // URLClassLoader REQUIRES that File URLs end with a slash! That's
> a half hour of my life gone!
>
> -        URL classesURL = new URL("file:" + classesDir.getCanonicalPath() +
> "/");
> +        URL classesURL =  new URL(classesDir.toURI().toString()+"/");
>
>         System.out.println("Reload classes dir: " + classesURL);
>
>
> Also I think this test may leave its "temp-dir" behind after completion? It
> is possible to register a deletion hook ( File.deleteOnExit() ) on the
> file/directory object, but I can't find anywhere its being set.
>
> It would be nice if a solution that works on both *nix and windows can be
> found for the ReloadTest.
>
> --
> Chris
>
>
> On Thu, Jun 30, 2011 at 10:47 AM, Chris Poulsen <mailingl...@nesluop.dk>wrote:
>
>> Hi,
>>
>> I'm pretty sure that this isn't firewall related (windows firewall is
>> disabled on the network locations where I've tested this).
>>
>> All ioc tests (except the 5 execute) successfully. The error message:
>>
>> Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
>>
>> does not look like its a failed connect? Google suggests its related to
>> opening a file located in a jar.
>>
>> - Guess I'll have to figure out how to attach a debugger to the gradle
>> build to see whats going on.
>>
>> --
>> Chris
>>
>>
>> 2011/6/30 François Facon <francois.fa...@atosorigin.com>
>>
>>> During IOC Test task GradleMain open a connection on port 443 https.
>>> Perhaps you have to check your firewall configuration to make sure
>>> your system allow this kind of connection.
>>>
>>> François
>>>
>>>
>>>
>>> 2011/6/30 Chris Poulsen <mailingl...@nesluop.dk>:
>>> > Hi,
>>> >
>>> > Yeah, gradle reported the line of the error, so I figured it was related
>>> to
>>> > something like that. Its no biggie for me, I just thought you wanted to
>>> > know.
>>> >
>>> > I'm more concerned about the 5 failing ioc tests, any pointers on how to
>>> get
>>> > those tests going?
>>> >
>>> > --
>>> > Chris
>>> >
>>> > On Thu, Jun 30, 2011 at 12:35 AM, Josh Canfield <joshcanfi...@gmail.com
>>> >wrote:
>>> >
>>> >> > *) Clean checkout, executing "gradle idea" fails, with some minus-set
>>> >> > operator being null or something. Doing "gradle install" first lets
>>> the
>>> >> > next"gradle idea" do its magic successfully.
>>> >>
>>> >> That's my bad. I wanted build/generated-sources not be excluded.
>>> >>
>>> >> ideaModule.doFirst {
>>> >>  excludeDirs -= buildDir
>>> >>
>>> >>  def generatedDir = file("$buildDir/generated-sources")
>>> >>
>>> >>  def buildMinusGeneratedDir = (buildDir.listFiles() - generatedDir)
>>> >> as Set<File>
>>> >>
>>> >>  excludeDirs += buildMinusGeneratedDir
>>> >> }
>>> >>
>>> >> Apparently since the build directory isn't created yet it's failing. I
>>> >> suppose the XML generated could be tweaked instead....
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Jun 29, 2011 at 3:20 PM, Chris Poulsen <mailingl...@nesluop.dk
>>> >
>>> >> wrote:
>>> >> > Hi,
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>>> >> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>> >>
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>>
>>>
>>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to