Commit: r2237: Merge of the build branch which uses ivy to obtain

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Commit: r2237: Merge of the build branch which uses ivy to obtain

svn commit

Version 2237 was commited by steve on 2012-03-05 22:14:54 +0000 (Mon, 05 Mar 2012)

Merge of the build branch which uses ivy to obtain
build dependencies.
See branch for detailed changes last change on branch at r2225
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Commit: r2237: Merge of the build branch which uses ivy to obtain

Gerd Petermann
Hi,

sorry, I should have noticed this earlier. The build works fine when I am connected
to the internet. The problem:
I am sometimes using a VPN connection to
the company I was working for. When this is established, I have no connection to
the "normal" internet. If that is the case, the build doesn't work, it hangs in target
"compile"  because that is depended on "download-ivy" (see below).
It's not a big problem for me, but maybe there is a simple way to avoid this?

Gerd

G:\mkgmap_all\trunk>ant
Buildfile: G:\mkgmap_all\trunk\build.xml

prepare:

ivy-availability:

download-ivy:

init-ivy:
[ivy:configure] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = G:\mkgmap_all\trunk\ivysettings.xml

resolve-compile:
Batchvorgang abbrechen (J/N)? j



svn commit wrote
Version 2237 was commited by steve on 2012-03-05 22:14:54 +0000 (Mon, 05 Mar 2012)

Merge of the build branch which uses ivy to obtain
build dependencies.
See branch for detailed changes last change on branch at r2225
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Commit: r2237: Merge of the build branch which uses ivy to obtain

Greg Troxel

GerdP <[hidden email]> writes:

> sorry, I should have noticed this earlier. The build works fine when I am
> connected
> to the internet. The problem:
> I am sometimes using a VPN connection to
> the company I was working for. When this is established, I have no
> connection to
> the "normal" internet. If that is the case, the build doesn't work, it hangs
> in target
> "compile"  because that is depended on "download-ivy" (see below).
> It's not a big problem for me, but maybe there is a simple way to avoid
> this?
Does it fail if you've previously run a build, or does this happen every
time.  Needing the net to resolve ivy dependencies once in a build tree
is one thing, but needing the net all the time seems too much.  (I
haven't tried without a network yet.)

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

attachment0 (200 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Commit: r2237: Merge of the build branch which uses ivy to obtain

Gerd Petermann
Hi Greg,

when I am connected I run ant and it builds everything. If I run ant again
 (without any changes, it goes through some steps and finishes as well.
Now I start my VPN connection. After that it hangs, so yes, the build depends on
the connection.

Gerd

Greg Troxel wrote
GerdP <[hidden email]> writes:

> sorry, I should have noticed this earlier. The build works fine when I am
> connected
> to the internet. The problem:
> I am sometimes using a VPN connection to
> the company I was working for. When this is established, I have no
> connection to
> the "normal" internet. If that is the case, the build doesn't work, it hangs
> in target
> "compile"  because that is depended on "download-ivy" (see below).
> It's not a big problem for me, but maybe there is a simple way to avoid
> this?

Does it fail if you've previously run a build, or does this happen every
time.  Needing the net to resolve ivy dependencies once in a build tree
is one thing, but needing the net all the time seems too much.  (I
haven't tried without a network yet.)

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Commit: r2237: Merge of the build branch which uses ivy to obtain

Steve Ratcliffe

On 06/03/12 15:32, GerdP wrote:
>                      so yes, the build
> depends on the connection.

Yes, it does depend, even though it never downloads the jars
again and doesn't need to. So I don't know why it should even
be looking.

If it can't be fixed in ivy, then I'll make ant not call ivy if
it knows that the jars are there.

..Steve
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Commit: r2237: Merge of the build branch which uses ivy to obtain

Richard Hansen
On 2012-03-06 10:41, Steve Ratcliffe wrote:
> On 06/03/12 15:32, GerdP wrote:
>> so yes, the build depends on the connection.
>
> Yes, it does depend, even though it never downloads the jars
> again and doesn't need to. So I don't know why it should even
> be looking.

Here's how it's supposed to work:

   1. if ivy.jar isn't available, download it
   2. use ivy to resolve dependencies (and their dependencies, recursively)
   3. if a dependency hasn't already been downloaded, download it to a
local cache (~/.ivy)
   4. copy the dependency from the local ivy cache to lib

I never tried it offline.  I expected Internet access to be required
only for steps #1 and #3, but apparently ivy also connects to the
Internet to perform step #2.

>
> If it can't be fixed in ivy, then I'll make ant not call ivy if
> it knows that the jars are there.

A quick Google search didn't yield a trivial solution to control this
via ivy, but there are some things to try.  I'll see what I can do to
make ivy more offline-friendly.

-Richard
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

[PATCH] allow offline Ivy dependency resolution

Richard Hansen
Hi all,

Attached is a patch that makes it possible to build mkgmap when offline.
  After applying this patch, you can build offline by running the following:

     ant -Divy.cache.ttl.default=eternal

I'm currently trying to figure out how to tweak build.xml to set
ivy.cache.ttl.default to eternal when offline but leave it alone when
online.  Once that is figured out, no special arguments will be needed
to build when disconnected from the Internet.

What this patch does:  The osmpbf dependency was erroneously marked with
changing="true".  This tells Ivy that the jar might change despite the
version number not changing, so always check the repository.  This is
usually used to express a dependency on the latest snapshot (e.g.,
nightly build) of a 3rd party project.  This is not the case with
osmpbf; its version number represents a fixed revision, so 'changing'
should be false.  This bug came from the Osmosis code I copied, so I'll
report it to them.

-Richard

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

0001-Remove-changing-true-from-osmpbf-dependency.patch (738 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] allow offline Ivy dependency resolution

Gerd Petermann
Hi Richard,

thanks, works fine for me.

Gerd

Richard Hansen wrote
Hi all,

Attached is a patch that makes it possible to build mkgmap when offline.
  After applying this patch, you can build offline by running the following:

     ant -Divy.cache.ttl.default=eternal

I'm currently trying to figure out how to tweak build.xml to set
ivy.cache.ttl.default to eternal when offline but leave it alone when
online.  Once that is figured out, no special arguments will be needed
to build when disconnected from the Internet.

What this patch does:  The osmpbf dependency was erroneously marked with
changing="true".  This tells Ivy that the jar might change despite the
version number not changing, so always check the repository.  This is
usually used to express a dependency on the latest snapshot (e.g.,
nightly build) of a 3rd party project.  This is not the case with
osmpbf; its version number represents a fixed revision, so 'changing'
should be false.  This bug came from the Osmosis code I copied, so I'll
report it to them.

-Richard

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev