Skip to content

Commit c4f0637

Browse files
committed
feat: update readme with nexus-list
Signed-off-by: sebastien.heurtematte <sebastien.heurtematte@eclipse-foundation.org>
1 parent dc9cec2 commit c4f0637

File tree

1 file changed

+4
-102
lines changed

1 file changed

+4
-102
lines changed

README.md

Lines changed: 4 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ A comprehensive Maven plugin for managing artifact synchronization to Maven Cent
3636
- [rc-drop](#rc-drop)
3737
- [rc-list](#rc-list)
3838
- [rc-status](#rc-status)
39+
- [nexus-list](#nexus-list)
3940
- [Plugin Parameters](#plugin-parameters)
4041
- [Core Configuration Parameters](#core-configuration-parameters)
4142
- [Repository Configuration Parameters](#repository-configuration-parameters)
@@ -652,30 +653,15 @@ mvn central-staging-plugins:rc-status \
652653
### nexus-list
653654

654655
Search and list artifacts from a Nexus Repository Manager instance:
656+
655657
```bash
656658
mvn central-staging-plugins:nexus-list \
659+
-Dnexus.showDetails=true \
657660
-Dnexus.serverId=nexus \
658661
-Dnexus.repository=releases \
659662
-Dnexus.group=org.eclipse.cbi
660663
```
661664

662-
**Key Features:**
663-
664-
- Search artifacts across Nexus repositories using the REST API
665-
- Filter by repository, group (namespace), artifact ID, and version
666-
- Automatically uses project coordinates when run in a Maven project directory
667-
- Display artifact information with versions
668-
- Optional detailed view showing download URLs and asset information
669-
- Support for execution without a Maven project
670-
671-
**Common Use Cases:**
672-
673-
- List all versions of an artifact in a Nexus repository
674-
- Search for artifacts by group ID across repositories
675-
- Find specific artifact versions before download or deployment
676-
- Verify artifact availability in Nexus before publishing
677-
- Audit repository content
678-
679665
**nexus-list Parameters:**
680666

681667
| Parameter | Type | Default | Description |
@@ -690,94 +676,10 @@ mvn central-staging-plugins:nexus-list \
690676
| `nexus.bearerCreate` | Boolean | `false` | Create bearer token from username:password in settings.xml |
691677
| `nexus.apiUrl` | String | `https://repo3.eclipse.org/service/rest/v1` | Nexus Repository Manager API base URL |
692678

693-
**List Configuration:**
694-
695-
```bash
696-
# List artifacts for current project (uses project groupId and artifactId)
697-
mvn central-staging-plugins:nexus-list -Dnexus.serverId=nexus
698-
699-
# List all artifacts in a specific group across all repositories
700-
mvn central-staging-plugins:nexus-list \
701-
-Dnexus.group=org.eclipse.cbi \
702-
-Dnexus.serverId=nexus
703-
704-
# List artifacts in a specific repository with detailed information
705-
mvn central-staging-plugins:nexus-list \
706-
-Dnexus.repository=releases \
707-
-Dnexus.group=org.eclipse.cbi \
708-
-Dnexus.artifact=central-staging-plugins \
709-
-Dnexus.showDetails=true
710-
711-
# List specific version
712-
mvn central-staging-plugins:nexus-list \
713-
-Dnexus.repository=releases \
714-
-Dnexus.group=org.eclipse.cbi \
715-
-Dnexus.artifact=central-staging-plugins \
716-
-Dnexus.version=1.2.0
717-
718-
# Execute without a Maven project (requires explicit group parameter)
719-
mvn org.eclipse.cbi.central:central-staging-plugins:1.2.1-SNAPSHOT:nexus-list \
720-
-Dnexus.group=org.eclipse.cbi \
721-
-Dnexus.serverId=nexus
722-
723-
# Use custom Nexus instance
724-
mvn central-staging-plugins:nexus-list \
725-
-Dnexus.apiUrl=https://nexus.example.com/service/rest/v1 \
726-
-Dnexus.group=com.example \
727-
-Dnexus.serverId=my-nexus
728-
```
729-
730-
**Output Format:**
731-
732-
The goal displays found artifacts in a clear format:
733-
```
734-
[INFO] Found 3 artifact(s):
735-
[INFO] ─────────────────────────────────────────────────────────────
736-
[INFO] • org.eclipse.cbi:central-staging-plugins:1.0.0
737-
[INFO] • org.eclipse.cbi:central-staging-plugins:1.1.0
738-
[INFO] • org.eclipse.cbi:central-staging-plugins:1.2.0
739-
```
740-
741-
With `nexus.showDetails=true`, additional information is displayed:
742-
```
743-
[INFO] • org.eclipse.cbi:central-staging-plugins:1.2.0
744-
[INFO] Repository: releases
745-
[INFO] Format: maven2
746-
[INFO] Component ID: b3JnLmVjbGlwc2UuY2JpOmNlbnRyYWwtc3RhZ2luZy1wbHVnaW5zOjEuMi4w
747-
[INFO] Assets (4):
748-
[INFO] - org/eclipse/cbi/central-staging-plugins/1.2.0/central-staging-plugins-1.2.0.pom
749-
[INFO] URL: https://repo3.eclipse.org/repository/releases/org/eclipse/...
750-
[INFO] Type: application/xml
751-
[INFO] - org/eclipse/cbi/central-staging-plugins/1.2.0/central-staging-plugins-1.2.0.jar
752-
[INFO] URL: https://repo3.eclipse.org/repository/releases/org/eclipse/...
753-
[INFO] Type: application/java-archive
754-
```
755-
756-
**Performance Tips:**
679+
**Tips:**
757680

758681
- Always specify `nexus.repository` when possible for optimal search performance
759-
- The goal will display a warning when `nexus.repository` is not set
760-
- Use specific group and artifact filters to narrow search results
761-
- Use `nexus.version` to find a specific release
762-
763-
**Authentication Setup:**
764682

765-
Configure authentication in `settings.xml`:
766-
```xml
767-
<servers>
768-
<server>
769-
<id>nexus</id>
770-
<password>your-token-here</password>
771-
</server>
772-
</servers>
773-
```
774-
775-
Or provide token directly:
776-
```bash
777-
mvn central-staging-plugins:nexus-list \
778-
-Dnexus.bearerToken=your-token-here \
779-
-Dnexus.group=org.eclipse
780-
```
781683

782684
**rc-status Parameters**:
783685

0 commit comments

Comments
 (0)