You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Damien Feugas (JIRA)" <ji...@codehaus.org> on 2010/08/03 15:49:32 UTC
[jira] Reopened: (MNG-4747) Javaagent not usable since 3.0-alpha
[ http://jira.codehaus.org/browse/MNG-4747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damien Feugas reopened MNG-4747:
--------------------------------
All my apologies... I didn't take the time to make a proper bug report.
So, here it is, a maven project that reproduce the problem.
To reproduce the bug:
1- set your PATH and M2_HOME to an Maven 3 installation.
2- catch the artifact org.springframework:spring-instrument 3.0.2.RELEASE
3- set MAVEN_OPTS to -javaagent:YOUR_REPO/org/springframework/spring-instrument/3.0.2.RELEASE/spring-instrument-3.0.2.RELEASE.jar
4- run mvn jetty:run
You'll get an exception :
java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation
Now :
1- change your PATH and M2_HOME to a Maven 2 installation
2- check that your repository was not any spaces in its path (cause the jetty plugin to fail)
3- run mvn jetty:run
Everything's fine, and if you go to http://localhost:8080/test/, you'll get
Hello World ! - intercepted !
> Javaagent not usable since 3.0-alpha
> ------------------------------------
>
> Key: MNG-4747
> URL: http://jira.codehaus.org/browse/MNG-4747
> Project: Maven 2 & 3
> Issue Type: Bug
> Affects Versions: 3.0-alpha-6, 3.0-alpha-7, 3.0-beta-1
> Environment: Windows XP 32bits SP3
> Reporter: Damien Feugas
> Assignee: Benjamin Bentmann
> Priority: Blocker
>
> When launching a maven build, the -javaagent argument is ignored since Maven 3, and was processed with maven 2.X.X.
> The use case is a build with jetty:run goal (org.mortbay.jetty:jetty-maven-plugin 8.0.0.M1) with -javaagent:"${settings.localRepository}/org/springframework/spring-instrument/${spring-version}/spring-instrument-${spring-version}.jar"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira