Closed AndreasSchaek closed 10 years ago
Sorry about that, you are right the docs and code are not in sync here.
I suggest you simply define a dummy property in your pom.xml for now. This is how we are presently using the plugin with this in the pom.xml of the project building the installers, and we override this in settings.xml to configure real details:
<properties>
<install4j.home>NOT_CONFIGURED</install4j.home>
<install4j.winKeystorePassword>NOT_CONFIGURED</install4j.winKeystorePassword>
<install4j.macKeystorePassword>NOT_CONFIGURED</install4j.macKeystorePassword>
<install4j-support.version>1.0.6</install4j-support.version>
</properties>
And I’ll try and find time to update the plugin so this is not needed, but no idea when I’ll find time ATM ;-)
I'm about to look into the source and bugfix it. Do you want me to post a patch when I'm done?
Well this one is pretty easy. Here's the patch since im unable to send it to the repository
install4j-maven-plugin/src/main/java/org/sonatype/install4j/maven/Install4jcMojoSupport.java
index 4277708..3396b56 100644
@@ -41,7 +41,7 @@ public abstract class Install4jcMojoSupport
/**
* The location of the install4j installation.
*/
- @Parameter(property = "install4j.home", required = true)
+ @Parameter(property = "install4j.home", required = false)
protected File installDir;
/**
@@ -62,7 +62,11 @@ public abstract class Install4jcMojoSupport
AntHelper ant = new AntHelper(this, project);
- if (!installDir.exists()) {
+ if (installDir == null) {
+ maybeFailIfMissing("install directory not set. Skipping build step");
+ return;
+ }
+ else if (!installDir.exists()) {
maybeFailIfMissing("Invalid install directory: " + installDir);
return;
}
please verify and I'll start a release
tested and working.
1.0.7 released, updating site now
The documentation says, that the goal insatll-license will be skipped, if install4j.home is not set or invalid. But when install4j.home is not set i get this error message and the build fails:
When I set the variable to an invalid location, the goal is skipped. Since I dont want all clients to set a variable to an invalid location, I need the goal to be skipped, when the variable is not set.