If all classes are up-to-date "Nothing to compile - all classes are up to date
"
so will maven create jar again?
As I am seeing in my log that jar is not creating again. so maven come to know that all classes are up-to-date.
Question: is there any process or another thing which work on this?
The Maven Jar Plugin will create a jar via its
jar
goal if none exists or skip its creation if existing but nothing changed.You can force the creation of the jar via its
forceCreation
option (since version 2.2). From official documentation:Its default value is at
false
, which explains the behavior you are having.If you want to force it always, you can add to your pom file:
Or just on a single build, invoke it as following:
So, going back to your question:
The answer is: Yes, the Maven Jar Plugin works on this and the option above will change its behavior.