You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mark Hobson (JIRA)" <ji...@codehaus.org> on 2008/05/22 15:26:22 UTC

[jira] Created: (MCOMPILER-75) Add apt support for JDK6

Add apt support for JDK6
------------------------

                 Key: MCOMPILER-75
                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
             Project: Maven 2.x Compiler Plugin
          Issue Type: New Feature
    Affects Versions: 2.0.2
            Reporter: Mark Hobson


Apt (Annotation Processing Tool) was merged into javac in JDK6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:

{noformat}
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -Akey[=value]              Options to pass to annotation processors
{noformat}

Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Commented: (MCOMPILER-75) Add apt support for Java 6

Posted by "Robert Varga (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215840#action_215840 ] 

Robert Varga commented on MCOMPILER-75:
---------------------------------------

The proper implementation of -processorpath is really not possible with Maven as I see it at the moment.

The biggest problem is that Maven does not support a thing like tools classpath, a path which jars which the compiler itself needs but must not be on the compile or test or runtime classpath of the just compiled module.

This likely could be introduced possibly with yet another scope (or more).

Not only the processor path, but also the antrun plugin could also benefit from such a new classpath entity.

Currently the only workaround which exists is defining such dependencies with the provided scope, which at least does not trigger propagation of these dependencies.

Of course, this is just my opinion.

Best regards,

Robert Varga

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Commented: (MCOMPILER-75) Add apt support for Java 6

Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=207432#action_207432 ] 

Milos Kleint commented on MCOMPILER-75:
---------------------------------------

the open question with generated-sources/annotation-processing/ output folder setting is how do the xml (or other) files end up in the final binary then. 

For generated .java files, the current solution is to add them to the list of sourceRoots and they get compiled. For non-compilable resources we would have to add them to the list of resources to be processed (but most likely the resources processing phase has already passed by that time).

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Updated: (MCOMPILER-75) Add apt support for Java 6

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hobson updated MCOMPILER-75:
---------------------------------

    Description: 
Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:

{noformat}
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -Akey[=value]              Options to pass to annotation processors
{noformat}

Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
http://mojo.codehaus.org/apt-maven-plugin/index.html

  was:
Apt (Annotation Processing Tool) was merged into javac in JDK6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:

{noformat}
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -Akey[=value]              Options to pass to annotation processors
{noformat}

Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
http://mojo.codehaus.org/apt-maven-plugin/index.html

        Summary: Add apt support for Java 6  (was: Add apt support for JDK6)

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Issue Comment Edited: (MCOMPILER-75) Add apt support for Java 6

Posted by "Robert Varga (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215840#action_215840 ] 

Robert Varga edited comment on MCOMPILER-75 at 3/28/10 8:09 PM:
----------------------------------------------------------------

The proper implementation of -processorpath is really not possible with Maven as I see it at the moment.

The biggest problem is that Maven does not support a thing like tools classpath, a path which jars which the compiler itself needs but must not be on the compile or test or runtime classpath of the just compiled module.

This likely could be introduced possibly with yet another scope (or more).

Not only the processor path, but also the antrun plugin could also benefit from such a new classpath entity.

Currently the only workaround which exists is defining such dependencies with the provided scope, which at least does not trigger propagation of these dependencies, but it still puts such dependencies on the compilation classpath of the module, so compilation itself is possibly providing incorrect results.

Of course, this is just my opinion.

Best regards,

Robert Varga

      was (Author: robvarga):
    The proper implementation of -processorpath is really not possible with Maven as I see it at the moment.

The biggest problem is that Maven does not support a thing like tools classpath, a path which jars which the compiler itself needs but must not be on the compile or test or runtime classpath of the just compiled module.

This likely could be introduced possibly with yet another scope (or more).

Not only the processor path, but also the antrun plugin could also benefit from such a new classpath entity.

Currently the only workaround which exists is defining such dependencies with the provided scope, which at least does not trigger propagation of these dependencies.

Of course, this is just my opinion.

Best regards,

Robert Varga
  
> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Commented: (MCOMPILER-75) Add apt support for Java 6

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179898#action_179898 ] 

Jesse Glick commented on MCOMPILER-75:
--------------------------------------

I think the correct behavior would be to pass something like

-s ${project.basedir}/target/generated-sources/annotation-processing

