Install4j 5.x: Maven-Plugin, Build-Agents and Floating License HowTo - maven

utoday I got the task to integrate a floating license server for install4j to our build process. Therefore I read the README.txt and the following two threads:
install4jc-specifying-floating-server and floating-license-setup-on-a-headless-ubuntu-server
Now there are still some questions left. Therefore I will describe our build environment shortly. We are using maven to build our software and installer and startet to test install4j by using the maven-plugin for install4j:
We installed the install4j application as zip file to our maven repository
during maven build we download and extract this file to some target directory
until now we installed the demo-license via maven-plugin to the install4j folder
during the package-maven-phase we using the maven-plugin to build the installer mediums
That works very nice. Now the company decided to buy a license-bundle including a floating license server. But how to include this to our build process? My suggestion would be the following:
install license server to a server reachable over the network
modify the config.xml file at the zipped application of the maven-repository and integrate the floating-license-server address or set maven-plugin-license property something like FLOAT:[server-ip]:11862 at the build configuration?
Is the license-key gotten by ej-technologie only necessary for using the ui? Has anybody some similar build environment and can give me some information how to setup this correctly?
Thanks in advance

set maven-plugin-license property something like FLOAT:[server-ip]:11862 at the build configuration?
That would work for the multi-platform edition. If you have the Windows edition, you have to go with:
modify the config.xml file at the zipped application of the maven-repository and integrate the floating-license-server address
As for:
Is the license-key gotten by ej-technologie only necessary for using the ui?
The license key is entered in the license server. Both IDE and command line compiler contact the license server. Only the IDE actually checks out a license as long as the IDE is open, the command line compiler just verifies the validity of the license.

Related

Gradle Launch4J EXE not trusted by Windows 10

