You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2016/10/09 12:34:20 UTC

[jira] [Updated] (MCOMPILER-226) Annotation Precompiler causes javac compiler not to compile

     [ https://issues.apache.org/jira/browse/MCOMPILER-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte updated MCOMPILER-226:
-------------------------------------
    Description: 
when the javac is forked for processing annotations the javac task 
is never called in the compile goal
Here is a workaround
{code:xml} 
  <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>3.0</version>
         <executions>
             <execution>
                   <goals>
                     <goal>compile</goal>
                   </goals>
                   <phase>generate-sources</phase>
                   <configuration>
         <!-- do this first -->
                     <proc>only</proc>
       			<source>1.7</source>
       			<target>1.7</target>
       		    </configuration>
       		   </execution>
       		</executions>
         </plugin>
       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
              <executions>
                  <execution>
                        <goals>
                          <goal>compile</goal>
                        </goals>
                        <phase>compile</phase>
              <configuration>
              <!-- do this second -->
                <proc>none</proc>
            	<source>1.7</source>
            	<target>1.7</target>
              </configuration>
             </execution>
           </executions>
     </plugin>
{code}
This is a hack that needs fixing 
Can we separate the annotation-processing goal as completely separate from the compile goal?

Thanks
Martin

  was:
when the javac is forked for processing annotations the javac task 
is never called in the compile goal
Here is a workaround 
  <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>3.0</version>
         <executions>
             <execution>
                   <goals>
                     <goal>compile</goal>
                   </goals>
                   <phase>generate-sources</phase>
                   <configuration>
         <!-- do this first -->
                     <proc>only</proc>
       			<source>1.7</source>
       			<target>1.7</target>
       		    </configuration>
       		   </execution>
       		</executions>
         </plugin>
       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
              <executions>
                  <execution>
                        <goals>
                          <goal>compile</goal>
                        </goals>
                        <phase>compile</phase>
              <configuration>
              <!-- do this second -->
                <proc>none</proc>
            	<source>1.7</source>
            	<target>1.7</target>
              </configuration>
             </execution>
           </executions>
     </plugin>
This is a hack that needs fixing 
Can we separate the annotation-processing goal as completely separate from the compile goal?

Thanks
Martin


> Annotation Precompiler causes javac compiler not to compile
> -----------------------------------------------------------
>
>                 Key: MCOMPILER-226
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-226
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>         Environment: mvn 3.0.5
> JDK 1.7
> test-bed sisu-inject (loaded with annotations!)
>            Reporter: Martin Gainty
>
> when the javac is forked for processing annotations the javac task 
> is never called in the compile goal
> Here is a workaround
> {code:xml} 
>   <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <version>3.0</version>
>          <executions>
>              <execution>
>                    <goals>
>                      <goal>compile</goal>
>                    </goals>
>                    <phase>generate-sources</phase>
>                    <configuration>
>          <!-- do this first -->
>                      <proc>only</proc>
>        			<source>1.7</source>
>        			<target>1.7</target>
>        		    </configuration>
>        		   </execution>
>        		</executions>
>          </plugin>
>        <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-compiler-plugin</artifactId>
>             <version>3.0</version>
>               <executions>
>                   <execution>
>                         <goals>
>                           <goal>compile</goal>
>                         </goals>
>                         <phase>compile</phase>
>               <configuration>
>               <!-- do this second -->
>                 <proc>none</proc>
>             	<source>1.7</source>
>             	<target>1.7</target>
>               </configuration>
>              </execution>
>            </executions>
>      </plugin>
> {code}
> This is a hack that needs fixing 
> Can we separate the annotation-processing goal as completely separate from the compile goal?
> Thanks
> Martin



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)