sonatype / install4j-support

Install4j Support
http://sonatype.github.io/install4j-support/
11 stars 11 forks source link

install4j-maven-plugin fails to start complaining about missing compiler executable #9

Closed pvliss closed 11 years ago

pvliss commented 11 years ago

The plugin fails to start, complaining about missing compiler executable while the file is at the right location. Here is an example of the output:

[INFO] --- install4j-maven-plugin:1.0.3:compile (compile-installers) @ ipdc-jboss-distribution ---
[WARNING] Missing install4j compiler executable: C:\Program Files\install4j5\bin\install4jc

I have taken a look at the source code and I can see that the problem lies in class Install4jcMojoSupport where at lines 71-76, it tries to determine if the compiler executable file exists:

File install4jc = new File(installDir, "bin/install4jc");
        if (!install4jc.exists()) {
            log.warn("Missing install4j compiler executable: " + install4jc);
            return;
        }

The problem is that on Windows machine (as mine) the install4jc file constructed points to a directory and NOT on the actual file, hence the exist() method will always returns false. At least for windows, it should be replaced with:

File install4jc = new File(installDir, "bin/install4jc.exe");

Please let me know if you need any more information.

jdillon commented 11 years ago

Thanks for the report... as you can guess I've not done any testing of this on windows ;-)

I'll look at adding that change shortly... let me know if you find anything else please :-)

jdillon commented 11 years ago

Fixed in 46aed0db3d3d12e5f47c324f3f9788056414b598

pvliss commented 11 years ago

Excellent. Now that was a blazing fast fix and release!!! Thanks a lot!