Please note: I have created this GitHub project right here that can be used to perfectly reproduce the problem I'm seeing.
Java 8 here attempting to use Launch4J via the gradle-launch4j Gradle plugin to build a Windows native EXE application. I am doing the development of a Java Swing app on my Mac but the app must run as a Windows EXE on Windows 10. I am also using ShadowJar to build my self-contained "fat jar".
I can build my (Swing) app's fat jar and then run it on my Mac via java -jar build/lib/myapp.jar. It starts and runs no problem.
Here is my Gradle config for Launch4J:
launch4j {
mainClassName = 'com.example.windows.hello.HelloWindowsApp'
icon = "${projectDir}/icon.ico"
jdkPreference = 'jdkOnly'
initialHeapSize = 128
jreMinVersion = '1.8.0'
jreMaxVersion = '1.8.9'
maxHeapSize = 512
stayAlive = false
bundledJre64Bit = true
bundledJrePath = '../hello-windows/jre8'
}
When I run ./gradle clean build shadowJar createExe createDistro it produces:
hello-windows.zip/
hello-windows.exe --> The Windows EXE built by the 'createExe' task
lib/* --> The lib/ dir for the EXE that is also built by the `createExe` task
jre8/ --> OpenJDK JRE8 (copied from the libs/jre8 dir)
So I copy that ZIP file and port it over to a Windows 10 (64-bit) machine. I extract the ZIP and run the EXE by double clicking it inside Windows Explorer (which I can confirm does see the EXE as an Application type). First I see this:
Why is this happening? Are there any Launch4J configurations/settings I can change so that this doesn't happen?
Thanks in advance!
You need to sign the executable created by launch4j as described here to prevent SmartScreen from blocking it to be run. See also the related discussion in the support forum.
Your first question is more like a Windows question. When you unzip an application from a zip file, Windows will naturally mark it as unsafe, in fact if you check the application properties tab, you will see a checkbox where you can remove that unsafe attribute. It's same as running chmod+x for an executable script in Linux.
For the second part, I assume you are using the gradle plugin for Launch4j, there are two main ways to configure Launch4j assuming your project folder is structured commonly with the jre library in the same folder containing your executable folder.
By specifying the path only like
../jre
By specifying the full relative path
../jre/bin/javaw.exe
Your generated xml at the end should look like this in the first case.
<jre>
<path>../jre</path>
</jre>
The main point is that the path to JRE is relative to the position of the executable not the current directory. In this case, we step back one directory from the executable folder to the folder containing jre.
Try setting the bundledJrePath in your build.gradle to just jre8:
launch4j {
...
bundledJrePath = 'jre8'
}
Because that is in your case the relative path where the jre is when extracting the zip.
http://launch4j.sourceforge.net/docs.html
<path>, <minVersion>, <maxVersion>
The <path> property is used to specify the absolute or relative path (to the executable) of a bundled JRE, it does not rely on the current directory or <chdir>. Note that this path is not checked until the actual application execution
Beware that the path must not contain the /bin/javaw.exe.
When running the exe with the debug flag like this
hello-windows.exe --l4j-debug
then it will create a file launch4j.log in the same directory.
There you can check that the correct jre is picked up, for example:
...
Bundled JRE: jre8
Check launcher: C:\Users\IEUser\Downloads\hello-windows\jre8\bin\javaw.exe (OK)
...
I upvoted the answer above from sschuberth, as that is the best answer to your question. Signing the executable will make SmartScreen happy.
As addition I would rather prevent trying to create an executable, even signing it, best to create a MSI. For example by using Javapackager. See also this question. That guy created his own tool after using Nullsoft.
It is very cumbersome to get an executable accepted by every virus scanner around the world. I have the experience of using WIX Toolset to create an MSI and wrapped it into a bootstrapper executable, signed it using the company signing certificate. However in the end I had to send requests to McAfee, Norton, Avast, AVG, KasperSky and Trend Micro. Gladly all accepted it over time, only Trend Micro never even responded.

No agent found in pool Hosted which satisfies the specified demands: svn maven

Using VSTS, and following this step by step guide, I still get this error.
Am using the hosted pool, and have verified it has maven
What could be missing?
Thanks in advance!
That's actually the svn capability which is missing on the hosted agent. You might have to add a user capability and add a task to run a non-installed version of it and set the path on the current machine.
The other solution would be to install your build machine with all the tools you need

Copying files between two windows servers through jenkins

I am working on a project where i want to copy the compiled file (which compiled through jenkins) from one windows server to another through jenkins. Jenkins is installed on a windows server and after building the code, those compiled file should be copied to another windows server through jenkins. Is there any way to achive it?
Jenkins might be able to do it, via the script steps running the scp command; however, if this is part of a build, I would suggest attaching the file(s) to a project, and distributing them through the maven repository.

Websphere application server for developers linux command line install

I tried to install websphere application server for developer v8.5. I've already installed the installation manager. Then I download the image from here: all the three parts of WebSphere Application Server for Developers, Installation Manager Repository. Cause my linux has no GUI, so I unzipped the file and tried to use installation manager to install it.
I used :
./imcl listAvailablePackages -repositories /home/user/tmp/wasdev_installer/repository.config to verify that the package exist.
Then I ran : ./imcl install com.ibm.websphere.DEVELOPERSILAN.v85_8.5.5000.20130514_1044 -repositories /home/user/tmp/wasdev_installer/repository.config -installationDirectory /home/user/Websphere_v85 -accessRights nonAdmin -acceptLicense
But I always got errors like :
ERROR: The silent installation process does not support
installing packages that are contained on multiple media discs.
CRIMC1017E ERROR: Failed to locate zip com.ibm.websphere.batch_136_all.all 8.5.5000.201305110146.
Cannot find the table of contents file for an artifact in the repository. Table of contents files are located under the atoc directory in the repository.
If the repository files were transferred from a different location, verify that the files were not altered during the transfer operation. Copy the repository files to a different location and install from that location.
I re-unzipped the file, but didn't help. Was I doing wrong? Thanks for your help.
Deepending on what programming models you're using, you could always try the WebSphe Liberty Profile artefact install: https://www.ibmdw.net/wasdev/downloads/. It doesn't support every programming model that the full profile does, but it's a super-easy install, and easy to get going with as a development environment.
I resolved this issue by unzipping all files to one directory. The file part1 contains disk1, so the other files should be put under the directory of part1, which means in the same level of disk1 directory.
If you do not want to bother with downloading and decompressing archives containing the Installation Manager repositories, then there is a much easier and simpler process for getting WebSphere Application Server for Developers installed.
Once you have IBM Installation Manager installed, you only need to provide the repository location to where the IBM hosted WebSphere Application Server for Developers repository is located. For instance, to install WAS for Developers version 8.0 or version 8.5, you simply add one of the repository locations to the repository preferences.
V8.0: http://www.ibm.com/software/repositorymanager/V8WASDeveloperILAN
V8.5: http://www.ibm.com/software/repositorymanager/V85WASDeveloperILAN
Instructions for installing WAS for Developers using IBM hosted repositories in available on WASDev.net.
You could even use the IBM hosted repositories in your command line installation or response file installation, as long as you create a secure storage file with you MY IBM ID credentials for authenticating with the IBM servers, as described in the WebSphere Knowledge Center.
Alternatively, you can use the IBM Package Utility (a companion to Installation Manager), to reconstruct the IBM hosted repository on your local machine. The advantage to using PU is that you will be able to create a local repository that also includes the fixpack level of your own choosing rather than having to go get a fixpack from IBM Fix Central and then updating the installation afterwards.
Information on creating local repositories with Packaging Utility is available in the WebSphere Knowledge Center.

Trying to build Tomcat 6 from source: Ant doesn't download libs

I am trying to build Tomcat 6 or 7 on my machine from provided source codes.
I have checked out the sources from repository and ran the ant build.
In the very beginning of the build Ant needs to download the libs Tomcat needs. In the 6th version it is done by separate command 'ant download', in the 7th version this command is incorporated into build.xml.
The problem is that Ant cannot download the libs Tomcat needs for build while trying to build both the versions.
It stops here:
trydownload:
[get] Getting: http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.24/source/tomcat-native-1.1.24-src.tar.gz
[get] To: /Users/dmitrijskorov/libraries/tomcat-native-1.1.24/tomcat-native.tar.gz
After printing this nothing happens. No errors, no end of execution. The file itself is created inside the folder for downloads, but its size is 111KB instead of 262KB if I download it manually. Ping of that server also evaluates ok.
Looks like I have problems with Ant download task.
Probably the reason is some proxy settings I need to provide to Ant. But I dont know how to find out my proxy settings. All settings in all browsers and OS point to automatic detection of proxies and thus I cannot setup proxy in Ant build. And I dont know whether I need this at all.
MacOs Lion, Tomcat 6 or 7, Java 6.
With Ant 1.7 or later you can use the -autoproxy option to Ant to tell it to use the proxy settings from the operating system
ant -autoproxy download
Ref: Ant manual

Resources