Having sonar run in offline mode

View: New views
4 Messages — Rating Filter:   Alert me  

Having sonar run in offline mode

by dcabasson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Re: Having sonar run in offline mode

by Olivier Gaudin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



On Mon, Oct 19, 2009 at 10:50 PM, dcabasson <denis.cabasson@...> wrote:

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.


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

   http://xircles.codehaus.org/manage_email




Re: Having sonar run in offline mode

by dcabasson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Olivier Gaudin a écrit :

> 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
>
>
>
> On Mon, Oct 19, 2009 at 10:50 PM, dcabasson <denis.cabasson@...
> <mailto:denis.cabasson@...>> wrote:
>
>
>     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.
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe from this list, please visit:
>
>        http://xircles.codehaus.org/manage_email
>
>
>


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

    http://xircles.codehaus.org/manage_email



Parent Message unknown Re: Having sonar run in offline mode

by mbosch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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                                          
                                                                           





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

    http://xircles.codehaus.org/manage_email