Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.querydsl:apt-maven-plugin:1_1_3'
}
dependencies {
implementation("com.github.querydsl:apt-maven-plugin:1_1_3")
}
<dependency>
<groupId>com.github.querydsl</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1_1_3</version>
</dependency>
libraryDependencies += "com.github.querydsl" % "apt-maven-plugin" % "1_1_3"
:dependencies [[com.github.querydsl/apt-maven-plugin "1_1_3"]]
apt-maven-plugin provides Maven integration of the Java 6 APT functionality.
The supported goals are
process - to process main sources
test-process - to process test sources
Here is an example of a configuration
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
Here is an example for usage with the m2e plugin https://github.com/querydsl/apt-maven-plugin/wiki/m2e-usage
If you're using AspectJ to introduce artifacts into classes (fields, methods or annotations), then
apt-maven-plugin will not work properly and classpath inspecting tools need to be used, such as GenericExporter,
if you use Querydsl.