You need to tell the javadoc plugin that you are using source level 1.4:
http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html#source

Cheers,
Brett

On 12/04/2008, Trenton D. Adams <[EMAIL PROTECTED]> wrote:
> I get the following errors when using the maven-javadoc-plugin.
>       <plugin>
>         <inherited>true</inherited>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-javadoc-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>attach-javadocs</id>
>             <goals>
>               <goal>jar</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
>
>  The code is using assert properly, so it shouldn't cause an issue.
>
>  [INFO]
>  ------------------------------------------------------------------------
>  [ERROR] BUILD ERROR
>  [INFO]
>  ------------------------------------------------------------------------
>  [INFO] Error while creating archive:Exit code: 1 -
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  not a statement
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  ';' expected
>                         assert false;
>                                ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  not a statement
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  ';' expected
>                         assert false;   // should never happen because of
>  '\\D'
>                                ^
>
>  Command line was:"cd /data/MyDocuments/java/oros/oros/web/target/apidocs &&
>  /opt/blackdown-jdk-1.4.2.03/jre/../bin/javadoc" @options @packages
>
>  [INFO]
>  ------------------------------------------------------------------------
>  [INFO] Trace
>  org.apache.maven.lifecycle.LifecycleExecutionException: Error while creating
>  archive:Exit code: 1 -
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  not a statement
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  ';' expected
>                         assert false;
>                                ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  not a statement
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  ';' expected
>                         assert false;   // should never happen because of
>  '\\D'
>                                ^
>
>  Command line was:"cd /data/MyDocuments/java/oros/oros/web/target/apidocs &&
>  /opt/blackdown-jdk-1.4.2.03/jre/../bin/javadoc" @options @packages
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at
>  org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
>  org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>  Caused by: org.apache.maven.plugin.MojoExecutionException: Error while
>  creating archive:Exit code: 1 -
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  not a statement
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  ';' expected
>                         assert false;
>                                ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  not a statement
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  ';' expected
>                         assert false;   // should never happen because of
>  '\\D'
>                                ^
>
>  Command line was:"cd /data/MyDocuments/java/oros/oros/web/target/apidocs &&
>  /opt/blackdown-jdk-1.4.2.03/jre/../bin/javadoc" @options @packages
>         at
>  org.apache.maven.plugin.javadoc.JavadocJar.execute(JavadocJar.java:144)
>         at
>  
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at
>  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         ... 16 more
>  Caused by: org.apache.maven.reporting.MavenReportException: Exit code: 1 -
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  not a statement
>                         assert false;
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:113:
>  ';' expected
>                         assert false;
>                                ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  warning: as of release 1.4, assert is a keyword, and may not be used as an
>  identifier
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  not a statement
>                         assert false;   // should never happen because of
>  '\\D'
>                         ^
>  
> /data/MyDocuments/java/oros/oros/web/src/main/java/ca/montage/banner/web/commands/studentrecord/TranscriptRequestCommand.java:133:
>  ';' expected
>                         assert false;   // should never happen because of
>  '\\D'
>                                ^
>
>  Command line was:"cd /data/MyDocuments/java/oros/oros/web/target/apidocs &&
>  /opt/blackdown-jdk-1.4.2.03/jre/../bin/javadoc" @options @packages
>         at
>  
> org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:1580)
>         at
>  org.apache.maven.plugin.javadoc.JavadocJar.execute(JavadocJar.java:113)
>         ... 18 more
>  [INFO]
>  ------------------------------------------------------------------------
>  [INFO] Total time: 25 seconds
>  [INFO] Finished at: Fri Apr 11 17:12:09 MDT 2008
>  [INFO] Final Memory: 17M/39M
>  [INFO]
>  ------------------------------------------------------------------------
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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

Reply via email to