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).

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.

I should had a closer look at your resolver above before answering your email. I still don't understand why you have this delay. But you would not only need such a cache resolver for changing dependencies, right? Because for non changing dependencies ivy is smart enough (if configured properly) first to look into the cache before trying a remote resolve.

- 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