Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Compiler removes java 8 method parameter names

Hi,
Just pasting the details from https://github.com/mojohaus/aspectj-maven-plugin/issues/7

The new compiler option -parameters allows to compile in the method parameter names information into the bytecode. After the aspectj processing this information goes removed.

Here ist the configuration of maven compiler plugin

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.3</version>
      <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <compilerArgument>-parameters</compilerArgument>
      </configuration>
    </plugin>

And configuration of aspectj

    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>aspectj-maven-plugin</artifactId>
      <version>1.8</version>
      <executions>
        <execution>
          <goals>
            <goal>compile</goal>
            <goal>test-compile</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <encoding>UTF-8</encoding>
        <source>1.8</source>
        <target>1.8</target>
        <complianceLevel>1.8</complianceLevel>
      </configuration>
    </plugin>

Looking at https://eclipse.org/aspectj/doc/released/devguide/ajc-ref.html, I didn't see what parameter I could change to preserve the information.

Any clue?

Thank you

Back to the top