IntelliJ IDEA
Configure IntelliJ IDEA and other JetBrains IDEs to work with CloudRepo repositories.
Overview
IntelliJ IDEA provides excellent support for Maven and Gradle projects, making CloudRepo integration straightforward through standard build tool configurations.
Maven Integration
IntelliJ automatically reads Maven settings from ~/.m2/settings.xml.
Configure Maven Settings
Open File → Settings (or IntelliJ IDEA → Preferences on macOS)
Navigate to Build, Execution, Deployment → Build Tools → Maven
Ensure “User settings file” points to your settings.xml with CloudRepo configuration
settings.xml Configuration
<settings>
<servers>
<server>
<id>cloudrepo</id>
<username>your-username</username>
<password>your-password</password>
</server>
</servers>
<profiles>
<profile>
<id>cloudrepo</id>
<repositories>
<repository>
<id>cloudrepo</id>
<url>https://[org-id].cloudrepo.io/repository/maven-releases</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>cloudrepo</activeProfile>
</activeProfiles>
</settings>
Gradle Integration
For Gradle projects, configure repositories in your build.gradle or build.gradle.kts.
Gradle Configuration
Open your Gradle build file
Add CloudRepo to repositories block:
repositories {
maven {
url "https://[org-id].cloudrepo.io/repository/maven-releases"
credentials {
username = project.findProperty("cloudrepoUsername") ?: System.getenv("CLOUDREPO_USERNAME")
password = project.findProperty("cloudrepoPassword") ?: System.getenv("CLOUDREPO_PASSWORD")
}
}
}
Add credentials to ~/.gradle/gradle.properties:
cloudrepoUsername=your-username
cloudrepoPassword=your-password
Repository Browser
Browse CloudRepo artifacts directly in IntelliJ:
Open View → Tool Windows → Maven (or Gradle)
Click the Repositories node
Your CloudRepo repositories appear with configured artifacts
Dependency Search
Search for CloudRepo artifacts:
Open pom.xml or build.gradle
Press Alt+Insert (or Cmd+N on macOS) in dependencies section
Search for artifacts by name
IntelliJ searches configured repositories including CloudRepo
Publishing Artifacts
Deploy artifacts to CloudRepo from IntelliJ:
Using Maven
Open Maven tool window
Navigate to Lifecycle
Double-click deploy
Using Gradle
Open Gradle tool window
Navigate to Tasks → publishing
Double-click publish
Troubleshooting
Dependency Resolution Issues
Refresh Dependencies: * Maven: Click refresh button in Maven tool window * Gradle: Click refresh button in Gradle tool window
Clear Cache: * File → Invalidate Caches and Restart
Check Settings: * Verify repository URL in build configuration * Confirm credentials are correct
Authentication Problems
Store credentials securely: * Use IntelliJ’s password safe * Configure in system environment variables * Never commit credentials to version control
Test connection: * Try accessing repository URL in browser * Verify credentials with mvn deploy or gradle publish from terminal
SSL Certificate Issues
If you encounter SSL errors:
Import Certificate: * File → Settings → Tools → Server Certificates * Add CloudRepo certificate if using self-signed certs
Update JDK: * Ensure JDK has latest CA certificates * Use JDK 11+ for better TLS support
Performance Optimization
Speed up dependency resolution:
Enable Offline Mode when possible: * Maven: Check “Work offline” in Maven settings * Gradle: Use –offline flag
Configure Parallel Downloads: * Maven: Set maven.artifact.threads in settings * Gradle: Enable parallel execution in gradle.properties
Use CloudRepo Proxy Repositories: * Cache external dependencies * Reduce download times
Advanced Features
Code Completion
IntelliJ provides code completion for CloudRepo artifacts:
Start typing dependency coordinates
Press Ctrl+Space for suggestions
Select from CloudRepo artifacts
Quick Documentation
View artifact documentation:
Place cursor on dependency
Press Ctrl+Q (or F1 on macOS)
View artifact details and documentation
Dependency Analyzer
Analyze CloudRepo dependencies:
Right-click on project
Select Analyze → Analyze Dependencies
Review dependency tree and conflicts
Integration with Other JetBrains IDEs
The same configuration works with:
Android Studio - For Android projects
PyCharm - For Python projects with Maven/Gradle
WebStorm - For JavaScript projects with Maven/Gradle
CLion - For C++ projects with build tool integration
Tips and Best Practices
Use IDE Settings Sync to share CloudRepo configuration across machines
Configure Project Templates with CloudRepo repositories pre-configured
Set Up Live Templates for common CloudRepo configurations
Use Version Control Ignore for credential files
Enable Auto-Import for smoother dependency management
Additional Resources
IntelliJ IDEA Documentation: https://www.jetbrains.com/idea/
Maven Repositories - Maven setup details
Gradle Repositories - Gradle configuration
User Management - Managing credentials