Understanding Maven Configuration
Maven uses thesettings.xml file to configure repository access, authentication, and other build settings. This file can be configured at two levels:
- Global level: Located at
$MAVEN_HOME/conf/settings.xml - User level: Located at
~/.m2/settings.xml(recommended)
Prerequisites
- Apache Maven 3.9.7 or higher
- JDK 17
- Valid Aletyx subscription credentials
Don’t have subscription credentials, reach out to us!If you don’t have subscription credentials, reach out to us to get access.
Setting Up Your Maven Settings File
1. Locate or Create Your Settings File
First, check if you already have a user-levelsettings.xml file:
2. Configure the Aletyx Maven Repository
Edit yoursettings.xml file with the following configuration:
- Replace
YOUR_AUTH_TOKENwith your actual Aletyx authentication token provided with your subscription. - Leave any active profiles you currently have
3. Token Format
Your authentication token is provided as part of your Aletyx subscription, so there is nothing for you to generate. To find it:1
Sign in to My Aletyx
Go to my.aletyx.ai and sign in.
2
Copy your Repository Access Token
It is shown on the Profile page. Click Copy.
email@domain.com|generatedTokenString
This is not an AI Assistant API key.Your Repository Access Token comes with your subscription tier and covers both the Maven
repository and the Container Registry. The Aletyx AI Assistant is a separate product with
its own API keys. You do not need to enable the AI Assistant or start its free trial
to use the Maven repository.See Your Aletyx Credentials for the difference between the two.
Verifying Your Configuration
To verify your Maven settings configuration is working correctly:Common Issues and Troubleshooting
Authentication Failures
If you see errors like:- Your authentication token is correctly entered in the settings.xml file
- Your subscription is active
- The server ID in
<servers>matches the repository ID in<repositories>
Network Issues
If you’re behind a corporate firewall or proxy, you may need additional configuration:Enterprise Configuration Considerations
Repository Manager Integration
In enterprise environments, you may want to configure your organizational Maven repository manager (like Nexus or Artifactory) to proxy the Aletyx repository, rather than each developer configuring direct access.Secure Token Storage
For improved security in team environments, consider:- Using encrypted passwords in Maven settings
- Using environment variables with the Maven Environment Variables Extension
- Implementing a custom settings security solution for your organization