blutorange / closure-compiler-maven-plugin

Combine and minimize JavaScript with Closure Compiler.
http://blutorange.github.com/closure-compiler-maven-plugin
Apache License 2.0
52 stars 6 forks source link

[question] build failed when compile maven multi-module project #59

Closed gdesouzacrispim closed 2 years ago

gdesouzacrispim commented 2 years ago

I have this project: https://github.com/gdesouzacrispim/closure-compiler-minify where exist a module parent and children; The plugin is declared in parent pom but it dont have directory path configured int tag baseSourceDir but the children have

Is there any configuration that will ignore when the files isnt existent to be minified in parent module?

[ERROR] Failed to execute goal com.github.blutorange:closure-compiler-maven-plugin:2.22.0:minify (default-minify) on project parent: Execution default-minify of goal com.github.blutorange:closure-compiler-maven-plugin:2.22.0:minify failed: basedir /home/myuser/dev/closure-compile/parent/src/main/webapp/resources does not exist -> [Help 1]

blutorange commented 2 years ago

Sorry, I just saw your message, am a bit busy currently. If I understand you correctly, you want to run the plugin only on the child projects, but declare the configuration once in the parent project? You could use a plugin management section to declare the configuration without running the plugin on the parent project. Or set the skip option to true in the parent pom and to false in the children. Or do you want to run he plugin on the parent project as well, but with a different config?

gdesouzacrispim commented 2 years ago

Correct! I wanna run the plugin only child projects but declare the configutation once in the parent pom. I will using the plugin management - just thought that had another way where I writen nothin in pom child like YUIcompressor did. Thanks!

blutorange commented 2 years ago

The current behavior is useful to detect configuration errors, so I'd like to keep it the way it is, if possible. Sharing configuration is also part of what the plugin management section is meant for. I'm going to close this for now, but feel free to reopen if you cannot get it to work, then we can reconsider this issue.