by default whenever a 269-capable javac is detected.

Part of Maven's appeal is doing the right thing without being told. Since it knows where generated sources ought to be placed in the project structure, it should tell javac that. As usual it could be permitted to _override_ this directory if you had a particular reason to do so.

Note that passing -processorpath or -processor is unnecessary if (1) processors are defined in JARs in your project's classpath, (2) they are registered ServiceLoader-style. In such a case they are all run automatically.

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Commented: (MCOMPILER-75) Add apt support for Java 6

Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215894#action_215894 ] 

Milos Kleint commented on MCOMPILER-75:
---------------------------------------

there is one trick I came up with when working with endorsed libs in j2ee space:
{code:xml}
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.0.2</version>
                        <configuration>
                            <!-- javaee6 contains upgrades of APIs contained within the JDK itself.
                                 As such these need to be placed on the bootclasspath, rather than classpath of the
                                 compiler.
                                 If you don't make use of these new updated API, you can delete the profile.
                                 On non-SUN jdk, you will need to create a similar profile for your jdk, with the similar property as sun.boot.class.path in Sun's JDK.-->
                            <compilerArguments>
                                <bootclasspath>${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path}</bootclasspath>
                            </compilerArguments>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>javax</groupId>
                                <artifactId>javaee-endorsed-api</artifactId>
                                <version>6.0</version>
                            </dependency>
                        </dependencies>
                    </plugin>
{code}

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Commented: (MCOMPILER-75) Add apt support for Java 6

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215901#action_215901 ] 

Mark Hobson commented on MCOMPILER-75:
--------------------------------------

I mentioned this on the list, but we could use the plugin's dependencies as the processor path.  This is how the apt-maven-plugin [currently works|http://mojo.codehaus.org/apt-maven-plugin/examples/configuring-a-factory.html].

Alternatively, to support different usages of plugin dependencies we could specify them using their GAV, like the [maven-shade-plugin|http://maven.apache.org/plugins/maven-shade-plugin/examples/includes-excludes.html].  For example:

{code:xml}
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<configuration>
		<bootArtifacts>
			<bootArtifact>myGroup:myLibrary</bootArtifact>
		</bootArtifacts>
		<processorArtifacts>
			<processorArtifact>myGroup:myProcessor</processorArtifact>
		</processorArtifacts>
	</configuration>
	<dependencies>
		<dependency>
			<groupId>myGroup</groupId>
			<artifactId>myLibrary</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>myGroup</groupId>
			<artifactId>myProcessor</artifactId>
			<version>1.0</version>
		</dependency>
	</dependencies>
</plugin>
{code}

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Commented: (MCOMPILER-75) Add apt support for Java 6

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=207683#action_207683 ] 

Jesse Glick commented on MCOMPILER-75:
--------------------------------------

I don't think Maven need do anything special.

1. Non-Java resources (*.xml etc.) should be placed in the regular -d directory: CLASS_OUTPUT.

2. Generated Java files get compiled by javac automatically in a subsequent round.

-s is even optional in that without it, javac will just hold generated sources in memory until they have been compiled to bytecode. But it is generally useful to have these saved to disk for debugging and IDE usage.

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] Closed: (MCOMPILER-75) Add apt support for Java 6

Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Milos Kleint closed MCOMPILER-75.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2
         Assignee: Milos Kleint

I've added the parameters for -proc, -processor and -s. -s has a default value pointing to target/generated-sources/annotations. they all work only with 1.6+ jdk.

I'm unclear how -processorpath shall be added. -Akey=value params are probably best to be added via the generic parameter.

let's consider this done for 2.2 and open specific issues for any missing features.

> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

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

        

[jira] (MCOMPILER-75) Add apt support for Java 6

Posted by "Parmendra Tyagi (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295664#comment-295664 ] 

Parmendra Tyagi edited comment on MCOMPILER-75 at 4/3/12 8:55 AM:
------------------------------------------------------------------

I tried to using this enhancement. But there is a bug while using option proc.
Here is example
{code:xml} 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
{code} 
here i mentioned {code:xml} <proc>only</proc> {code}. i.e. it *should* *not* compile the code and should do the *annotation processing* only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command {noformat} mvn clean compile {noformat} , it compile the source code. which is not inline with specification 
                
      was (Author: parmendratyagi):
    I tried to using this enhancement. But there is a bug while using option proc.
