You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Eduardo Guadalupe <ed...@gmail.com> on 2018/04/11 22:40:10 UTC

[Java]Compile On Save in a Maven project

Dear all,

I am using NetBeans in a Maven project. Recently we changed the
implementation of the aspects from Spring AOP to AspectJ compiler(With
AspectJ-maven-plugin plugin).

With the Clean and Build task the AspectJ plugin weaves all classes but
when saving a class with the feature "Compile On Save" activated the
aspects are not applied.

What Maven goal is triggered in Compile On Save process?
Could the aspects be applied automatically in the Compile On Save process?

I am running NetBeans 8.2 on Windows 10 x64.

pom.xml plugins

<project>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.11</version>
<configuration>
<complianceLevel>1.7</complianceLevel>
<source>1.7</source>
<target>1.7</target>
<XnoInline>true</XnoInline>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.9.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

Thanks,
Eduardo Guadalupe Quintanilla Flores

Re: [Java]Compile On Save in a Maven project

Posted by John Muczynski <jo...@gmail.com>.
Hello all,

Here's the pom reformatted. Hopefully it goes thru email okay.

<project>
    <packaging>war</packaging>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.11</version>

                <configuration>
                    <complianceLevel>1.7</complianceLevel>
                    <source>1.7</source>
                    <target>1.7</target>
                    <XnoInline>true</XnoInline>
                </configuration>

                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>

                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.9.0</version>
                    </dependency>
                </dependencies>
            </plugin>


        </plugins>
    </build>
</project>


On Wed, Apr 11, 2018 at 6:51 PM eduardogqf@gmail.com <ed...@gmail.com>
wrote:

> Sorry for the pom.xml format.
>
> <project>
>     <packaging>war</packaging>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>3.7.0</version>
>                 <configuration>
>                     <source>1.7</source>
>                     <target>1.7</target>
>                     <encoding>UTF-8</encoding>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>aspectj-maven-plugin</artifactId>
>                 <version>1.11</version>
>                 <configuration>
>                     <complianceLevel>1.7</complianceLevel>
>                     <source>1.7</source>
>                     <target>1.7</target>
>                     <XnoInline>true</XnoInline>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>compile</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>                 <dependencies>
>                     <dependency>
>                         <groupId>org.aspectj</groupId>
>                         <artifactId>aspectjtools</artifactId>
>                         <version>1.9.0</version>
>                     </dependency>
>                 </dependencies>
>             </plugin>
>         </plugins>
>     </build>
> </project>
>
> On 2018/04/11 22:40:10, Eduardo Guadalupe <ed...@gmail.com> wrote:
> > Dear all,
> >
> > I am using NetBeans in a Maven project. Recently we changed the
> > implementation of the aspects from Spring AOP to AspectJ compiler(With
> > AspectJ-maven-plugin plugin).
> >
> > With the Clean and Build task the AspectJ plugin weaves all classes but
> > when saving a class with the feature "Compile On Save" activated the
> > aspects are not applied.
> >
> > What Maven goal is triggered in Compile On Save process?
> > Could the aspects be applied automatically in the Compile On Save
> process?
> >
> > I am running NetBeans 8.2 on Windows 10 x64.
> >
> > pom.xml plugins
> >
> > <project>
> > <packaging>war</packaging>
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-compiler-plugin</artifactId>
> > <version>3.7.0</version>
> > <configuration>
> > <source>1.7</source>
> > <target>1.7</target>
> > <encoding>UTF-8</encoding>
> > </configuration>
> > </plugin>
> > <plugin>
> > <groupId>org.codehaus.mojo</groupId>
> > <artifactId>aspectj-maven-plugin</artifactId>
> > <version>1.11</version>
> > <configuration>
> > <complianceLevel>1.7</complianceLevel>
> > <source>1.7</source>
> > <target>1.7</target>
> > <XnoInline>true</XnoInline>
> > </configuration>
> > <executions>
> > <execution>
> > <goals>
> > <goal>compile</goal>
> > </goals>
> > </execution>
> > </executions>
> > <dependencies>
> > <dependency>
> > <groupId>org.aspectj</groupId>
> > <artifactId>aspectjtools</artifactId>
> > <version>1.9.0</version>
> > </dependency>
> > </dependencies>
> > </plugin>
> > </plugins>
> > </build>
> > </project>
> >
> > Thanks,
> > Eduardo Guadalupe Quintanilla Flores
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: [Java]Compile On Save in a Maven project

Posted by ed...@gmail.com, ed...@gmail.com.
Sorry for the pom.xml format.

<project>
    <packaging>war</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.11</version>
                <configuration>
                    <complianceLevel>1.7</complianceLevel>
                    <source>1.7</source>
                    <target>1.7</target>
                    <XnoInline>true</XnoInline>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.9.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>

On 2018/04/11 22:40:10, Eduardo Guadalupe <ed...@gmail.com> wrote: 
> Dear all,
> 
> I am using NetBeans in a Maven project. Recently we changed the
> implementation of the aspects from Spring AOP to AspectJ compiler(With
> AspectJ-maven-plugin plugin).
> 
> With the Clean and Build task the AspectJ plugin weaves all classes but
> when saving a class with the feature "Compile On Save" activated the
> aspects are not applied.
> 
> What Maven goal is triggered in Compile On Save process?
> Could the aspects be applied automatically in the Compile On Save process?
> 
> I am running NetBeans 8.2 on Windows 10 x64.
> 
> pom.xml plugins
> 
> <project>
> <packaging>war</packaging>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.7.0</version>
> <configuration>
> <source>1.7</source>
> <target>1.7</target>
> <encoding>UTF-8</encoding>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>aspectj-maven-plugin</artifactId>
> <version>1.11</version>
> <configuration>
> <complianceLevel>1.7</complianceLevel>
> <source>1.7</source>
> <target>1.7</target>
> <XnoInline>true</XnoInline>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>compile</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>org.aspectj</groupId>
> <artifactId>aspectjtools</artifactId>
> <version>1.9.0</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
> </project>
> 
> Thanks,
> Eduardo Guadalupe Quintanilla Flores
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists