Skip to content

[MJMOD-20] set jmod --main-class argument if it is set.#1

Merged
rfscholte merged 5 commits intoapache:masterfrom
andretadeu:master
Jan 18, 2019
Merged

[MJMOD-20] set jmod --main-class argument if it is set.#1
rfscholte merged 5 commits intoapache:masterfrom
andretadeu:master

Conversation

@andretadeu
Copy link
Contributor

Hi!

This pull request sets the parameter --main-class if it was set in:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jmod-plugin</artifactId>
                <configuration>
                    <mainClass>com.andretadeu.greetings.Main</mainClass>
                    <modulePath>target/jmods</modulePath>
                    <moduleVersion>${project.version}</moduleVersion>
                </configuration>
...
</plugin>

otherwise, if I am not able to set, I may not run jmod in modules that contains a Main class.

Thanks,

André Tadeu de Carvalho

…ment section to use the default ones. Refactor test to become more Groovyish. Set 9+ in invoker.java.version, replacing 1.9+. Set invoker.goals to 'package' only. Use StringUtils.isNotBlank instead of manual check for 'mainClass' parameter.
@andretadeu
Copy link
Contributor Author

@rfscholte Done.

@rfscholte rfscholte merged commit 0a2af83 into apache:master Jan 18, 2019
@jira-importer
Copy link

Resolve #57

1 similar comment
@jira-importer
Copy link

Resolve #57

@slachiewicz slachiewicz added this to the 3.0.0 milestone Dec 22, 2025
@slachiewicz slachiewicz added the enhancement New feature or request label Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants