Bug 527429 - m2e weaveDirectories not handled
Summary: m2e weaveDirectories not handled
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: IDE (show other bugs)
Version: 1.8.11   Edit
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-17 15:56 EST by Sebastien Tardif CLA
Modified: 2017-11-17 16:01 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Sebastien Tardif CLA 2017-11-17 16:01:32 EST
Beside description and runnable example already provided, this is what I use now to get the build do the right thing so that I can deploy from Eclipse, but then the IDE is shows error in my *.AJ file about the 'field' and 'method' I have added to existing class:

<plugins>
	<plugin>
		<groupId>org.codehaus.mojo</groupId>
		<artifactId>aspectj-maven-plugin</artifactId>
		<executions>
			<execution>
				<id>default</id>
				<!-- Compile and weave aspects after all classes compiled by javac -->
				<phase>process-classes</phase>
				<goals>
					<goal>compile</goal>
				</goals>
				<configuration>
					<showWeaveInfo>true</showWeaveInfo>
					<verbose>true</verbose>
					<includes>
						<include>**/*.class</include>
						<include>**/*.java</include>
						<include>**/*.aj</include>
					</includes>
					<Xlint>cantFindType=ignore</Xlint>
					<weaveDependencies>
						<weaveDependency>
							<groupId>org.hibernate</groupId>
							<artifactId>hibernate-core</artifactId>
						</weaveDependency>
					</weaveDependencies>
					<weaveDirectories>
						<weaveDirectory>${project.build.directory}/classesToWeave
						</weaveDirectory>
					</weaveDirectories>
				</configuration>
			</execution>
		</executions>
	</plugin>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-dependency-plugin</artifactId>
		<version>3.0.2</version>
		<executions>
			<execution>
				<id>unpack69</id>
				<phase>generate-sources</phase>
				<goals>
					<goal>unpack</goal>
				</goals>
				<configuration>
					<verbose>true</verbose>
					<artifactItems>
						<artifactItem>
							<groupId>org.apache.myfaces.core</groupId>
							<artifactId>myfaces-api</artifactId>
							<type>jar</type>
						</artifactItem>
						<artifactItem>
							<groupId>com.exigen.ipb.asynctasks</groupId>
							<artifactId>ipb-async-tasks</artifactId>
							<type>jar</type>
						</artifactItem>
					</artifactItems>
					<overWrite>true</overWrite>
					<outputDirectory>${project.build.directory}/classesToWeave
					</outputDirectory>
					<includes>**/*.class</includes>
				</configuration>
			</execution>
		</executions>
	</plugin>
</plugins>
<pluginManagement>
	<plugins>
		<!--This plugin's configuration is used to store Eclipse m2e settings only. 
			It has no influence on the Maven build itself. -->
		<plugin>
			<groupId>org.eclipse.m2e</groupId>
			<artifactId>lifecycle-mapping</artifactId>
			<version>1.0.0</version>
			<configuration>
				<lifecycleMappingMetadata>
					<pluginExecutions>
						<pluginExecution>
							<pluginExecutionFilter>
								<groupId>
									org.codehaus.mojo
								</groupId>
								<artifactId>
									aspectj-maven-plugin
								</artifactId>
								<versionRange>
									[1.7,)
								</versionRange>
								<goals>
									<goal>compile</goal>
								</goals>
							</pluginExecutionFilter>
							<action>
								<execute>
									<runOnIncremental>true</runOnIncremental>
									<runOnConfiguration>true</runOnConfiguration>
								</execute>
							</action>
						</pluginExecution>
						<pluginExecution>
							<pluginExecutionFilter>
								<groupId>
									org.apache.maven.plugins
								</groupId>
								<artifactId>
									maven-dependency-plugin
								</artifactId>
								<versionRange>
									[2.0,)
								</versionRange>
								<goals>
									<goal>unpack</goal>
								</goals>
							</pluginExecutionFilter>
							<action>
								<execute>
									<runOnIncremental>false</runOnIncremental>
									<runOnConfiguration>true</runOnConfiguration>
								</execute>
							</action>
						</pluginExecution>
					</pluginExecutions>
				</lifecycleMappingMetadata>
			</configuration>
		</plugin>
	</plugins>
</pluginManagement>