Requirements to build IntelliJ IDEA Java project

Answered

I have a single machine at home and have IntelliJ IDEA Ultimate and TeamCity installed.  I want to build a project in Team City.  However, the message appears:

Warning: No enabled compatible agents for this build configuration. Please register a build agent or tweak build configuration requirements.

Looking at my build agent Compatible Configurations it indicates the following for my TeamCity Project:

Implicit requirements: 
  • system.path.macro.MAVEN.REPOSITORY defined in Build step: IntelliJ IDEA Project

The answers I am looking for are what are the requirements on my machine in order to build my project.

Project

I have created a project in IntelliJ IDEA from New Project->Empty Project.

I have added a few modules from Project Structure->Modules and added some Java code.

TeamCity

I have installed this and created a new project.  I have followed links to setup things:

https://www.jetbrains.com/help/teamcity/configure-and-run-your-first-build.html#Create+a+project+from+a+repository+URL 

Build steps have been added using following steps:

  1. From the project root, click on the project (Ultimate CI)

  2. Click on the Edit Project Settings in top right
    The build will show as empty

  3. Click on Edit and then select the Build Steps

  4. Click on Auto-detect build steps
    Team city will then scan the source folders and determine if there is anything to build.

    Here it has detected my [IntelliJ] project.

  5. Select the projects
    Here I select the Build Step IntelliJ IDEA Project.

  6. Click on Use selected
    The build steps will be updated.

 

Question

Given this is all on my computer, including the build agent, what do I need in order to setup a simple build for my project?

2 comments
Comment actions Permalink

OK, I assigned the Maven local folder for my user to that variable in TeamCity Build Step settings.

C:\Users\{user}\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\202.7660.26\plugins\maven\lib\maven3.

Now there is errors with the compilation:

  • H:\TeamCity\buildAgent\work\c7abe1e1cfcd2d70\ci-showcase-java\quorum-data\tests\quorum\data\sql\Testing_setup.java:4: package org.junit.jupiter.api does not exist
  • import org.junit.jupiter.api.Test;

 

Is there anything anywhere that shows you how to create your first IntelliJ project build using TeamCity?  I sense this is going to frustrate me somewhat.

0
Comment actions Permalink

I'm not sure what your test project includes, but it looks like it is missing a package. You may want to see our blog here: https://blog.jetbrains.com/teamcity/2020/09/the-getting-started-with-teamcity-video-series/. We have a getting started video series that uses the popular Spring PetClinic project and will take you through the steps to run your first build. This would be a great place to start.

0

Please sign in to leave a comment.