Bug 368190 - Compiler warning with aspectj-maven-plugin: expected 1.6.11 found 1.6.12
Summary: Compiler warning with aspectj-maven-plugin: expected 1.6.11 found 1.6.12
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 minor (vote)
Target Milestone: 1.9.5   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 14:22 EST by Dan Rollo CLA
Modified: 2019-11-26 18:29 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Rollo CLA 2012-01-09 14:22:11 EST
Build Identifier: 1.6.12

The aspectj compiler warning just starting appearing when I use the aspectj-maven-plugin (version 1.4) with dependency on org.aspectj:aspectjrt:1.6.12.

This warning goes away if the aspectjrt dependency version is lowered to 1.6.11.

There does not seem to be a problem caused by the warning, but maybe there is a better way to use a newer version of aspectj with this plugin that avoids the warning? (And/Or is another approach documented somewhere?)

The warning emitted is:

[artifact:mvn] [WARNING] bad version number found in C:\Users\...\.m2\repository\org\aspectj\aspectjrt\1.6.12\aspectjrt-1.6.12.jar expected 1.6.11 found 1.6.12

Reproducible: Always

Steps to Reproduce:
1. Maven 3.0.3, pom.xml with dependency on org.aspectj:aspectjrt:1.6.12.
2. Use aspectj-maven-plugin to run aspectj compiler. 
3. The warning below is emitted by the aspectj plugin/compiler:

[artifact:mvn] [WARNING] bad version number found in C:\Users\...\.m2\repository\org\aspectj\aspectjrt\1.6.12\aspectjrt-1.6.12.jar expected 1.6.11 found 1.6.12.

Note: This particular warning was emitted by the maven-ant-tasks, but I don't think that is relevant.
Comment 1 Dan Rollo CLA 2012-01-09 15:48:03 EST
It just occurred to me that maybe this bug report belongs with the aspectj plugin instead. I have made a similar report there:
http://jira.codehaus.org/browse/MASPECTJ-106
Comment 2 Andrew Clement CLA 2012-01-10 11:50:04 EST
can you change the dependency on aspectjtools to 1.6.12?  As it must be the version number from a tools jar that is being used to check the version of aspectjrt.
Comment 3 Dan Rollo CLA 2012-01-10 18:30:42 EST
Adding a dep on the tools jar appears to have fixed the warning. Thanks!

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>aspectj-maven-plugin</artifactId>
				<version>${version-plugin-aspectj}</version>
				<configuration>
				    <source>${targetJdk}</source>
                    <target>${targetJdk}</target>
                    <verbose>true</verbose>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
							<goal>test-compile</goal>
						</goals>
					</execution>
				</executions>
                <dependencies>
                    <!-- Ensure aspectj tools version used by compiler is the same version used as dependency. Avoids warning
                    -->
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.6.12</version>
                    </dependency>
                </dependencies>
			</plugin>
Comment 4 Andrew Clement CLA 2019-11-26 18:29:13 EST
believed sorted out.