Bake compat-aspect weaving into the build for all profiles, to alleviate problems with the non-standard embedder creation.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@590803 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2007-10-31 19:52:38 +00:00
parent 27698689a8
commit f87308819f
4 changed files with 28 additions and 47 deletions

View File

@ -268,7 +268,6 @@ under the License.
<classpath refid="maven.classpath"/> <classpath refid="maven.classpath"/>
<arg value="-e"/> <arg value="-e"/>
<arg value="-B"/> <arg value="-B"/>
<arg value="-P compat,standard"/>
<arg value="clean"/> <arg value="clean"/>
<arg value="install"/> <arg value="install"/>
</java> </java>

View File

@ -120,6 +120,13 @@ under the License.
<version>1.2_Java1.3</version> <version>1.2_Java1.3</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Needed for backward compat aspect. -->
<dependency>
<groupId>aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.5.3</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
@ -139,23 +146,6 @@ under the License.
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
</plugins>
</build>
<profiles>
<profile>
<id>compat</id>
<dependencies>
<dependency>
<groupId>aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.5.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId> <artifactId>aspectj-maven-plugin</artifactId>
@ -169,8 +159,6 @@ under the License.
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</profile>
</profiles>
</project> </project>

View File

@ -66,6 +66,7 @@ public privileged aspect Maven20xCompatAspect
&& this( session ) && this( session )
&& notHere(); && notHere();
// capture the session instance in play.
after( MavenSession session ): sessionCreation( session ) after( MavenSession session ): sessionCreation( session )
{ {
this.session = session; this.session = session;
@ -76,6 +77,7 @@ public privileged aspect Maven20xCompatAspect
&& args( request ) && args( request )
&& notHere(); && notHere();
// capture the request instance in play.
before( MavenExecutionRequest request ): methodsTakingRequest( request ) before( MavenExecutionRequest request ): methodsTakingRequest( request )
{ {
this.request = request; this.request = request;
@ -88,6 +90,7 @@ public privileged aspect Maven20xCompatAspect
&& target( manager ) && target( manager )
&& notHere(); && notHere();
// redirect the old verifyPlugin(..) call to the new one, using the captured session instance above.
PluginDescriptor around( Plugin plugin, PluginDescriptor around( Plugin plugin,
MavenProject project, MavenProject project,
PluginManager manager ) PluginManager manager )
@ -147,6 +150,7 @@ public privileged aspect Maven20xCompatAspect
&& target( builder ) && target( builder )
&& notHere(); && notHere();
// redirect old buildSettings() call to the new one, using the request captured above.
Settings around( MavenSettingsBuilder builder ) Settings around( MavenSettingsBuilder builder )
throws IOException, XmlPullParserException: throws IOException, XmlPullParserException:
buildSettings( builder ) buildSettings( builder )

View File

@ -68,6 +68,13 @@ under the License.
<groupId>org.apache.maven.wagon</groupId> <groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId> <artifactId>wagon-file</artifactId>
</dependency> </dependency>
<!-- Needed for backward compat aspect. -->
<dependency>
<groupId>aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.5.3</version>
</dependency>
</dependencies> </dependencies>
<distributionManagement> <distributionManagement>
<site> <site>
@ -77,16 +84,14 @@ under the License.
</distributionManagement> </distributionManagement>
<profiles> <profiles>
<profile> <profile>
<id>compat</id> <!--
|
<dependencies> | This profile is specifically for creating an embedder that can be used for IntelliJ integration. We need to
<dependency> | remove the JDOM JAR because IntelliJ include its own version, and the JTidy JAR includes org.xml.* classes
<groupId>aspectj</groupId> | which causes a loader constraint issues while loading the embedder.
<artifactId>aspectjrt</artifactId> |
<version>1.5.3</version> -->
</dependency> <id>idea</id>
</dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -110,21 +115,6 @@ under the License.
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins>
</build>
</profile>
<profile>
<!--
|
| This profile is specifically for creating an embedder that can be used for IntelliJ integration. We need to
| remove the JDOM JAR because IntelliJ include its own version, and the JTidy JAR includes org.xml.* classes
| which causes a loader constraint issues while loading the embedder.
|
-->
<id>idea</id>
<build>
<plugins>
<plugin> <plugin>
<artifactId>shade-maven-plugin</artifactId> <artifactId>shade-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>