Parmendra Tyagi created MCOMPILER-168:
-----------------------------------------

             Summary: Maven try to compile the source code (generate the .class 
files)even while proc only option is set which is not inline with Javac 
specification 
                 Key: MCOMPILER-168
                 URL: https://jira.codehaus.org/browse/MCOMPILER-168
             Project: Maven 2.x Compiler Plugin
          Issue Type: Bug
    Affects Versions: 2.3.2
         Environment: Windows 7 Professional

Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530)
Maven home: E:\Maven
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
Java home: C:\Program Files (x86)\Java\jdk1.6.0_23\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
            Reporter: Parmendra Tyagi
            Priority: Blocker


I tried to using option {code:xml}<proc>only</proce>{code} with the maven 
compiler plugin, but it try to compile the source code and generate the .class 
files.
Below is the sample 
{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>
                                </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 -e -X clean compile {noformat} , it compile the source 
code. which is not inline with specification .
Here is output of command.
{code:title=command window output|borderStyle=solid}
[DEBUG] Source roots:
[DEBUG]  E:\.......\src\main\java
[DEBUG] Command line options:
[DEBUG] -d E:\......\target\classes -classpath 
E:\......\target\classes;C:\Users\......\.m2\repository\com\test\annotationProcessor\0.0.1-SNAPSHOT\annotationProcessor-0.0.1-SNAPSHOT.jar;C:\Users\......\.m2\repository\com\test\annotation\0.0.1-SNAPSHOT\annotation-0.0.1-SNAPSHOT.jar;
 -sourcepath E:\......\src\main\java; 
E:\......\src\main\java\com\test\AnnotationUser.java -g -nowarn -target 1.5 
-source 1.5
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. 
build is platform dependent!
[INFO] Compiling 1 source file to E:\......\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.976s
[INFO] Finished at: Wed Apr 04 10:42:47 IST 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
{code}

Please update the output log too while doing only annotation processing.

--
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

        

Reply via email to