[jboss-user] [Javassist user questions] - Javassist 3.5.SNAPSHOT Maven2 POM broken on Mac OS X

manik.surtani@jboss.com do-not-reply at jboss.com
Mon Aug 6 20:45:40 EDT 2007


I've been playing around with maven2, using it to include microcontainer dependencies into JBoss Cache, and see the following:

  | 
  | [INFO] ------------------------------------------------------------------------
  | [ERROR] BUILD ERROR
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Failed to resolve artifact.
  | 
  | Missing:
  | ----------
  | 1) com.sun:tools:jar:1.5
  | 
  |   Try downloading the file manually from the project website.
  | 
  |   Then, install it using the command: 
  |       mvn install:install-file -DgroupId=com.sun -DartifactId=tools \
  |           -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file
  | 
  |   Path to dependency: 
  |         1) jboss:jbc21test:jar:2.1
  |         2) jboss:jboss-aop-mc-int:jar:2.0.0-SNAPSHOT
  |         3) jboss:jboss-aop:jar:2.0.0-SNAPSHOT
  |         4) javassist:javassist:jar:3.5-SNAPSHOT
  |         5) com.sun:tools:jar:1.5
  | 
  | 

Googling around for a bit, I see the following that are relevant:

http://jira.codehaus.org/browse/MNG-806
http://jira.codehaus.org/browse/MNG-869
http://maven.apache.org/general.html#tools-jar-dependency
http://developer.apple.com/documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html

The problem with defining tools.jar as a dependency - even as a "system" scope dependency - is that this is only specific to Sun JDKs.  Other JDKs (like Apple, which I use) have tools.jar classes in the Classes.jar archive, which is already in your classpath.

Basically, from what I gathered, this block in javassist's pom should only be enabled if the vendor name includes Sun Microsystems:

  <profiles>
  |     <profile>
  |       <id>jdk14</id>
  |       <activation>
  |         <jdk>1.4</jdk>
  |       </activation>
  |       <dependencies>
  |         <dependency>
  |           <groupId>com.sun</groupId>
  |           <artifactId>tools</artifactId>
  |           <version>1.4</version>
  |           <scope>system</scope>
  |           <systemPath>${java.home}/../lib/tools.jar</systemPath>
  |         </dependency>
  |       </dependencies>
  |     </profile>
  |     <profile>
  |       <id>jdk15</id>
  |       <activation>
  |         <jdk>1.5</jdk>
  |       </activation>
  |       <dependencies>
  |         <dependency>
  |           <groupId>com.sun</groupId>
  |           <artifactId>tools</artifactId>
  |           <version>1.5</version>
  |           <scope>system</scope>
  |           <systemPath>${java.home}/../lib/tools.jar</systemPath>
  |         </dependency>
  |       </dependencies>
  |     </profile>
  |   </profiles>
  | 
  | 

Cheers,
Manik


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071410#4071410

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071410



More information about the jboss-user mailing list