gwt:codeserver after few reloads make nalu forget version properties
masterdany88 opened this issue · 9 comments
/**
* Build with Nalu version >>2.9.0<< at >>2022.05.09-18:22:50<<
*/
public final class APApplicationImpl extends AbstractApplication<APContext> implements APApplication {
public APApplicationImpl() {
super();
super.context = new com.gan.sphere.ap.ui.APContext();
super.context.setApplicationVersion("APPLCIATION-VERSION-NOT-AVAILABLE");
super.context.setApplicationBuildTime(new Date(1652113372775L));
}
my maven gwt module:
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt-maven-plugin.version}</version>
<inherited>false</inherited>
<extensions>true</extensions>
<configuration>
<failOnError>true</failOnError>
<sourceLevel>1.8</sourceLevel>
<launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
<moduleShortName>ap</moduleShortName>
<systemProperties>
<systemProperty>
<name>nalu.application.version</name>
<value>${project.version}</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
I can not imagine how Nalu should treat commands different after a few reloads.
Do you have a small project, that shows the bug?
unfortunatelly not.
My version after clean install:
super.context.setApplicationVersion("2.42.0.SNAPSHOT");
but it is gone after few reloads
What I found out, is that after triggering build (on whole project) in intelij ctrl + F9 or ctrl + 9 (base on os) I am losing this version in nalu.
Build in intelij j triggers java annotation process (but without any maven goals)
I assume that nalu gets this value in maven build
Yes, that's sounds like a valid explanation. The property will only be available when using Maven. Try using a Maven run config with clean compile instead of IntelliJ build.
Can I somehow tell nalu the version if there was no maven, but only annotation processes triggered?
Some properties file f.e?
Setting the version can be done by using the version annotation: https://github.com/NaluKit/nalu/wiki/06.-Application#version-and-build-time
Not sure, if this is a suitable solution for you.
Do I get it right?
It is possible to override the value from the version annotation from the command line. Nalu will look for a property called "nalu.application.version". If the property exists, Nalu will use this value. This will only work, in case the Version annotation is used.
It means that annotation version will be used if no property from maven will be found.
But when maven property will be founded, then the value from annotation would be ignored?
It means that annotation version will be used if no property from maven will be found.
But when maven property will be founded, then the value from annotation would be ignored?
You got it right.
I'll close the issue. Looks like there is nothing to do ...