Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for Java Maven SonarQube Analysis

Use this engineered prompt to drastically optimize your workflow and output.

Required Variables

  • [JAVA_VERSION]
  • [SONAR_PROJECT_KEY]
  • [SONAR_HOST_URL]
java-maven-sonarqube-analysis.txt
Construct a GitHub Actions workflow for a Java Maven project. The workflow must: 1) Use [JAVA_VERSION] and setup Maven caching. 2) Run 'mvn verify'. 3) Execute a SonarQube scan using the [SONAR_PROJECT_KEY] and [SONAR_HOST_URL]. 4) Enforce a Quality Gate check—if the SonarQube quality gate fails, the workflow must fail. 5) Store the build JAR file as an artifact for 7 days.

Example Output

"A Java enterprise-ready YAML integrating Maven builds with SonarCloud/SonarQube for static analysis and quality gates."