Monthly Archives: July 2018

Apache Maven: How to extract XML node values from the pom.xml (in pure batch!)

If you are a Java developer you certainly know Apache Maven, which is (more or less) a Make equivalent for the Java world.

Some days ago I needed to automatically extract some values from the pom.xml file to automatize some operations. For example, I wanted to extract the values of the groupId, artifactId and version nodes from a Maven project, i.e. from the pom.xml file.

I finally created a pure Windows batch solution in order to do that, I called this little utility: POM Tool.

Here is the source code of it:

Just copy-paste that source code into a new file and call the file pomtool.cmd.

The usage is pretty simple:

This will give you the value of the artifactId node for the c:\temp\my-maven-project\pom.xml file!

Of course you can include a call to the POM Tool in another batch file, for example:

In that way, the %PROJECT_NAME% variable in your batch will have the output of the POM Tool utility, in that example the content of the description node! 🙂

Don’t hesitate to comments if you have any question! 🙂

Installing DiscJuggler on Windows 10

If the Sega Dreamcast world is familiar to you, you most certainly know the  CDI image format. CDI images are mostly bootable images for the Dreamcast: simply burn the CDI disc image and then put that burned CD-R inside the Dreamcast to see the game booting.

CDI images are generated with a tool named Padus DiscJuggler. The latest version (development is halted) is the 6.00.1400 version released back in 2007. Today, I wanted to install this tool on my Microsoft Windows 10 Pro x64 Update 1803 computer, but unfortunately it doesn’t work, this message always appears:

You need to reboot your system.

That’s obviously what I did. I restarted 3 times but nothing to do: this message is still displayed and the software does not install.

After disassembling the executable, the problem is simple. It’s caused by the presence of some values ​​in the Windows Registry under the RunOnce key. Since DiscJuggler is a 32-bit program, you have to check if there are values in these locations:

So actually in my case I had many values ​​in the keys above:

A value is present in the RunOnce key

In theory, it’s enough to restart the computer so that the RunOnce keys are cleared automatically of their values. Programs in these keys are in theory executed only once then these corresponding values ​​are automatically deleted (in this screenshot, the only value that exists is called PreRun).

But in my case, nothing works, the RunOnce key always contains something: this famous PreRun program from Gigabyte! This is because I actually have a Gigabyte motherboard and I’ve installed some tools that came with my motherboard. Even by deleting this value by hand (do not forget to run regedit in Administrator mode), it’s always re-created automatically (just hit F5 to see it reappearing after a few seconds …). So the installation of DiscJuggler always displays that You need to reboot your system. message…

In my case, the solution is simple. I’ve just stopped the GIGABYTE Adjust service so the PreRun value isn’t recreated, just enough time to install DiscJuggler.

Stopping the GIGABYTE Adjust service

After doing this, the installation can begins:

Installing Padus DiscJuggler 6.00.1400 under Windows 10

And best of all, the program works very well under Windows 10! 🙂