Reputation: 2233
I have a solution in mind but don't know how to accomplish this natively in install4j.
I have a folder containing a repository of artifacts (similar to maven's .m2 repository folder schema) where the file names are uniquely generated (timestamp) during maven compilation.
E.g. ./install-dir/artifacts/app-core/jar/1.2-t20160419183129/app-core-1.2-t20160419183129.jar
After running an installer with "Update existing installation" checked, install4j will append these files and preserve the older timestamped version of that artifact. I get that this is not a bug and is working as intended. So end result will look like:
./install-dir/artifacts/app-core/jar/1.2-t20160415154633/app-core-1.2-t20160415154633.jar
./install-dir/artifacts/app-core/jar/1.2-t20160419183129/app-core-1.2-t20160419183129.jar
Nothing changed in these files but the timestamp that was generated during compilation. So is there any method that I can approach within install4j that will verify if the component mentioned above is newer then the installers counterpart. It would have to ignore the timestamp and only take into account the version number and md5 checksum.
Right now, I am completely removing the artifacts
folder and replacing it with the installers version. However, that is an aggressive approach that I hope to migrate away from.
Upvotes: 1
Views: 54
Reputation: 48090
Right now, I am completely removing the artifacts folder and replacing it with the installers version. However, that is an aggressive approach that I hope to migrate away from.
I would stay with that strategy. What if a JRE file is removed in a new version? If you would just match updates without the time stamp, the old JAR files would remain in the installation and on the class path.
Otherwise, there is no feature in install4j (as of 6.1) that would allow you to perform the update in this way.
Upvotes: 1