On Nov 4, 2008, at 9:08 AM, mvlcek wrote:


I just tried to build my project without network connectivity.

When the enterprise repository is not available, I just configure the gradle
cache as repository:

def cache = System.getProperty('user.home') + '/.gradle/ cache'
            classpathResolvers.add(new FileSystemResolver()) {
                name = 'cache'
                checkmodified = true
                latest = 'latest-time'
                changingPattern = '.*SNAPSHOT'
                ivyPatterns = [ cache +
'/[organisation]/[module]/ivy-[revision].xml' ]
                artifactPatterns = [ cache +
'/[organisation]/[module]/jars/[artifact]-[revision].[type]' ]
            }

However, it seems that in the beginning gradle tries to access another
repository, which of course is not available either. This takes a long time
(~30s):

:: loading settings :: url =
jar:file:/usr/share/gradle/lib/ivy-2.0.0.cr1_20080911151837.jar!/ org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.gradle#build;SNAPSHOT
        confs: [build]
:: resolution report :: resolve 48ms :: artifacts dl 0ms
        
Later, the step
++ Loading Project objects
takes quite long too.

What is gradle doing? It should never access any network resource (but the defined repositories) during build! If this is a update feature, it should
only happen on request (check-update command line option).

Gradle has some two build-in resolvers. One resolves from memory, the other from a filesystem dir within the project. There are is no updating functionality yet.

I have set up a wiki page on our resolver structure: http:// docs.codehaus.org/display/GRADLE/Gradle+Resolver+Setup

If you run Gradle with -d you get the Ivy debug output. I have no idea what is going on. I can use Gradle without network connections. What happens if you build Gradle without network connection on your machine? All our jars are in svn, so the build works without network connection.


Additionally I would like it, if gradle would automatically fall back to using the ivy cache, if no repository is given or the repository is not
available.

How would you set up Ivy for this?

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to