One-click remote deployment with jboss and eclipse via maven

Create a maven goal which deploy to a remote jboss eap 6.x instance is quite simple.

Just add the following to your pom.xml


Then create a maven run configuration in eclipse having:
– Base directory set to the variable ${project_path} (so that it applies to the current project)
– Goal: jboss-as:deploy

A jar of Perl: PAR – II : repacking

After reading the previous post on PAR, you may want to unpack, modify and repack an existing PAR application.

Let’s play the game with a ficticious my-perl-webapp.bin

= First: unpack and analyze =

#mkdir /tmp/tmpdir/;
#unzip my-perl-webapp.bin -d /tmp/tmpdir/;
# cd /tmp/tmpdir

In tmpdir we’ll find:
the usual ./script/ directory with all the perl files run by the application;
the auto-generated by par;
the MANIFEST and META.yml files;
the ./lib/ directory with all the dependencies.

= Second: modify whatever =

Now you have all the perl files and you can modify and fix whatever you want.
Check and test before rebuild!

= Third: repack (simple) =

The first time we’ll try to repack with a simple:

# pp -P -o /tmp/my-perl-webapp-1.bin script/{all .pl files but } ;

Remember that is auto-generated by PAR.
When everything is done, check if all the dependencies have been added (ex. confronting package content with unzip -t)

= Fourth: repack (working) =

Repacking may require some more work. The pp command may not notify all the required dependencies you need.
You can check the MANIFEST for a list of files to add to your package.

Add to the package all the files present in the original one. You can do it with

# pp -a lib/ -a lib/ … -P -o …

To speed up things we’ll use find:

# find lib -type f -printf ” -a %p ” | \
xargs pp -P \
-o /tmp/my-perl-webapp-1.bin \
script/{all .pl files but }
-a META.yml

If you don’t remember how find -printf works you can check #man