Discussion:
Having sonar run in offline mode
dcabasson
2009-10-19 20:50:30 UTC
Permalink
Hi guys,

I am trying my best to set up sonar in an offline environment.

I currently have a hudson server working just fine in this offline
environment. It is hosted on a server not physically connected to Internet
(So not many other options there). Whenever I need something, I go retrieve
it from internet, and copy it over to this server, using my USB key.

Now, on top of hudson, I'd like to have sonar working. I have installed the
server and it seems to be doing pretty fine. The problem is when I run the
sonar maven plugin, I have the error :
[INFO] Can not execute Sonar

Embedded error: Unable to build project for plugin
'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM
'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in
repository: System is offline.

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20091019163638

What I did to solve that is I ran a local sonar server on a computer on
internet, and ran the maven goal to collect all needed artifacts in my
repository. I then copied those artifacts to the repository on the offline
machine.
The issue is that on my local PC all the artifacts in the maven repository
under org.codehaus.sonar.runtime are tagged at 20091019121715 (which is the
start time of my server in local) and not the above timestamp (which the
start time on the offline server).

How can I manage to change the timestamp the server is looking for? Changing
it for all artifacts would be quite painful (as it is in folder name, file
names, and the pom itself). Is there a way to override this timestamp that
sonar is looking for?

Thanks for your help!
Denis.
--
View this message in context: http://www.nabble.com/Having-sonar-run-in-offline-mode-tp25965302p25965302.html
Sent from the Sonar user mailing list archive at Nabble.com.
Olivier Gaudin
2009-10-20 13:23:10 UTC
Permalink
Hello Denis,

Here is a article describing how Sonar acts as a maven repository and a
pointer to a discussion describing how to do this.

http://sonar.codehaus.org/we-had-a-dream-mvn-sonarsonar/

http://www.nabble.com/Using-Sonar-in-Offline-mode-td22411673.html#a22411673

Hope this helps

Olivier
Post by dcabasson
Hi guys,
I am trying my best to set up sonar in an offline environment.
I currently have a hudson server working just fine in this offline
environment. It is hosted on a server not physically connected to Internet
(So not many other options there). Whenever I need something, I go retrieve
it from internet, and copy it over to this server, using my USB key.
Now, on top of hudson, I'd like to have sonar working. I have installed the
server and it seems to be doing pretty fine. The problem is when I run the
[INFO] Can not execute Sonar
Embedded error: Unable to build project for plugin
'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM
'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in
repository: System is offline.
org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20091019163638
What I did to solve that is I ran a local sonar server on a computer on
internet, and ran the maven goal to collect all needed artifacts in my
repository. I then copied those artifacts to the repository on the offline
machine.
The issue is that on my local PC all the artifacts in the maven repository
under org.codehaus.sonar.runtime are tagged at 20091019121715 (which is the
start time of my server in local) and not the above timestamp (which the
start time on the offline server).
How can I manage to change the timestamp the server is looking for? Changing
it for all artifacts would be quite painful (as it is in folder name, file
names, and the pom itself). Is there a way to override this timestamp that
sonar is looking for?
Thanks for your help!
Denis.
--
http://www.nabble.com/Having-sonar-run-in-offline-mode-tp25965302p25965302.html
Sent from the Sonar user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Denis Cabasson
2009-10-21 03:33:21 UTC
Permalink
Hi Olivier, (Are you French?)

I already had the pointer to the discussion below, but the discussion
only describes the standard way maven is working offline (to my knowledge).

The first doc is quite interesting, but that pretty much the
understanding I had come to. I guess my issue is with step 1 about the
maven repositories synchronisation. I just don't understand at that
point why all the content of this repository (stored under
org.codehaus.sonar.runtime if I understand correctly) has to be
versionned at the time of the container starts, against the standard way
maven is versionning its artifacts.

Anyway, I have move forward by using the dreaded method of moving the
timestamps of my local repository to the right timestamp (I have a
python script to do that if you are interested), but I am now hitting
classloader issues in maven/hudson (something about jdom). I will try to
solve that one tomorrow (by upgrading hudson and using the sonar hudson
plugin), but I might come back to you if nothing fits together.

Thanks for you help!
Denis.
Post by Olivier Gaudin
Hello Denis,
Here is a article describing how Sonar acts as a maven repository and
a pointer to a discussion describing how to do this.
http://sonar.codehaus.org/we-had-a-dream-mvn-sonarsonar/
http://www.nabble.com/Using-Sonar-in-Offline-mode-td22411673.html#a22411673
Hope this helps
Olivier
Hi guys,
I am trying my best to set up sonar in an offline environment.
I currently have a hudson server working just fine in this offline
environment. It is hosted on a server not physically connected to Internet
(So not many other options there). Whenever I need something, I go retrieve
it from internet, and copy it over to this server, using my USB key.
Now, on top of hudson, I'd like to have sonar working. I have installed the
server and it seems to be doing pretty fine. The problem is when I run the
[INFO] Can not execute Sonar
Embedded error: Unable to build project for plugin
'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM
'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in
repository: System is offline.
org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20091019163638
What I did to solve that is I ran a local sonar server on a computer on
internet, and ran the maven goal to collect all needed artifacts in my
repository. I then copied those artifacts to the repository on the offline
machine.
The issue is that on my local PC all the artifacts in the maven repository
under org.codehaus.sonar.runtime are tagged at 20091019121715 (which is the
start time of my server in local) and not the above timestamp (which the
start time on the offline server).
How can I manage to change the timestamp the server is looking for? Changing
it for all artifacts would be quite painful (as it is in folder name, file
names, and the pom itself). Is there a way to override this timestamp that
sonar is looking for?
Thanks for your help!
Denis.
--
http://www.nabble.com/Having-sonar-run-in-offline-mode-tp25965302p25965302.html
Sent from the Sonar user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Marco.Boschetti-hw/
2009-10-21 08:06:20 UTC
Permalink
Return Receipt

Your Re: [sonar-user] Having sonar run in offline mode
document:

was Marco Boschetti/CSI/IT
received
by:

at: 21/10/2009 10.06.27

Loading...