0% found this document useful (0 votes)
18 views4 pages

Migrate Maven Project to Gradle

The document outlines the steps to create a Maven project and migrate it to Gradle. It includes configurations for Maven plugins such as the compiler and jar plugins, specifying Java version and main class. Additionally, it provides a Gradle build script with the necessary plugins, group, version, repositories, and dependencies for the project.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

Migrate Maven Project to Gradle

The document outlines the steps to create a Maven project and migrate it to Gradle. It includes configurations for Maven plugins such as the compiler and jar plugins, specifying Java version and main class. Additionally, it provides a Gradle build script with the necessary plugins, group, version, repositories, and dependencies for the project.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program 4

Create maven project and Migrate to gradle

<build>
<plugins>
<!-- Compiler Plugin -->
<plugin>
<groupId>[Link]</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Jar Plugin -->
<plugin>
<groupId>[Link]</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<mainClass>[Link]</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
Copy the below cope in [Link]
plugins {
id 'java'
}

group = '[Link]'
version = '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'junit:junit:4.13.2'
}

jar {
manifest {
attributes(
'Main-Class': '[Link]'
)
}
}

You might also like