I have a Maven project in Eclipse that successfully reaches the "package" goal. In doing so it produces a jar. I need to include that jar as well as the Maven dependencies in a Java Application Run Configuration.
My problem is that when I set up the run configuration, and provide command line arguments, classes provided by Maven are not found.
How is this supposed to happen? I've tried exploring, experimenting and searching. I could manually add all the jars from my local .m2/repository
directory as "external jars" in Eclipse, but it doesn't seem right that I should have to do that.
您需要执行mvn install
将.jar文件放入本地存储库,然后将适当的<dependency/>
节添加到pom.xml
文件中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.