-
Notifications
You must be signed in to change notification settings - Fork 30
Fix warnings during the build #938
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, 'attachment' as a term is mentioned in install plugin docs:
Description:
Installs the project's main artifact, and any other artifacts attached by other plugins in the lifecycle, to the local repository.
<executions> | ||
<execution> | ||
<id>default-jar</id> | ||
<phase/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html#skipIfEmpty is more appropriate
<executions> | ||
<execution> | ||
<id>default-install</id> | ||
<phase/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With ^ is this configuration needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If yes (= there is some other warning), there is a more appropriate https://maven.apache.org/plugins/maven-install-plugin/install-mojo.html#skip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's required because it tries to install unexisting jar.
</descriptorRefs> | ||
<finalName>${project.artifactId}-${project.version}-artifact</finalName> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<!-- Do not use the produced artifact jar file as a main jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Overview
Fixed two kinds of warnings:
[WARNING] JAR will be empty - no content was marked for inclusion!
Added maven configuration to do not create a
jar
file because the module is not supposed to produce it.The reason was
assembly-plugin
replaces default jar by produced artifact-jar and installs it to the repo with default name.Definition of Done