How to force Sonatype Nexus Regenerate / Reindex its Metadata?

17,021 views
Skip to first unread message

Pilgrim, Peter

unread,
Jan 7, 2010, 6:06:53 AM1/7/10
to jav...@googlegroups.com

Hi

 

Does anyone reliably know to force Nexus Open Source (v1.4.0) to update its meta-data?

 

I have been copying dependencies from local ~/.m2/repository to a remote server running Nexus. I do this by hand or using a script because there a lot more artefacts to move over.

 

The combination of mouse click on the Web UI

 

  1. Goto “view/repos” on the right hand pane, then click on “Repositories” and then  

 

  1. Right click on the target repository, select Expire Cache

 

  1. Right click on the target repository, select Reindex

 

  1. Right click on the target repository, select Metadata

 

The repo manager just does not update the metadata or seem to recognise that I copied over

 

Weblogic-server/weblogic/10.0.3/*.{jar|pom}

 

And consequently build systems fails. Any ideas appreciated? Ta

 

--

Peter Pilgrim | E-Channel Services, Technical Lead, eBusiness

Lloyds Banking Group | Wholesale Markets & Treasury IT

33 Old Broad Street, London, EC2N 1HZ, UK

' +44 (0)207 158 6135 | ( +44 (0)1234 567 8901

+ peter....@lloydsbanking.com

: www.lloydsbankinggroup.com

 

 



This e-mail is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments.

Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland, number 95000. Telephone: 0131 225 4555.

Lloyds TSB Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales, number 2065. Telephone: 020 7626 1500.

Lloyds TSB Scotland plc. Registered Office: Henry Duncan House, 120 George Street, Edinburgh EH2 4LH. Registered in Scotland, number 95237. Telephone: 0131 225 4555.

Cheltenham & Gloucester plc. Registered Office: Barnett Way, Gloucester GL4 3RL. Registered in England and Wales, number 2299428. Telephone: 01452 372372.

Cheltenham & Gloucester Savings is a division of Lloyds TSB Bank plc.
Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester plc are authorised and regulated by the Financial Services Authority.

Telephone calls may be monitored or recorded.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

Pilgrim, Peter

unread,
Jan 7, 2010, 6:59:18 AM1/7/10
to jav...@googlegroups.com

I figured it out.

 

Nexus 1.4.0 comes a new Incremental Reindex and Rebuild Metadata.

 

Goto the “views/repositories” and then click on the “Repositories” link.

 

Under the repository detail on the central pane, you will see “browse storage” , “browse index”, “config” etc.

 

Clik on “Browse Index” , use the search to find the parent of the dependencies that you want to force regeneration on.

For instance I had missing

 

 [INFO] Unable to find resource 'org.apache.maven.surefire:surefire-providers:pom:2.4.3' in repository central (http://ltsbci:8080/nexus/content/groups/public-all)

 

So I navigated to “org/apache/maven/surefire/” in order to force partial regeneration of the repo.

 

On that node I selected in this special order the commands, one by one: “Expire Cache”, “Incremental ReIndex” and then “Rebuild Metadata”. The last item is the most important.

 

(You will notice in the Nexus logs the merging of the metadata going up the tree to virtual repos (groups))

 

HTHSB

--

Peter Pilgrim | E-Channel Services, Technical Lead, eBusiness

Lloyds Banking Group | Wholesale Markets & Treasury IT

33 Old Broad Street, London, EC2N 1HZ, UK

' +44 (0)207 158 6135 | ( +44 (0)1234 567 8901

+ peter....@lloydsbanking.com

: www.lloydsbankinggroup.com

 

Richard Gomes

unread,
Jan 7, 2010, 4:46:27 PM1/7/10
to jav...@googlegroups.com
I've read an email where the guy talks about Nexus .vs. Artifactory.
I don't have any experience with Nexus so, I'm basically replaying his words, more or less:
Artifactory employs JCR in order to keep the repository coherent because JCR is transactional, whilst Nexus keeps the repository in the file system, which is more flexible when you are employing other tools in order to copy stuff from one repository to another. Seems like this is another flame war! :)

Cheers

Richard Gomes


Pilgrim, Peter wrote:


--
You received this message because you are subscribed to the Google Groups "JAVAWUG" group.
To post to this group, send email to jav...@googlegroups.com.
To unsubscribe from this group, send email to javawug+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javawug?hl=en.
Reply all
Reply to author
Forward
0 new messages