Maven not recognizing added packages - java

I am developing a project with Maven for the first time. I have an external package that I have converted into a .jar file and installed into maven in order to use its classes. However, even tho the package is already in the .m2 folder maven still says that it cannot find the package(util):
[ERROR]/home/luis/Desktop/git/sifu/Challenges/Java/java_0002_SN/stringNorm/src/main/java/stringNorm/MyDetector.java:[14,27] cannot find symbol
symbol: class report
location: class stringNorm.MyDetector
[ERROR]/home/luis/Desktop/git/sifu/Challenges/Java/java_0002_SN/stringNorm/src/main/java/stringNorm/MyDetector.java:[9,1] package util does not exist
[ERROR]/home/luis/Desktop/git/sifu/Challenges/Java/java_0002_SN/stringNorm/src/main/java/stringNorm/MyDetector.java:[19,23] cannot find symbol
symbol: class report
location: class stringNorm.MyDetector
I have already tried to add this new dependency(util) to the pom file and so far it looks like this:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sifu</groupId>
<artifactId>stringNorm</artifactId>
<version>1.0</version>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotBugsVersion>4.0.0</spotBugsVersion>
</properties>
<description>My SpotBugs plugin project</description>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotBugsVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>util</groupId>
<artifactId>util</artifactId>
<version>1.0.0</version>
<scope>system</scope>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>test-harness</artifactId>
<version>${spotBugsVersion}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<id>validate-spotbugs-configuration</id>
<goals>
<goal>validate</goal>
</goals>
<configuration>
<validationSets>
<validationSet>
<dir>src/main/resources</dir>
<includes>
<include>findbugs.xml</include>
</includes>
<systemId>findbugsplugin.xsd</systemId>
</validationSet>
<validationSet>
<dir>src/main/resources</dir>
<includes>
<include>messages.xml</include>
</includes>
<systemId>messagecollection.xsd</systemId>
</validationSet>
</validationSets>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotBugsVersion}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
I am using spotbugs to perform analysis on my code, as you can see from the snipet.
The class within the unit package I want to use, is the report one, my import statement looks like this `import util.*;
I installed my jar file to maven using this command: mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
and after doing it I added it into the pom file.
My util package is composed of 3 classes, I did jar cfv util.jar * inside the util folder and gave me a jar file.

Related

Package accessible from more than one module in Intellij

I'm trying to use google text to speech but there is a problem with the imports:
import com.google.cloud.texttospeech.v1beta1.AudioConfig;
import com.google.cloud.texttospeech.v1beta1.AudioEncoding;
import com.google.cloud.texttospeech.v1beta1.SsmlVoiceGender;
import com.google.cloud.texttospeech.v1beta1.SynthesisInput;
import com.google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse;
import com.google.cloud.texttospeech.v1beta1.TextToSpeechClient;
import com.google.cloud.texttospeech.v1beta1.VoiceSelectionParams;
It shows various errors where it's using the same modules from different packages:
java: module google.cloud.texttospeech reads package com.google.cloud.texttospeech.v1beta1 from both google.cloud.texttospeech and proto.google.cloud.texttospeech.v1beta1
I have these requirements in my module-info file:
requires proto.google.cloud.texttospeech.v1beta1;
requires google.cloud.texttospeech;
I also get a yellow warning with these requirements:
Name of automatic module 'proto.google.cloud.texttospeech.v1beta1' is unstable, it is derived from the module's file name.
pom.xml is as follows (removed project tag for clarity):
<modelVersion>4.0.0</modelVersion>
<groupId>com.cloze</groupId>
<artifactId>cloze</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>18.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>18.0.1</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-texttospeech</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.6</version>
<executions>
<execution>
<!-- Default configuration for running -->
<!-- Usage: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>com.cloze.App</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Contact the maintainers of the google-cloud-texttospeech library and ask them to provide documentation (and perhaps an updated implementation) for using their library from a modular Java app.
In the meantime go to openjfx.io and review documentation on non-modular JavaFX apps and try following it.
Asker writes:
If I remove the module-info file to make it non modular that does indeed solve this problem.

Dependency not accept

I have this problem : My dependency org.apache.poi can not accept in pom.xml
this dependency lighting red. But i add in project module jars:
poi-5.2.2
poi-ooxml-5.2.2
commons-collections 4-4.3
commons-compress-1.18
xmlbeans-3.1.0
poi-ooxml-schemas-3.9
dom4j-1.6.1
all jars i am add but dependency not accepted and continue lighting red: my code
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.2</version>
</dependency>
Those Maven coordinates are correct.
Here is an example POM based on the artifact maven-archetype-quickstart, with updated versions on all items, and with your your two dependencies pasted as-is. And I updated the import statements in the AppTest.java file to use JUnit Jupiter. So we have fully-working, up-to-date, practical example app.
Your dependencies are processed correctly by Maven. This app compiles and runs. I did this in IntelliJ 2022.1.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>work.basil.example</groupId>
<artifactId>TryDep</artifactId>
<version>1.0-SNAPSHOT</version>
<name>TryDep</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.2.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
As a sanity check, I suggest you create and run a new project using that POM posted above.
In your own problematic project, I suggest you make sure Maven processed your POM. In IntelliJ, either:
Click the little floating windoid with a Maven logo.
Click the two arrows in a circle icon in the Maven panel, a button whose tooltip says Reload All Maven Projects.
Then execute a Maven clean and install.
Your locale Maven cache in a .m2 folder may need to download the dependencies which may take several minutes depending on the speed of your Internet access.
On occasion, the Maven local cache goes wonky. If all else fails, delete the entire .m2 folder. Then do another clean and install which in turn should trigger creation and population of a fresh .m2 folder.

cannot run tests using maven to run my projects

I am trying to run my tests but I am facing an issue where I cannot run my tests when I run the following command:
mvn clean test
my project contain 3 modules (see image attached):
Every module in the project contains pom.xml file which contains only the dependencies relevant for the module.
the main pom.xml (the reactor) is the file which run the test and control the project, and this is its content:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hackeruso</groupId>
<artifactId>neo</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<modules>
<module>automation-ui</module>
<module>automation-api</module>
<module>morpheus</module>
</modules>
<name>neo</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<aspectj.version>1.8.10</aspectj.version>
<testng.version>7.3.0</testng.version>
</properties>
<dependencies>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.13.6</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
when I run the command mvn test I am getting the following message:
No tests to run.
And this image shows where I hold my tests:
src/test/java/com/hackeruso/automation/ui/LoginTest
This is an example for my test class:
--------------------EDIT-------------------------------------------
package com.hackeruso.automation.ui;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class LoginTest extends BaseTest{
#Test(dataProvider = "userDetailsProvider")
public void loginTest(String username, String password){
signIn(username, password);
}
#DataProvider(name = "userDetailsProvider")
public Object[][] userDetailsProvider(){
return new Object[][] {
{"user#mail.com", "*******"}
};
}
}
From documentation:
For example, a project that is purely metadata (packaging value is
pom) only binds goals to the install and deploy phases (for a complete
list of goal-to-build-phase bindings of some of the packaging types,
refer to the Lifecycle Reference).
As you can see, only install and deploy phases (not test) are valid for a pom packaged project.
The Java code should be not there, since a pom project should be purely metadata.
The parent project has a packaging of <packaging>pom</packaging>. This means this is a meta-project and should not contain any source code.
What you need to do is to move the tests in any of the existing modules or create a new one for these tests. By looking at the package structure of the tests, I guess it would be automation-ui in your case.
Then use the following command to run the tests from all the modules
mvn test -am
Where -am will make all the submodules.
If you want to run tests for a single module, use
mvn test -pl <submodule-name>
So eventually what I did was creating another module for testing and the main project module will contain only Metadata as #Yasin suggested, I also deleted the 'src' package from my main project module leaving it just with a pom.xml file which will manage the other modules (the reactor).
Now everything is working as expected.
Thanks!

Jar packaging in Spring boot

I am creating a Spring Boot multi module project.. Module A has a dependency on Module B ..
Module A runs fine when I run in exploded form..
mvn spring-boot:run
But I am unable to package the jar along with dependencies
so that I can execute it as
java -jar Module-A.jar
Module A pom.xml is below:
<parent>
<artifactId>Module-Test</artifactId>
<groupId>com.module</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Module-A</artifactId>
<packaging>jar</packaging>
<properties>
<start-class>com.NotifyApp</start-class>
<main.class>com.NotifyApp</main.class>
</properties>
<dependencies>
<dependency>
<groupId>com.module</groupId>
<artifactId>Module-B</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) on project Module-A: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:repackage failed: Source must refe
r to an existing file
Parent pom.xml
<modelVersion>4.0.0</modelVersion>
<artifactId>Module-Test</artifactId>
<groupId>com.module</groupId>
<version>1.0.0-SNAPSHOT</version>
<modules>
<module>Module-A</module>
<module>Module-B</module>
<module>Module-C</module>
</modules>
<packaging>pom</packaging>
<parent>
<artifactId>Module-Parent</artifactId>
<groupId>com.parent</groupId>
<version>1.0.2</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.module</groupId>
<artifactId>Module-A</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.module</groupId>
<artifactId>Module-B</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.module</groupId>
<artifactId>Module-C</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.module</groupId>
<artifactId>starter-service</artifactId>
<version>${starter.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
I usually use this plugin https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html for maven, which will put all of the dependency jars into target/dependencies when you run
mvn clean package
Then I copy the jars into a folder (which I usually call lib) and I include lib/* in my classpath. The final run script usually looks like
java -cp lib/*: my.package.MySpringBootMain
Remove the
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
It's not needed.
Add dependency of module B in module A's pom.xml
<dependencies>
<dependency>
<groupId>com.module</groupId>
<artifactId>Module-B</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Use maven clean compile package install command for module B, to build module B first and then run maven clean compile package on Module A. This will out Module B into Module A.
There is no module A's reference required in Module B's pom.xml
you sure know, but you can initialize your project from this link
Spring Initializr
, it automatically generates the configuration with what you need

How can I generate a maven repository-ready library with swagger-codegen-maven-plugin?

I'm using the Maven plugin swagger-codegen-maven-plugin to generate a Java client jar. I put my swagger.json in the src/main/resources folder and ran mvn clean install. Here is my pom.xml.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-java-client</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-java-client</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<swagger.version>1.5.13</swagger.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>2.7.5</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>logging-interceptor</artifactId>
<version>2.7.5</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>1.12.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/resources/swagger.json</inputSpec>
<modelPackage>mypackage.model</modelPackage>
<apiPackage>mypackage</apiPackage>
<invokerPackage>mypackage.invoker</invokerPackage>
<language>java</language>
<configOptions>
<interfaceOnly>true</interfaceOnly>
<dateLibrary>java8</dateLibrary>
<java8>true</java8>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
When I run mvn clean install, a jar file my-java-client-1.0-SNAPSHOT.jar is made in the target folder. It has source code in it, but no pom.xml file. There is a pom.xml file in the target/generated-sources/swagger folder but it has the groupId and artifactId:
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
The README.md file in the target/generated-sources/swaggersays to include the following in your pom.xml to use the generated jar:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
I'm guessing these are just defaults because if I generated multiple swagger clients they would conflict over the name, and I can see in the swagger-codegen source code that these fields are generated from placeholders like {{artifactId}}. I haven't been able to find where I can set these placeholders.
How can I get the jar to include a pom.xml with an artifactId and groupId of my choosing, so I can upload it to a Maven repository like Artifactory, and use it in my Maven dependencies?
It's not particularly well documented, but it appears you are able to override the artifactId, groupId etc from within the configOptions:
<configOptions>
<groupId>com.your.group.id</groupId>
<artifactId>your-artifact-id</artifactId>
<artifactVersion>0.0.1-SNAPSHOT</artifactVersion>
</configOptions>
Many of the properties inside CodegenConstants.java can be set in the same way.
I updated it using below config Properties (gradle)
'groupId' : 'your.group.id',
'artifactId' : 'your-artifact-id'
you can also go through document which is helpful for reference of the properties.
https://openapi-generator.tech/docs/generators/kotlin/

Categories

Resources