Here is same 
{code:xml} 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
{code} 
here i mentioned {code:xml} <proc>only</proc> {code}. i.e. it should not compile the code and should do the annotation processing only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command {noformat} mvn clean compile {noformat} , it compile the source code. which is not inline with specification 
                  
> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-75) Add apt support for Java 6

Posted by "Parmendra Tyagi (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295664#comment-295664 ] 

Parmendra Tyagi edited comment on MCOMPILER-75 at 4/3/12 8:52 AM:
------------------------------------------------------------------

I tried to using this enhancement. But there is a bug while using option proc.
Here is same 
{code:xml} 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<excludes>
						<exclude>**/*.*</exclude>
					</excludes>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
{code} 
here i mentioned {code:xml} <proc>only</proc> {code}. i.e. it should not compile the code and should do the annotation processing only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command {noformat} mvn clean compile {noformat} , it compile the source code. which is not inline with specification 
                
      was (Author: parmendratyagi):
    I tried to using this enhancement. But there is a bug while using option proc.
Here is same 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<excludes>
						<exclude>**/*.*</exclude>
					</excludes>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

here i mentioned <proc>only</proc> . i.e. it should not compile the code and should do the annotation processing only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command mvn clean compile, it compile the source code. which is not inline with specification 
                  
> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-75) Add apt support for Java 6

Posted by "Parmendra Tyagi (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295664#comment-295664 ] 

Parmendra Tyagi commented on MCOMPILER-75:
------------------------------------------

I tried to using this enhancement. But there is a bug while using option proc.
Here is same 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<excludes>
						<exclude>**/*.*</exclude>
					</excludes>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

here i mentioned <proc>only</proc> . i.e. it should not compile the code and should do the annotation processing only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command mvn clean compile, it compile the source code. which is not inline with specification 
                
> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-75) Add apt support for Java 6

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295671#comment-295671 ] 

Jesse Glick commented on MCOMPILER-75:
--------------------------------------

Parmendra - your issue should be filed separately in MCOMPILER (can be marked as blocking this one) or it will likely get lost.
                
> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-75) Add apt support for Java 6

Posted by "Parmendra Tyagi (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295664#comment-295664 ] 

Parmendra Tyagi edited comment on MCOMPILER-75 at 4/3/12 8:53 AM:
------------------------------------------------------------------

I tried to using this enhancement. But there is a bug while using option proc.
Here is same 
{code:xml} 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
{code} 
here i mentioned {code:xml} <proc>only</proc> {code}. i.e. it should not compile the code and should do the annotation processing only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command {noformat} mvn clean compile {noformat} , it compile the source code. which is not inline with specification 
                
      was (Author: parmendratyagi):
    I tried to using this enhancement. But there is a bug while using option proc.
Here is same 
{code:xml} 
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<proc>only</proc>
					<excludes>
						<exclude>**/*.*</exclude>
					</excludes>
					<annotationProcessors>
						<annotationProcessor>com.annotation.processor.AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
{code} 
here i mentioned {code:xml} <proc>only</proc> {code}. i.e. it should not compile the code and should do the annotation processing only ( I also cross check this behavior with javac tool of Java 1.6 update 23), but while invoking command {noformat} mvn clean compile {noformat} , it compile the source code. which is not inline with specification 
                  
> Add apt support for Java 6
> --------------------------
>
>                 Key: MCOMPILER-75
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-75
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.0.2
>            Reporter: Mark Hobson
>            Assignee: Milos Kleint
>             Fix For: 2.2
>
>
> Apt (Annotation Processing Tool) was merged into javac in Java 6.  The compiler plugin should support this new functionality, which means supporting the following new arguments:
> {noformat}
>   -proc:{none,only}          Control whether annotation processing and/or compilation is done.
>   -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
>   -processorpath <path>      Specify where to find annotation processors
>   -s <directory>             Specify where to place generated source files
>   -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
>   -Akey[=value]              Options to pass to annotation processors
> {noformat}
> Note that this should supersede the Apt Maven Plugin at Mojo by encompassing all of its functionality:
> http://mojo.codehaus.org/apt-maven-plugin/index.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira