In the current version of JMeter.java, jmeter home is set by calling JMeterUtils.setJMeterHome(NewDriver.getJMeterDir()). This creates an unnecessary dependency to the NewDriver class.. A better solution would be to give jmeter home as input parameter to the JMeter class. I can provide code to show how this could be implemented.
Why is the dependency a problem?
(In reply to comment #1) > Why is the dependency a problem? The dependency is a problem because I want to run JMeter from Maven, and I don't want to use NewDriver, I want to run the JMeter class directly. NewDriver is just a "wrapper-class" setting up dependencies, I want Maven to set up these dependencies for me.
OK, I think I see. Can you attach a patch? We'd need to be sure that existing code and usage was not impacted in any way before changing anything.
Created attachment 14428 [details] Dynamically set jmeter home using attribute Introducing a new attribute -d which makes it possible to apply jmeter home directory as input paramter to JMeter.java. If -d is not set, it will use the existing approach to set jmeter home.
Thanks - change added to 2.0 branch
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1511