El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts Artifact/ Best Practices/ Releasing Maven Components and Archiving to a Self-Hosted Repo

Releasing Maven Components and Archiving to a Self-Hosted Repo

Updated on 2025-02-07 GMT+08:00

Background

CodeArts Artifact focuses on and manages the staging software packages (usually built by or packed from the source code) and their lifecycle metadata. The metadata includes basic properties such as the name and size, repository paths, code branch information, build tasks, creators, and build time. Throughout the development process, the software package is continuously refined across different versions.

The management of software packages and their properties is the basis of release management. Therefore, developers need to regularly review the version history of software packages.

Preparations

Creating a Maven Repository and Associating It with a Project

  1. Log in to the CodeArts homepage and click a card to access a project.
  2. Choose Artifact > Self-hosted Repos from the navigation pane.
  3. Click , select Local Repository as the repository type, enter the repository name, and select Maven as the package type.
  4. Click Submit. The created Maven repository is displayed in the Repository View.
  5. In the Repository View, click the name of the target repository and click Settings.
  6. Click the Project Associations tab, click in the Operation column of the target project, and select target self-hosted repos in the displayed dialog box.
  7. Click OK.

Configuring Component Versions in Repo

  1. Log in to CodeArts and go to a created project.
  2. Choose Services > Repo on the top navigation bar.
  3. Click New Repository.
  4. Select a project from the Project drop-down list, select Template, and click Next.
  5. Search for the Java Maven Demo template, and click Next.
  6. Enter the repository name and click OK.
  7. Go back to Repo and click pom.xml to view the component configuration.

  8. On the component configuration page, the <version> field displays the version number of the current component. The default version number is 1.0.

    Click in the upper right corner of the page to change the version number. Then, click OK to save the changes.

Releasing Maven Components to a Self-Hosted Repo Through CodeArts Build

  1. After configuring the component version in Repo, click Create Build Task in the upper right corner of the page.
  2. Select Blank Template and click OK.
  3. Click Add Build Actions. Search for and add the Build with Maven action.

  4. Edit the Build with Maven action.

    • Select the desired tool version. In this example, maven3.5.3-jdk8-open is used.
    • Find the following command and delete # in front of this command:
      #mvn deploy -Dmaven.test.skip=true -U -e -X -B
      Find the following command and add # in front of this command:
      mvn package -Dmaven.test.skip=true -U -e -X -B
    • Select Configure all POMs under Release to Self-hosted Repos, and select the Maven repository associated with the project.

  5. Click Save and Run on the right of the page to start the build task.

Viewing Archived Components in the Version View of the Maven Repository

  1. Go to the self-hosted repo page, locate the target maven repository, and find the Maven component uploaded by build task.

    Repeat the preceding steps to set the component version in Repo and archive components of multiple versions to self-hosted repos.

  2. Click the Version View tab.

    In the package list, view the number of versions and the latest version of the package obtained from build tasks.

  3. Click a name in the Package Name column. The Overview page for the latest version of the package is displayed.
  4. Click the Files tab, click in the Operation column of the target component to download it to your local host.
  5. After modifying a component and setting a new version number, click Upload in the right of the target self-hosted repo to upload the latest version of the component.

    The package list in the version view displays the latest uploaded version of each component and the number of archived versions.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback