This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251149 - Wrong location of AP generated sources when redefined in project.properties
Summary: Wrong location of AP generated sources when redefined in project.properties
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-13 09:29 UTC by Jaroslav Tulach
Modified: 2015-09-02 14:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2015-03-13 09:29:07 UTC
I am playing with Graal sources as issue 251142 mentions. I am trying to understand inconsistencies between their command line and NetBeans build. One problem I have is with projects that are using annotation processors. 

The graal build system places such generated files into src_gen next to src in each project. And then it tries to convince NetBeans IDE to use the same directory. As far as I can see it defines in project.properties full path to that directory:

src.ap-source-output.dir=/graal/graal/com.oracle.graal.java/src_gen

(it could possibly be relative), but the problem is that build-impl.xml seems to be using it only partially:

<target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
            <attribute default="${src.dir}:${src.ap-source-output.dir}" name="srcdir"/>
            <attribute default="${build.classes.dir}" name="destdir"/>
            <attribute default="${javac.classpath}" name="classpath"/>
            <attribute default="${javac.processorpath}" name="processorpath"/>
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
            <attribute default="${includes}" name="includes"/>
            <attribute default="${excludes}" name="excludes"/>
            <attribute default="${javac.debug}" name="debug"/>
            <attribute default="${empty.dir}" name="sourcepath"/>
            <attribute default="${empty.dir}" name="gensrcdir"/>
            <element name="customize" optional="true"/>

shouldn't the default value of 'apgeneratedsrcdir' be ${src.ap-source-output.dir}? If I manually change the line to 

            <attribute default="${src.ap-source-output.dir}" name="apgeneratedsrcdir"/>

The build starts to behave reasonably. I admit I don't understand the intentions well, so I am not sure if this is a bug or not? If it is a bug, can it be fixed in 8.0.x? Or is there some work around? Thanks for your evaluation.
Comment 1 Jaroslav Tulach 2015-03-13 09:45:36 UTC
The project in question can be obtained by:

$ hg clone http://hg.openjdk.java.net/graal/graal
$ mx.sh netbeansinit
$ cd graal/com.oracle.graal.java
Comment 2 Tomas Stupka 2015-09-02 14:04:57 UTC
discussed this offline with Jarda - doesn't seem to be such a problem anymore. 
closing for now (until the need doesn't reappear)