This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 254570

Summary: Adding spring as a framework to the project adds 'unknown.binary' dependencies to pom
Product: projects Reporter: brettryan <brettryan>
Component: MavenAssignee: Tomas Stupka <tstupka>
Status: RESOLVED FIXED    
Severity: normal CC: skygo
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description brettryan 2015-08-21 05:08:53 UTC
Steps to Reproduce:

1. Create New Maven Web Application (File > New Project > Maven > Web Application)

   - The project level is not important but I chose Java EE 7 Web + Tomcat 8

2. Project Properties > Frameworks > Add > Spring Web MVC
3. Configuration > Dispatcher Mapping = /
4. "Click "OK"

Inspect projects pom.xml when complete, it will contain dependencies like the following:

        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org-apache-commons-logging</artifactId>
            <version>SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>cglib-2.2</artifactId>
            <version>SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>spring-aop-4.0.1.RELEASE</artifactId>
            <version>SNAPSHOT</version>
        </dependency>
Comment 1 brettryan 2015-08-21 05:14:27 UTC
Could I suggest that it's recommended to use spring's Bill Of Materials (BOM). Personally I always use ${version.spring} in my properties to make it easier to update versions.

Also note that I chose v 4.0.1, yet the POM got littered with SNAPSHOT.

Use the following dependency management with spring:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>${version.spring}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
Comment 2 Tomas Stupka 2015-08-25 15:08:57 UTC
*** Bug 253908 has been marked as a duplicate of this bug. ***
Comment 3 brettryan 2015-10-12 00:39:33 UTC
This appears to now be working in the NetBeans 8.1RC.