You can pull the artifacts of the Doma framework from the Maven central repository. We provide two artifacts, doma-core
and doma-processor
.
The doma-core
artifact is required at runtime and compile-time. The doma-processor
artifact provides annotation processors and is required at compile-time only.
The group id and artifact id of those artifacts are as follows:
- GroupId
org.seasar.doma
- ArtifactId
doma-core
- GroupId
org.seasar.doma
- ArtifactId
doma-processor
Write your build.gradle(.kts) as follows:
Kotlin
plugins {
id("org.seasar.doma.compile") version "2.0.0"
}
dependencies {
implementation("org.seasar.doma:doma-core:2.57.0")
annotationProcessor("org.seasar.doma:doma-processor:2.57.0")
}
Groovy
plugins {
id 'org.seasar.doma.compile' version '2.0.0'
}
dependencies {
implementation 'org.seasar.doma:doma-core:2.57.0'
annotationProcessor 'org.seasar.doma:doma-processor:2.57.0'
}
To simplify your build.script(.kts), we recommend that you use the org.seasar.doma.compile plugin.
See build.gradle.kts in the getting-started repository as an example.
Write your pom.xml as follows:
...
<properties>
<doma.version>2.57.0</doma.version>
</properties>
...
<dependencies>
<dependency>
<groupId>org.seasar.doma</groupId>
<artifactId>doma-core</artifactId>
<version>${doma.version}</version>
</dependency>
</dependencies>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.seasar.doma</groupId>
<artifactId>doma-processor</artifactId>
<version>${doma.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Generate eclipse setting files with Gradle, and then import your project into Eclipse. To generate the setting files, run gradle cleanEclipse eclipse
.
To simplify your build.script(.kts), we recommend that you use the com.diffplug.eclipse.apt plugin.
See build.gradle.kts in the getting-started repository as an example.
Note
We've managed to get our Maven project up and running in Eclipse, but we're unsure if we're following the best practices. If you have any tips or recommended approaches, we'd really appreciate your input.
Import your project as a Gradle project. Build and run using Gradle.
Import your project as a Maven project. Build and run using Maven.