Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output with goal "moditect:add-module-info" #139

Open
stephansann opened this issue Feb 24, 2021 · 4 comments
Open

No output with goal "moditect:add-module-info" #139

stephansann opened this issue Feb 24, 2021 · 4 comments

Comments

@stephansann
Copy link

Hello

I added moditect to my plugins as can be seen in the attached file.

Now I run the "moditect:add-module-info" goal:

mvn moditect:add-module-info [INFO] Scanning for projects... [INFO] [INFO] ---------< com.sophisticatedapps.archiving:document-archiver >---------- [INFO] Building DocumentArchiver 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- moditect-maven-plugin:1.0.0.RC1:add-module-info (default-cli) @ document-archiver --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.590 s [INFO] Finished at: 2021-02-24T11:12:41+03:00 [INFO] ------------------------------------------------------------------------

I would have expected to see output of any kind in "target/modules/". Anyhow this folder is empty after the run?

Did I miss something?

Thanks and best regards
Stephan

pom.xml.txt

@jandvorak1
Copy link

I confirm the same problem in the version 1.0.0.RC1. Version 1.0.0.Beta2 works correctly.

@jandvorak1
Copy link

jandvorak1 commented Jun 20, 2021

I confirm the same problem in the version 1.0.0.RC1. Version 1.0.0.Beta2 works correctly.

This problem solved for me by changing packaging type in pom.xml from pom to jar.

@gunnarmorling
Copy link
Member

Hum, hum, yeah, applying ModiTect does only make sense for JAR modules. Would be nice to guard against unexpected packaging.

@ekpeters
Copy link

Worth noting, this behavior is not consistent within Moditect.

  • add-module-info aborts for pom packaging, doing no work (and offering no indication to the user - please fix)
  • create-runtime-image operates normally for pom packaging - or would, if not for the missing artifacts not supplied by a preceding invocation of add-module-info -- This is in conflict how add-module-info behaves.

My particular use case is I'm preparing and packaging a zip archive with the jlink image. I want to push a .zip to our private maven repository, which in turn means suppressing the jar artifact (to avoid confusing people who manually browse the repo for this specific artifact - they understand zip archives and may be confused by the jar packaging). Options for this appear to be 'use jar packaging, override the default install/deploy steps, with side effects to automatic handling of snapshot/release repositories', or 'use pom packaging and attach a zip artifact - with the moditect side-effect of silently not adding module infos when requested, then dying on missing modules during the jlink step.'

I do not like these two options, as neither is suitable for me. I'm now looking for other options, (fork moditect, split the sub-sub-project into sub-sub-sub projects for bonus complexity, other?) - none appear to be ideal as they are moving away from the simple solution (forking plugins is easy until you need to, years later, update the plugin, and nobody remembers what it was forked for - I've been down this road before... more than once).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants