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.
--
View this message in context:
http://www.nabble.com/Build-without-repository--tp20317789p20317789.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email