Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
public interface MyTest {

     /** more error codes may be added */
     enum Result {
 	OK, UNKNOWN, ERROR, DENIED
     };     // <!-- HERE
 
     /** @return the result */
     public void getResult(); 
  }

NoClassDefFoundError during build

If the javadoc tags are used (and not the annotations) then the QDox library is used to parse/introspect the java class. For this the classes have to be loaded and static fields have to be initialized. If you have have for example something like

No Format

  private static final org.slf4f.Logger LOGGER = org.slf4j.LoggerFactory.getLogger("name");

in your code, during the plugin run, a slf4j logger is tried to instantiated. This requires an implementation of the logger. Ususally your module only depends on the slf4j API and therefore a

No Format

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

is thrown - this often happens with slf4j but might also happen with other libraries.

In these cases you should add a dependency to the missing class to the dependency list of the plugin, like:

No Format

     <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-scr-plugin</artifactId>
         <version>1.4.2</version>
         <dependencies>
             <dependency>
                 <groupId>org.slf4j</groupId>
                 <artifactId>slf4j-simple</artifactId>
                 <version>1.5.2</version>
             </dependency>
         </dependencies>