You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Frank Schwarz (JIRA)" <ji...@apache.org> on 2010/04/12 15:21:41 UTC

[jira] Created: (OPENJPA-1628) Output control for generated canonical metamodel source code

Output control for generated canonical metamodel source code
------------------------------------------------------------

                 Key: OPENJPA-1628
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
             Project: OpenJPA
          Issue Type: Improvement
          Components: jpa
    Affects Versions: 2.0.0-beta3
            Reporter: Frank Schwarz


I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.

There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.

Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1628:
----------------------------------

    Fix Version/s: 2.1.0

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pinaki Poddar resolved OPENJPA-1628.
------------------------------------

    Fix Version/s: 2.0.0
                       (was: 2.1.0)
       Resolution: Fixed

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter reopened OPENJPA-1628:
-----------------------------------


Re-opening so that we can re-target this to get resolved in 2.0.0 (since we have to re-spin)...

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855981#action_12855981 ] 

Pinaki Poddar commented on OPENJPA-1628:
----------------------------------------

Thanks Frank for the patch. I agree that the usage of existing "-s" or "-d" option to javac is the proper way to control the output rather than a redundant -Aout flag. As far as I recall, however, the values of -s/-d switches were not available consistently within the annotation processing environment -- but I admit that I did not pay enough attention or research sufficiently to output control at the time of writing the processor. 

I will prefer to apply your patch. Will you please update us on which compilers have you tried the patch with? 

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods resolved OPENJPA-1628.
-----------------------------------

    Resolution: Fixed

Checked into 2.0.x branch on 4/15/10 by Pinaki as r934511

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Frank Schwarz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Schwarz updated OPENJPA-1628:
-----------------------------------

    Patch Info: [Patch Available]

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter updated OPENJPA-1628:
----------------------------------

    Fix Version/s: 2.0.0
                       (was: 2.1.0)

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Frank Schwarz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Schwarz updated OPENJPA-1628:
-----------------------------------

    Attachment: OPENJPA-1628.patch

"worksforme"-patch attached (the patch will break the "openjpa.out" property processing - which imho. should not be needed at all.)

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Frank Schwarz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856035#action_12856035 ] 

Frank Schwarz commented on OPENJPA-1628:
----------------------------------------

I tested my patch under Sun JDK 1.6.0_18 with Ant 1.7.1 and with eclipse 3.5.2 (with the same JDK) - but with only a few model classes. The patch should still be tested with a somewhat larger amount of entity classes.

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pinaki Poddar reassigned OPENJPA-1628:
--------------------------------------

    Assignee: Pinaki Poddar

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1628) Output control for generated canonical metamodel source code

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1628:
----------------------------------

    Fix Version/s: 2.1.0
                       (was: 2.0.0)

Setting Fix Version to 2.1.0, as changes have only been checked into trunk (2.1.0-SNAPSHOT)

> Output control for generated canonical metamodel source code
> ------------------------------------------------------------
>
>                 Key: OPENJPA-1628
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1628
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta3
>            Reporter: Frank Schwarz
>            Assignee: Pinaki Poddar
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1628.patch
>
>
> I think, the way the JPA metamodel generator places the generated Java files, is flawed. I would have reopened OPENJPA-1187, if I had been able to.
> There should be no need to specify a proprietary switch ("openjpa.out") to specify the output dir. There is a switch '-s' to be used with javac to specify the output directory of the generated source files; see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html. A proprietary switch should only be used as a fallback option for inconsistent java-implementations.
> Furthermore, the current approach does not play well with eclipse IDE annotation processing. The generated source files are placed under the eclipse installation directory. I can only prevent this, if I specify a fully qualified "out"-path. This is not feasible, as a project with these settings might be checked out to everywhere.
> The current approach with "setSourceOutputDirectory(new File(outDir))" seams only to be working by coincidence with relative paths (e.g with ant-javac).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira