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
Dev mode uses the maven-compiler-plugin to do a compile on startup (and then later uses a custom 'javac' command).
However dev mode startup doesn't end up avoiding a recompile if the classes are already locally compiled, whereas running the 'compile' phase typically will to an up-to-date check and avoid an unnecessary recompile.
It seems dev mode doesn't leverage listing files in target/maven-status (more detail below) maybe because we're using a 'null' execution id rather than 'default-compile'.
Recreate
git clone [email protected]:OpenLiberty/guide-getting-started.git ; cd guide-getting-started/finish
mvn clean compile
mvn compile # (notice nothing is rebuilt, the "up to date" message appears)
[INFO] --- compiler:3.11.0:compile (default-compile) @ guide-getting-started ---
[INFO] Nothing to compile - all classes are up to date
mvn liberty:dev # (notice the recompile, or look at timestamps, etc.)
[INFO] Running maven-compiler-plugin:compile on C:\git\guides\guide-getting-started\finish\pom.xml
[INFO] Changes detected - recompiling the module! :input tree
[INFO] Compiling 4 source files with javac [debug target 11] to target\classes
Should dev mode be using an execution id of 'default-compile' somehow? Somehow it seems to not be setting or ending up with a 'null' in place of the execution id in the maven-status output?
The text was updated successfully, but these errors were encountered:
scottkurz
changed the title
Dev mode recompiles already-compiled on initial start
Dev mode recompiles already-compiled classes on initial start
Dec 13, 2024
I have identified that we are not passing any execution ID to executeMojo() method while running the goal
Made code changes to pass default execution id
Shall I go ahead and try to contribute this to mojo-executor ?
@arunvenmany-ibm Can you point me to the repo? Has there been any activity in the repo in the past year? If not, even if you contribute it how would we get a new version published? We could consider cloning the repo into one of our own maybe and make the change, then publish it ourselves. Let's discuss more tomorrow.
Dev mode uses the maven-compiler-plugin to do a compile on startup (and then later uses a custom 'javac' command).
However dev mode startup doesn't end up avoiding a recompile if the classes are already locally compiled, whereas running the 'compile' phase typically will to an up-to-date check and avoid an unnecessary recompile.
It seems dev mode doesn't leverage listing files in
target/maven-status
(more detail below) maybe because we're using a 'null' execution id rather than 'default-compile'.Recreate
Observation
After doing a
mvn compile
I see:whereas after doing
mvn compile; mvn liberty:dev
I see:Question
Should dev mode be using an execution id of 'default-compile' somehow? Somehow it seems to not be setting or ending up with a 'null' in place of the execution id in the maven-status output?
The text was updated successfully, but these errors were encountered: