Jump to content
Excelsior Forums
maedisae

Continuous Integration Support

Recommended Posts

I evaluted Excelsior JET last week. The result exe seems OK. But when I integrate the build to our CI process, I find that I can not update the class path entries automatically.

Because our jars updated frequently, it is not possible to assign one person update prj or jpn files when the new version jars release.

Does Excelsior JET has any continuous integration support?

Thanks in advance.

Share this post


Link to post
Share on other sites

I evaluted Excelsior JET last week. The result exe seems OK. But when I integrate the build to our CI process, I find that I can not update the class path entries automatically.

Because our jars updated frequently, it is not possible to assign one person update prj or jpn files when the new version jars release.

Does Excelsior JET has any continuous integration support?

Thanks in advance.

I guess that your jars change their name when they are updated, do they?

If yes, there are 2 ways to handle this:

1. If the jar name contains a version string and the version string is one for all jars, you may use user-defined equations for JET project file.

To do that:

-- First, you need to choose a name for the equation, for instance "version".

-- Then modify your project file by replacing actual version string with introduced "version" equation.

For instance YourJar_1.0.0.1.jar will become YourJar_$(version).jar

-- Define version equation in your build script such as follows:

jc =p YourProject.prj -version:=1.0.0.1

For more details on JET project equations please read JET User's Guide, Chapter "JC reference" Section "Configuring the compiler/Options"

2. If the amount of library jars is changed or the names are changed in arbitrary manner, you may specify all jars that are in a directory at once, by using the following project file directive:

!batch *.jar <JarsDirectoryPath>

Please note, that you will not be able to specify separate properties (such as optimize, protect, pack properties) for a particular jar in this case.

JetPackII projects (.jpn) do not need to be changed if all your jars are packed into executable.

And if you have Eclipse RCP or Tomcat projects then they are updated automatically, if you do not change default settings.

Share this post


Link to post
Share on other sites

And about continuous integration:

Usually our customers use the command line interface to the JET Optimizer and JetPackII To automate the build process. After you created projects for compiling and packaging your application you may use the following commands for automated builds

1) jc =p <ProjectName>.prj

to compile the project

2) xpack <ProjectName>.jpn [-target target-file] [-version version]

The -target option specifies the name of the target file (for Excelsior Installer setups) or the target directory (for self-contained directory or multiple roots package). If the option is omitted, the name shown on the last page of JetPackII is used.

The -version option may be used for changing the product version displayed by the installation wizard of Excelsior Installer. It takes no effect for other back-ends.

xpack utility is useful for minor updates, e.g. when only particular files are modified, provided that the overall structure of the project and installation settings were not changed.

Could this command line interface help for automation in your case?

Share this post


Link to post
Share on other sites

I guess that your jars change their name when they are updated, do they?

If yes, there are 2 ways to handle this:

1. If the jar name contains a version string and the version string is one for all jars, you may use user-defined equations for JET project file.

To do that:

-- First, you need to choose a name for the equation, for instance "version".

-- Then modify your project file by replacing actual version string with introduced "version" equation.

For instance YourJar_1.0.0.1.jar will become YourJar_$(version).jar

-- Define version equation in your build script such as follows:

jc =p YourProject.prj -version:=1.0.0.1

For more details on JET project equations please read JET User's Guide, Chapter "JC reference" Section "Configuring the compiler/Options"

2. If the amount of library jars is changed or the names are changed in arbitrary manner, you may specify all jars that are in a directory at once, by using the following project file directive:

!batch *.jar <JarsDirectoryPath>

Please note, that you will not be able to specify separate properties (such as optimize, protect, pack properties) for a particular jar in this case.

JetPackII projects (.jpn) do not need to be changed if all your jars are packed into executable.

And if you have Eclipse RCP or Tomcat projects then they are updated automatically, if you do not change default settings.

Thanks for you suggestion! :)

I will try these ways.

But I have another question:

Will *.startup and *.usg file be updated automatically when I updated the *.prj file?

Share this post


Link to post
Share on other sites

Thanks for you suggestion! :)

I will try these ways.

But I have another question:

Will *.startup and *.usg file be updated automatically when I updated the *.prj file?

*.startup and *.usg files are execution profiles. It is recommended to update them before release performing Test Run. On the other hand, if you do not update them nothing fails but the program will not be optimized as good as it can be.

Share this post


Link to post
Share on other sites

*.startup and *.usg files are execution profiles. It is recommended to update them before release performing Test Run. On the other hand, if you do not update them nothing fails but the program will not be optimized as good as it can be.

Thanks for reply my question.

But I have to design automatic solution, it is not possible for me to perform test run manually when components release.

And I have another question about "!batch *.jar ./lib".

Does"!batch" directive not provide the options (pack, protect, optimize)?

If not, what are the default values about these options when I use "!batch" directive?

Thanks in advance.

Share this post


Link to post
Share on other sites

But I have to design automatic solution, it is not possible for me to perform test run manually when components release.

Does your application have a GUI? If yes, you may automate the process using third-party tools like QFTest.

Please also read JET User's Guide, Chapter "Global Optimizer", Section "Using the Global Optimizer", Subsection "Performing a Test Run" to learn how to perform Test Run without JET Control Panel.

Please also note that .startup profile can be automatically updated if you check the "Enable profiling in automated builds" on the Page Compile of JET Control Panel.

And I have another question about "!batch *.jar ./lib".

Does"!batch" directive not provide the options (pack, protect, optimize)?

If not, what are the default values about these options when I use "!batch" directive?

Default values are:

-optimize=all

-protect=nomatter

-pack=autodetect

You may globally change these settings.

Share this post


Link to post
Share on other sites

Hi,

we have an urgent problem with JetPack project files. Is there a way to automatically generate these files specifying the installation directory (intermediate)? We cannot easily use these files generated by the wizard, because it contains references to various platform plugins which we change frequently. We also have other plugins in the installation plugins directory which change their version with each build (I could workaround that by including only the executable into the project), but this doesn't help with the many references in the project file. Obviously, just copying the rt directory to the installation is not enough, because the executable has to be modified as well. xbind utility can help modify the executable, but how do I use it? If I just use the generated script file, it finishes, but the executable is not modified.

We really need to solve this. Thanks for any suggestions.

Share this post


Link to post
Share on other sites

Is there a way to automatically generate these files specifying the installation directory (intermediate)?

No, there is no way.

We cannot easily use these files generated by the wizard, because it contains references to various platform plugins which we change frequently. We also have other plugins in the installation plugins directory which change their version with each build (I could workaround that by including only the executable into the project), but this doesn't help with the many references in the project file. Obviously, just copying the rt directory to the installation is not enough, because the executable has to be modified as well. xbind utility can help modify the executable, but how do I use it? If I just use the generated script file, it finishes, but the executable is not modified.

If the plugins are in Java classpath then the best way to workaround the problem is to pack them into the executable so they will not be needed as separate files in JetPackII. If the plugins are not in Java classpath then the executable does not reference them and does not require to be modified after packaging. So you may add such plugins after packaging process with JetPackII (in case you use self-contained directory as JetPackII backend).

Share this post


Link to post
Share on other sites

We cannot add the plugins into the executable, because 1) some of them are nor jars (unpacked), and 2) we need to have some jars outside the executable due to external programmers contributing plugins into our applications.

We could omit these plugins in the packaging process, but check out the jpn project file. It references many other plugins which are included in the executable. These plugins could still change, and we would have to update the project files whenever we change them. This is not a good solution. I don't understand why it has to be so complicated when we just need to include the runtime, and be done with it.

It would be best if we could use the xbind utility, but it doesn't work for us (as I described). Could you point us into the right direction on how to use it?

We already generate the prj files for our continuous integration builds, but jpn files are much more complicated.

Any help would be appreciated.

Share this post


Link to post
Share on other sites

I finally managed to get it working using xbind utility. The only trick is to include all JRE classes in rt.jar, because it seems this is autodetected by JetPack. It would be cool to improve the packaging process to work better with RCP installations and continuous integration.

Cheers,

Mirage

Share this post


Link to post
Share on other sites

It would be cool to improve the packaging process to work better with RCP installations and continuous integration.

Ah, I did not understand that you have Eclipse RCP application. In this case, everything should work without using of xbind utility. The only thing you should do is to create your JetPackII project as Eclipse RCP project and the contents of the package will be automatically updated after this. Please let us know if it helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×