maven-profile-selector
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMaven Profile Selector
Maven Profile 选择器
This skill helps you select and manage Maven profiles for different network configurations.
本Skill可帮助您为不同的网络配置选择和管理Maven profiles。
When to Use This Skill
何时使用本Skill
Use this skill when the user:
- Switch between different network environments (e.g., development, staging, production) that require different Maven profiles.
当用户需要以下操作时使用本Skill:
- 在不同的网络环境(如开发、预发布、生产)之间切换,而这些环境需要不同的Maven profiles。
Workflow
工作流程
- Ensure is installed and available in the system PATH.
mvn - Check the file for available profiles relative to
settings.xml, such asmvn'smvndirectory.conf - Present the user with a list of available profiles and their descriptions.
- Allow the user to select a profile.
- Ask the user whether to change profile, and if confirmed, set the selected profile as the active profile for Maven commands.
- For all subsequent Maven commands, use the selected profile until the user decides to switch again. Replace './mvnw' with and add
mvn.-P <selected_profile>
- 确保已安装且在系统PATH中可用。
mvn - 检查文件中与
settings.xml相关的可用profiles,例如mvn的mvn目录下的配置。conf - 向用户展示可用profiles的列表及其描述。
- 允许用户选择一个profile。
- 询问用户是否要更改profile,若确认,则将所选profile设置为Maven命令的激活profile。
- 在后续所有Maven命令中,使用所选profile,直到用户决定再次切换。将'./mvnw'替换为并添加
mvn参数。-P <selected_profile>
Example
示例
User: I need to switch environment for my Maven project.
Assistant: Sure! Here are the available Maven profiles in your :
settings.xml- Home - Profile for Home environment
- Stuff - Profile for Stuff environment
- Trip - Profile for Trip environment Please select the profile you want to use (1, 2, or 3).
用户:我需要为我的Maven项目切换环境。
助手:没问题!以下是您中的可用Maven profiles:
settings.xml- Home - 家庭环境专用Profile
- Stuff - 办公环境专用Profile
- Trip - 差旅环境专用Profile 请选择您要使用的profile(1、2或3)。