You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use GMavenPlus for my project for joint compilation.
In the pure java module, when I run mvn package, if there is nothing changed in the module, the artifact is still the one I built last time.
But when I use GMavenPlus, the artifact is built every time that I run mvn package, even nothing has been changed.
So, is there a way for GMavenPlus to detect source changes. For example, when .class file's mtime is newer than the .groovy file's mtime, do not compile the one.
Hmm. That would be really cool. That functionality isn't built into the Groovy compiler, so I'd have to do something custom. I'll poke around in the Maven Compiler Plugin and see what they are doing to provide this functionality. Maybe we could do something similar.
I already seek solution in the GMavenPlus.
I found that the compilation like this:
generate groovy stubs for java
use maven-compiler-plugin compile with normal java sources and stubs into classes
use groovyc compile groovy sources into classes and override previous step classes
So, the problem is cannot use classes newer than groovy sources to detect source changes. Because when the compilation process is break between step 2 and step 3, the next time we start the process, the plugin will believe that the source is already built.
And when the plugin use the the stubs newer than groovy sources to detect source changes, we face the same problem.
Unless the the plugin knows the class is built by stub or groovy source, I think this idea can not be achieved.
I use GMavenPlus for my project for joint compilation.
In the pure java module, when I run
mvn package
, if there is nothing changed in the module, the artifact is still the one I built last time.But when I use GMavenPlus, the artifact is built every time that I run
mvn package
, even nothing has been changed.So, is there a way for GMavenPlus to detect source changes. For example, when
.class
file's mtime is newer than the.groovy
file's mtime, do not compile the one.Here is my pom.xml plugin part:
The text was updated successfully, but these errors were encountered: