triz-docs/docs/getting-started/environment-setup/01-java-and-maven.md
Othmane Ataallah 7632672d65 intial push
2026-04-28 09:45:44 +01:00

3.0 KiB

sidebar_position title
2 Java and Maven

Java and Maven


Step 1 — Install Java SE Development Kit (JDK) 8

  1. Download JDK 8 from:
  2. Run the installer and complete the installation. Note the installation path (e.g., C:\Program Files\Java\jdk1.8.0_xxx).
  3. Set the JAVA_HOME environment variable:
    • Open Start → Search → "Edit the system environment variables"
    • Click Environment Variables
    • Under System variables, click New:
      • Variable name: JAVA_HOME
      • Variable value: C:\Program Files\Java\jdk1.8.0_xxx (your actual JDK path)
    • Find the Path variable under System variables → click Edit → New, and add: %JAVA_HOME%\bin
    • Click OK on all dialogs.
  4. Open a new terminal window and verify:
java -version
javac -version

Both must return 1.8.x. If javac is not found, JAVA_HOME or PATH was not set correctly.


Step 2 — Install Apache Maven

  1. Download Maven from: (Download the binary zip archive)
  2. Extract it to a stable path with no spaces (e.g., C:\dev\maven).
  3. Set environment variables:
    • Create a new system variable:
      • Variable name: MAVEN_HOME
      • Variable value: C:\dev\maven (your extraction path)
    • Add %MAVEN_HOME%\bin to the Path system variable (same way as Step 1).
  4. Open a new terminal and verify:
mvn -version

It should display the Maven version and confirm it is using your JDK 8.


Step 3 — Configure Maven for the Private Gitea Registry

The TrizStock project has several legacy dependencies that are not available on Maven Central. They are hosted on the team's private Maven registry in Gitea. Without this configuration, your build will fail to resolve those dependencies.

  1. Navigate to the Maven user settings file. If it does not exist, create it:
C:\Users\YOUR_WINDOWS_USERNAME\.m2\settings.xml
  1. Download the settings.xml.template from the team resources repository.
  2. Copy the template content into your settings.xml and replace the placeholders with your actual Gitea credentials:
<settings>
	<servers>
		<server>
			<id>gitea</id>
			<username>othmane</username>
			<password>54465f0ce0fec1a357eb7d9f7055e3df873db114</password>
		</server>
	</servers>
</settings>

Verify the registry is accessible by running the following in a terminal (once you have the project cloned — see Step 7):

mvn dependency:resolve

All dependencies, including the legacy ones, should resolve without errors.