Adding dependencies in Maven Netbeans

前端 未结 4 1464
暗喜
暗喜 2020-12-11 16:30

I\'ve created a Maven project and added the dependencies (jar files) that I need; however, netbeans says that it still cannot find it.

Specifically in my case, I add

相关标签:
4条回答
  • 2020-12-11 16:37

    Maven automatically downloads the dependency once specified in the pom.xml. For this you would have to build your project with the dependency as specified by Tim Sparg.

    0 讨论(0)
  • 2020-12-11 16:42

    The dependency is available in Maven Central. Add the pom snippet manually to the pom.xml and run Maven in the shell and let it download the dependency. This should resolve your issue.

    0 讨论(0)
  • 2020-12-11 16:45

    Did you let Netbeans manage the dependency?

    In your "Projects" listing, find and context+click on the "Dependencies" folder in the list. From the context menu, choose "Add Dependency".

    screen shot of Projects listing with context menu of Dependencies folder

    This approach works at least in NetBeans 7.4 and 8.0 beta.

    0 讨论(0)
  • 2020-12-11 16:57

    Make sure that your pom.xml has the following snippet that defines the dependency

    <dependency>
        <groupId>javax.media</groupId>
        <artifactId>jmf</artifactId>
        <version>2.1.1e</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题