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 - Adding spring as a framework to the project adds 'unknown.binary' dependencies to pom
Summary: Adding spring as a framework to the project adds 'unknown.binary' dependencie...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 253908 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-21 05:08 UTC by brettryan
Modified: 2015-10-12 00:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.