ok, I have this setup:

src/foo/A.java ----
package foo;
/** A comment */
public @interface A{
}
-------------------------

and this build.xml:

<?xml version="1.0"?>
<project name="foo" default="doc">
  <taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"/>
  <target name="doc" >
      <ajdoc destdir="docoutput" srcdir="src">
      </ajdoc>
  </target>
</project>

It fails with:

doc:
    [ajdoc] > Calling ajc...
    [ajdoc] F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\src\foo\A.java:4
[error] Syntax error, annotation declarations are only available if source
level is 5.0
    [ajdoc] public @interface A{

I then change the build.xml:
<?xml version="1.0"?>
<project name="foo" default="doc">
  <taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"/>
  <target name="doc" >
      <ajdoc destdir="docoutput" srcdir="src" source="1.5">
      </ajdoc>
  </target>
</project>

and it works fine:
doc:
    [ajdoc] > Calling ajc...
    [ajdoc] > Building signature files...
    [ajdoc] > Calling javadoc...
    [ajdoc] Loading source file
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\ajdocworkingdir\foo\A.java...
    [ajdoc] Constructing Javadoc information...
    [ajdoc] Standard Doclet version 1.5.0_15
    [ajdoc] Building tree for all the packages and classes...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\foo/\A.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\foo/\package-frame.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\foo/\package-summary.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\foo/\package-tree.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\constant-values.html...
    [ajdoc] Building index for all the packages and classes...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\overview-tree.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\index-all.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\deprecated-list.html...
    [ajdoc] Building index for all classes...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\allclasses-frame.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\allclasses-noframe.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\index.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\help-doc.html...
    [ajdoc] Generating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\stylesheet.css...
    [ajdoc] > Decorating html files...
    [ajdoc] > Decorating
F:\workspaces\aspectj16_2\tests\bugs164\ajdoc\docoutput\foo\A.html...
    [ajdoc] > Removing generated tags...
    [ajdoc] > Finished.


what are you doing differently to me? and what is the actual error you see?

Andy.





2009/1/19 Tobias Demuth <[email protected]>

> Hi,
>
> 'source' was my first guess too. I tried 'source="1.5"' and 'source="5.0"',
> but none of them works. Here is my task, 'prepare' just creates some
> folders:
>
> <!-- Generates the documentation -->
>   <target name="doc" depends="prepare">
>       <ajdoc
>           destdir="${DOC_LOC}"
>           packagenames="de.tobiasdemuth.common.*"
>           classpathref="class.path"
>           source="1.5">
>               <sourcepath>
>                   <dirset dir="${SOURCE_LOC}">
>                       <include name="**/**" />
>                       <exclude name="**/test/**" />
>                   </dirset>
>               </sourcepath>
>       </ajdoc>
>   </target>
>
> Andy Clement schrieb:
>
>> Hi Tobias,
>>
>> The Ant tasks haven't had many updates lately - but they should all be
>> working just fine.  Does the attribute 'source' not work for you?  I'm not
>> setup to try it right now but from the code (not the doc...) it looks like
>> 'source="1.5"' ought to work as it just gets passed onto the internals as
>> "-source 1.5".  If that doesn't work, let me know and we'll sort it out.
>>  Really I ought to at least make ajc/ajdoc (and their ant tasks) default to
>> 1.5 now, if not 1.6...
>>
>> cheers,
>> Andy.
>>
>> 2009/1/17 Tobias Demuth <[email protected] <mailto:
>> [email protected]>>
>>
>>    Hi,
>>
>>    I'm trying to document my project using the ajdoc-ant-task.
>>    Apparently ajdoc does a rebuild of my source-files in order to
>>    document them. This step fails, because ajdoc uses source-level
>>    1.4, but I'm using Java 5. I didn't find any attribute for fixing
>>    this in the documentation (maybe looking at the wrong place?). So,
>>    what can I do? Are the ant-tasks under current development? Or is
>>    everyone so eager using Maven that nobody wants to support good
>>    old Ant?
>>
>>    thanks in advance,
>>    Tobias
>>    _______________________________________________
>>    aspectj-users mailing list
>>    [email protected] <mailto:[email protected]>
>>    https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> aspectj-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to