Nexus3-运维随记

来自三线的随记
Admin讨论 | 贡献2025年9月29日 (一) 11:49的版本

sonatype nexus3

一些orientdb SQL操作记录

基础登陆

java -jar ./lib/support/nexus-orient-console.jar

CONNECT PLOCAL:/nexus-data/db/component admin admin

按照repository 统计空间占用

select bucket.repository_name as repository,sum(size) as bytes from asset group by bucket.repository_name order by bytes desc limit 10;

Maven 仓库:按 groupId 汇总

SELECT gid, SUM(size) AS bytes, COUNT(*) AS files FROM ( SELECT attributes.maven2.groupId AS gid, size   FROM asset   WHERE bucket IN (SELECT @rid FROM bucket WHERE repository_name = 'upload-snapshot')  AND attributes.maven2.groupId IS NOT NULL ) GROUP BY gid ORDER BY bytes DESC LIMIT 200;