I would like to use the enforcer plugin to verify that a required properties is set, specifically it is exists and is not null or a zero length string. I suspect my syntax is incorrect.

What should is the correct syntax?

The following is the error message from the plugin and the configuration.

***
* Message from plugin
***
[WARNING] Rule 0: org.apache.maven.plugin.enforcer.EvaluateBeanshell failed with message: Unable to lookup a component

***
* Plugin configuration from pom.xml
***
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <version>1.0-alpha-3-SNAPSHOT</version>
    <executions>
      <execution>
        <id>enforce-beanshell</id>
        <goals>
          <goal>enforce-once</goal>
        </goals>
        <configuration>
          <rules>
            <evaluateBeanshell>
              <condition>${not empty datasource.url}</condition>
              <message>
                The property datasource.url not defined. This is set in
                profile.
              </message>
            </evaluateBeanshell>
          </rules>
          <fail>true</fail>
        </configuration>
      </execution>
    </executions>
  </plugin>


Paul Spencer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to