install python egg files through build tool - java

I am making a project that is primarily in java and meant for java developers but there is a specific library I need to use that uses python.
Assuming the developers have python installed is there a way to automate the installation .egg files in a way that could be run with the same command I use to build the java files (I use maven)
what developer needs to run to setup entire environment:
mvn clean install
And this will download the egg files needed and keep them updated.

Related

How to create a macOS App Installer with Prerequisites

I'm developing a macOS app written in Swift which will not be distributed via the App Store.
I'm looking to create an installer which will install some prerequisites, more exactly install Java on the machine.
Are there any tools available that can create such an installer for an app?
You could get use of .pkg installator, just put java inside this package and call needed setup actions in pre-install bash script. Or even use script to install brew and call brew to install java, whatever.
There is a GUI tool to make pkg-s called Packages, it works fine and it is free. There is also some documentation on their web site.
You can also create package of any complexity using only built-in, Apple-provided console tools.

Installing jre locally in windows app directory

I have a question about deploying windows application with java module.
I have windows application with several modules. One of these modules is written in java and is packaged as jar-archive. And if there's need for using this module, the application ask jre to start execute this jar.
For this time during application installation it's initialized jre installation.
I would like to understand the following.
Is it possible to install during application installation silently install jre in the application directory. So it jre copy could be used by the application.
I'm talking about structure like this:
/app
/app/jre
/app/modules/myModule.jar
So if it's needed to run myModule.jar I could do it with java from app/jre/bin ?
I saw something like that at Spark messenger (http://www.igniterealtime.org/projects/spark/). This application uses its own jre, which is installed at /Spark/jre/. But as I understand, this application is written in java and builded as a windows distributive using install4j.
I tried to find the answer to my question, but maybe I'm doing something wrong, I always find a solution of creating an exe-wrapper for jar file.
I would like to know about possibility to deploy application with installing jre locally in application folder.
You could ideally have used Java Web Start in the past.
Currently, you can use javapackager.
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html
The javapackager command allows developers to create standalone native install bundles that do not require a separate JRE installation. The native options include: installer, image, exe, msi, dmg, rpm, and deb.
This is ideal for desktop applications, where the user may not have their own JRE installed and just wants the program to run. It may not be appropriate for server-based applications where an administrator would want full control over the environment.
https://blogs.oracle.com/java-platform-group/entry/java_web_start_in_or
In your /app/jre/bin folder there should be an executable binary called java. So in your folder /app/modules you can run
/app/jre/bin/java -jar myModule.jar
That should work.

Ant standalone package or another installer (for java web-app, windows)

I would like to create an installer for my app. Since I am using ant for build automation, I would like to use ant for installation purposes as well, but I want to save the user as much trouble as possible, including installing ant.
Is there a way to create a stand-alone ant bundle (one that would not depend on ant being installed in the system), or is there another way to create an installer? I have to install Apache Tomcat, MySQL and some other things on Windows.
I think you're looking for the ANT installer package.
Take care when writing custom installers for other people's applications (thankless task). For 3rd party dependencies that your application has, I would consider using tools like Chef and Puppet. The only issue is that windows support from both these tools is only emerging at the moment.

How create a installable msi package for my java project?

This installer will first check if jvm is present on the system or not. If not then it will first install the jvm. After that it will include the java code (may be in jar) alongwith the database used. And finally it will create a desktop shortcut and make changes to registry as other s/w does.
First you need to decide on a setup authoring tool. Here is a list which can get you started:
http://en.wikipedia.org/wiki/List_of_installation_software
Advanced Installer is one of the tools which has a dedicated Java project type.
To detect and install JVM, you can add it as a prerequisite. This is done differently for each setup tool.
There is a new tool being developed for that: jpackage
If your project is build using Gradle then you can easily use the Badass jlink plugin: https://github.com/beryx/badass-jlink-plugin
to build an installer / package using jpackage
Here's an article how to build an app image using OpenJDK 11 and using OpenJDK 14 with jpackage only for building the installer / package:
https://walczak.it/blog/distributing-javafx-desktop-applications-without-requiring-jvm-using-jlink-and-jpackage

Installers for windows

I am trying to find a native installer for windows to install an enterprise java application. The most important feature I want is the ability to upgrade existing installations in an rpm kind of way (distinguish between configuration files and files to be upgraded/replaced). I am currently using IZPack which as far as I can see lacks this feature.
Other features I require are maven/ant integration, jre version check and bundling, registering as windows server and application (ability to uninstall from windows own tools) and ability to parse and replace parameters in configuration files based on parameters givet at install time.
Do anyone know of an installer that can do all of this?
Check out NSIS. It is scriptable and easy to use.
For Maven integration use the Maven NSIS Plug-in.
It costs money (it definitely couldn't be classed as cheap), but you could consider InstallAnywhere.
I'm using the 2008 pro edition and it does pretty much everything you've specified. I started using it ages ago, and haven't
Ant integration (ant task for building installers)
Ant integration (call an ant build script as part of the installer).
Bundles java (you download specific packs for windows/linux/solaris etc)
Installs as a service
Custom panels for your own look and feel.
Multi-platform Native looking adapter (i.e. no command prompt window a-la batch file start).
Uninstallable via windows control panel.
Parameter replacement in files that have just been installed.
BitRock InstallBuilder can do nearly everything that you mention out of the box, about half of our customers use it to install Java apps on Windows. We do not support the RPM behavior of marking certain files as configuration, but you can replicate this with a little bit of logic inside the installer (you can compare dates or md5s and only substitute if they are different.) We provide free licenses to open source projects and discounts to SMBs, let us know in case you qualify.

Categories