You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by gauche <ke...@hsbcib.com> on 2012/05/23 09:28:21 UTC
jCLASSPATH issue in Eclipse
Hi,
Disclaimer: I am not really a Java dev.
I've obtained the latest source from SVN, built it using mvn command line.
Then I generated the eclipse metadata using eclipse:eclipse. It was a
hassle, but only because of my corporate proxy (had to keep refreshing the
repository URLs in Internet Explorer otherwise Maven was being kicked with a
407 by the proxy).
Once I got the eclipse projects imported, I successfully built. I tried
setting up a run configuration that executes the console Main class with
parameter "start". This failed initially because of missing resources
("activemq.xsd"). I found that enabling maven dependency management on all
projects rectified this.
Next problem I get is this whilst attempting to run:
<snip>j
Caused by: java.lang.ClassNotFoundException:
org.springframework.beans.BeansException
Checking the CLASSPATH, I see why: a lot of JARs including spring-beans
aren't on it. Looking in maven's dependency tree and pom.xml I see why:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>test</scope>
</dependency>
The scope is precluding these dependencies from being in the CP. At this
point I don't know what the correct course of action is.
Should I change my scope? (I don't even know what that entails)
Should I remove the scope from pom.xml? (seems like it must be there for a
reason)
Should I do something else?
Thanks for any help.
--
View this message in context: http://activemq.2283324.n4.nabble.com/jCLASSPATH-issue-in-Eclipse-tp4651232.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: CLASSPATH issue in Eclipse
Posted by gauche <ke...@hsbcib.com>.
I've hacked around this as follows:
1. In the console pom.xml, I removed the scoping on all dependencies scoped
to test (except for junit which is obviously test-only)
2. There were still two resources missing from the target dir - activemq.xml
and log4j.properties. I tried fixing this "properly" in Eclipse but failed,
so I just copied them manually into the target dir.
With these changes the console project now runs. Interested to hear whether
I've done anything stupid here.
Thanks.
--
View this message in context: http://activemq.2283324.n4.nabble.com/CLASSPATH-issue-in-Eclipse-tp4651232p4651534.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.