openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: svn commit: r933342 - in /openjpa/trunk: openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java openjpa-project/src/doc/manual/jpa_overview_criteria.xml scripts/domain-class.list scripts/mmg.bat scripts/mm
Date Mon, 12 Apr 2010 19:16:01 GMT
Hi Pinaki,

Two quick comments below :

On Mon, Apr 12, 2010 at 1:12 PM, <ppoddar@apache.org> wrote:

> Author: ppoddar
> Date: Mon Apr 12 18:12:49 2010
> New Revision: 933342
>
> URL: http://svn.apache.org/viewvc?rev=933342&view=rev
> Log:
> OPENJPA-1628,OPENJPA-1187,OPENJPA-1622: Use javac's -s option to control
> output rather than extraneous -Aout option
>
> Modified:
>
>  openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java
>    openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_criteria.xml
>    openjpa/trunk/scripts/domain-class.list
>    openjpa/trunk/scripts/mmg.bat
>    openjpa/trunk/scripts/mmg.options
>
> Modified:
> openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java
> URL:
> http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java?rev=933342&r1=933341&r2=933342&view=diff
>
> ==============================================================================
> ---
> openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java
> (original)
> +++
> openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java
> Mon Apr 12 18:12:49 2010
> @@ -20,14 +20,10 @@ package org.apache.openjpa.persistence.m
>
>  import static javax.lang.model.SourceVersion.RELEASE_6;
>
> -import java.io.File;
>  import java.io.IOException;
> -import java.io.OutputStream;
>  import java.io.PrintWriter;
> -import java.net.URI;
>  import java.net.URL;
>  import java.util.Arrays;
> -import java.util.Collections;
>  import java.util.Date;
>  import java.util.List;
>  import java.util.Map;
> @@ -47,11 +43,7 @@ import javax.lang.model.type.TypeMirror;
>  import javax.lang.model.util.Elements;
>  import javax.persistence.metamodel.StaticMetamodel;
>  import javax.tools.Diagnostic;
> -import javax.tools.JavaCompiler;
>  import javax.tools.JavaFileObject;
> -import javax.tools.StandardJavaFileManager;
> -import javax.tools.StandardLocation;
> -import javax.tools.ToolProvider;
>
>  import org.apache.openjpa.lib.util.Localizer;
>  import org.apache.openjpa.meta.MetaDataFactory;
> @@ -79,26 +71,16 @@ import org.apache.openjpa.persistence.ut
>  * <TABLE border="1">
>  * <TR><TD>-Alog={log level}<TD>The logging level. Default is
> <code>WARN</code>. Permissible values are
>  *     <code>TRACE</code>, <code>INFO</code>, <code>WARN</code>
or <code>
> ERROR</code>.
> - * <TR><TD>-Asource={n}         <TD>Java source version of the generated
> code. Default is <code>6</code>.
> - * <TR><TD>-Anaming={class name}        <TD>fully-qualified name of
a
> class implementing
> + * <TR><TD>-Asource={n}          <TD>Java source version of the generated
> code. Default is <code>6</code>.
> + * <TR><TD>-Anaming={class name} <TD>fully-qualified name of a class
> implementing
>  * <code>org.apache.openjpa.meta.MetaDataFactory</code> that determines
>  * the name of a meta-class given the name of the original persistent Java
> entity class. Defaults to
>  * <code>org.apache.openjpa.persistence.PersistenceMetaDataFactory</code>
> which appends a underscore character
>  * (<code>_</code>) to the original Java class name.
> - * <TR><TD>-Aheader={url}           <TD>
> + * <TR><TD>-Aheader={url}        <TD>
>  * A url whose content will appear as comment header to the generated
> file(s). Recognizes special value
>  * <code>ASL</code> for Apache Source License header as comment. By default
> adds a OpenJPA proprietary
>  * text.
> - * <TR><TD>-Aout={dir}                      <TD>
> - * A directory in the local file system. The generated files will be
> written <em>relative</em> to this directory
> - * according to the package structure i.e. if <code>dir</code> is
> specified as <code>/myproject/generated-src</code>
> - * then the generated source code will be written to
> <code>/myproject/generated-src/mypackage/MyEntity_.java</code>.
> - * If this option is not specified, then an attempt will be made to write
> the generated source file in the same
> - * directory of the source code of original class
> <code>mypackage.MyEntity</code>. The source code location for
> - * <code>mypackage.MyEntity</code> can only be determined for Sun JDK6 and
> <code>tools.jar</code> being available
> - * to the compiler classpath. If the source code location for the original
> class can not be determined, and the
> - * option is not specified, then the generated source code is written
> relative to the current directory according
> - * to the package structure.
>  * </TABLE>
>  * <br>
>  *
> @@ -112,18 +94,15 @@ import org.apache.openjpa.persistence.ut
>     "javax.persistence.Embeddable",
>     "javax.persistence.MappedSuperclass" })
>  @SupportedOptions({ "openjpa.log", "log",
> -                     "openjpa.out", "out",
> -                     "openjpa.source", "source",
> -                     "openjpa.naming", "naming",
> -                     "openjpa.header", "header",
> -                     "openjpa.generate"
> +                    "openjpa.source", "source",
> +                    "openjpa.naming", "naming",
> +                    "openjpa.header", "header",
> +                    "openjpa.generate"
>                   })
>

It seems weird that we have shorter aliases for each option except
openjpa.generate, is there a reason that property should be different?

It also seems like the short names have the potential for collision with any
other annotation parsers which are on the classpath. It's probably safer to
qualify them all (like we do with persistence props) just in case.

-mike

<snip>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message