Quantcast

Toward faster builds?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Toward faster builds?

Fred Bricon
Hi,

When building m2eclipse from maven CLI, I sometimes need it to be fast, meaning :
build offline and don't run tests. But :
Issue #1 : seems I can't run mvn install -o ..., since dependencies won't be resolved when offline. I found this to be already reported in https://issues.sonatype.org/browse/TYCHO-338

Issue #2  : Then, when letting the build go online, I noticed the same repositories are resolved several times :

log4j:WARN Please initialize the log4j system properly.
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
[INFO] Adding repository http://download.eclipse.org/releases/galileo
[INFO] Adding repository http://download.eclipse.org/releases/galileo
[INFO] Adding repository http://download.eclipse.org/technology/swtbot/galileo/d
ev-build/update-site/
[INFO] Adding repository http://download.eclipse.org/technology/swtbot/galileo/d
ev-build/update-site/
[WARNING] No explicit target runtime environment configuration. Build is platfor
m dependent.
[INFO] Resolving target platform for project MavenProject: org.maven.ide.eclipse
:org.maven.ide.eclipse.archetype_common:0.11.0-SNAPSHOT @ C:\Projets\M2ECLIPSE\m
2eclipse-core\org.maven.ide.eclipse.archetype_common\pom.xml
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
[INFO] Adding repository (cached) http://download.eclipse.org/releases/galileo
[INFO] Adding repository (cached) http://download.eclipse.org/technology/swtbot/
galileo/dev-build/update-site/
 

Repository resolution takes 3-5 seconds for each repo, but then later during the build, repos are cached, thus allowing faster processing. I looked at https://issues.sonatype.org/browse/TYCHO-447 but since Tycho 0.9.0 is already out , I wonder if it's the same bug or not. Any thoughts?

regards,

Fred Bricon

"Have you tried turning it off and on again" - The IT Crowd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Toward faster builds?

Igor Fedorenko-2
It's hard to tell anything conclusive without time profile of the build,
but here are few general comments and observations

P2 treats metadata and artifact repositories separately, this is why you
see "Adding repository ..." message twice. Nothing to worry about here.

P2 repository metadata can get quite big, so depending on your hardware
it may take a second or two just to read and parse content.xml file from
local disk.

Due to a bug (or misunderstood feature) in p2 3.6, it always checks if
remote repository has p2.index file. I was told this file was optional
and failures to access it were silently ignored.

We have integration test [1] to make sure Tycho build works offline and
I double checked by build and rebuilding m2eclipse-tycho with cable
unplugged.


[1]
http://github.com/sonatype/sonatype-tycho/blob/master/tycho-its/src/test/java/org/sonatype/tycho/test/TYCHO338offlineMode/OfflineModeTest.java

--
Regards,
Igor

Fred Bricon wrote:

> Hi,
>
> When building m2eclipse from maven CLI, I sometimes need it to be fast,
> meaning :
> build offline and don't run tests. But :
> Issue #1 : seems I can't run *mvn install -o *..., since dependencies
> won't be resolved when offline. I found this to be already reported in
> https://issues.sonatype.org/browse/TYCHO-338
>
> Issue #2  : Then, when letting the build go online, I noticed the same
> repositories are resolved several times :
>
> log4j:WARN Please initialize the log4j system properly.
> [INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
> [INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
> [INFO] Adding repository http://download.eclipse.org/releases/galileo
> [INFO] Adding repository http://download.eclipse.org/releases/galileo
> [INFO] Adding repository
> http://download.eclipse.org/technology/swtbot/galileo/d
> ev-build/update-site/
> [INFO] Adding repository
> http://download.eclipse.org/technology/swtbot/galileo/d
> ev-build/update-site/
> [WARNING] No explicit target runtime environment configuration. Build is
> platfor
> m dependent.
> [INFO] Resolving target platform for project MavenProject:
> org.maven.ide.eclipse
> :org.maven.ide.eclipse.archetype_common:0.11.0-SNAPSHOT @
> C:\Projets\M2ECLIPSE\m
> 2eclipse-core\org.maven.ide.eclipse.archetype_common\pom.xml
> [INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
> [INFO] Adding repository http://download.eclipse.org/eclipse/updates/3.5
> *[INFO] Adding repository (cached)
> http://download.eclipse.org/releases/galileo
> *[INFO] Adding repository (cached)
> http://download.eclipse.org/technology/swtbot/*
> *galileo/dev-build/update-site/
>  
>
> Repository resolution takes 3-5 seconds for each repo, but then later
> during the build, repos are cached, thus allowing faster processing. I
> looked at https://issues.sonatype.org/browse/TYCHO-447 but since Tycho
> 0.9.0 is already out , I wonder if it's the same bug or not. Any thoughts?
>
> regards,
>
> Fred Bricon
>
> "Have you tried turning it off and on again" - The IT Crowd
Loading...