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 220941 - IllegalArgumentException: Volume: maven-pom is not support by this library. The only acceptable values are: [javadoc, src, classpath]
Summary: IllegalArgumentException: Volume: maven-pom is not support by this library. T...
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks: 219733
  Show dependency tree
 
Reported: 2012-10-26 19:54 UTC by Petr Jiricka
Modified: 2012-11-01 02:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 194161


Attachments
stacktrace (9.72 KB, text/plain)
2012-10-26 19:54 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-10-26 19:54:45 UTC
Build: NetBeans IDE Dev (Build web-main-8998-on-20121026)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b11
OS: Mac OS X

User Comments:
pjiricka: 1. Register WebLogic 12 server
2. Create Java EE 6 Maven Web project with this target server 
3. Create REST service from patterns; check the "Jersey specific features" checkbox




Stacktrace: 
java.lang.IllegalArgumentException: Volume: maven-pom is not support by this library. The only acceptable values are: [javadoc, src, classpath]
   at org.netbeans.modules.project.libraries.DefaultLibraryImplementation.getContent(DefaultLibraryImplementation.java:115)
   at org.netbeans.api.project.libraries.Library.getContent(Library.java:143)
   at org.netbeans.modules.maven.api.ModelUtils.checkLibraries(ModelUtils.java:314)
   at org.netbeans.modules.maven.classpath.CPExtender.checkLibraryForPoms(CPExtender.java:177)
   at org.netbeans.modules.maven.classpath.CPExtender.addRemoveLibrary(CPExtender.java:104)
   at org.netbeans.modules.maven.classpath.CPExtender.access$000(CPExtender.java:92)
Comment 1 Petr Jiricka 2012-10-26 19:54:47 UTC
Created attachment 126644 [details]
stacktrace
Comment 2 Petr Jiricka 2012-10-26 20:10:22 UTC
Cc'ing Milos. This looks weird, why is ModelUtils.checkLibraries asking for maven-pom volume, when we know that this volume doesn't need to exist if Maven information is specified through properties?
Comment 3 Petr Jiricka 2012-10-26 20:12:27 UTC
Discovered while trying to reproduce bug 219733.
Comment 4 Milos Kleint 2012-10-29 07:57:13 UTC
well, library.getContent("maven-pom") is called early on so that  processing logic is testable without having to pass a Library instance inside. I was living under impression that "maven-pom" is just deprecated, if not and it's totally removed, I guess we can cut the branch dealing with volumes entirely from the method in question.
Comment 5 Petr Jiricka 2012-10-29 09:58:55 UTC
I must say I am confused:

> "maven-pom" is just deprecated

Yes, that's my understanding as well. But right now exception is thrown if maven-pom volume is NOT present, which is incorrect (as Maven information is specified via properties, not volume).

> cut the branch dealing with volumes entirely from the method in question

What method do you have in mind?
Comment 6 Milos Kleint 2012-10-29 10:08:05 UTC
(In reply to comment #5)
> I must say I am confused:
> 
> > "maven-pom" is just deprecated
> 
> Yes, that's my understanding as well. But right now exception is thrown if
> maven-pom volume is NOT present, which is incorrect (as Maven information is
> specified via properties, not volume).

deprecated would mean that the call to get the maven-pom volume would return just empty result, not throw exception.

> 
> > cut the branch dealing with volumes entirely from the method in question
> 
> What method do you have in mind?

ModelUtils.checkLibraries()
Comment 7 Petr Jiricka 2012-10-29 10:34:39 UTC
Ok, I see. I don't have a strong opinion on how it should be fixed - it should just be fixed somehow. Assigning to Milos.
Comment 8 Petr Jiricka 2012-10-30 16:39:24 UTC
Always reproducible, the scenario in question is important, and this bug blocks another P2 issue -> raising to P2.
Comment 9 Milos Kleint 2012-10-31 07:50:30 UTC
http://hg.netbeans.org/core-main/rev/1971ea6aee23
Comment 10 Petr Jiricka 2012-10-31 14:12:40 UTC
Thanks - I verified bug 219733 is now fixed by this.
Comment 11 Quality Engineering 2012-11-01 02:39:08 UTC
Integrated into 'main-golden', will be available in build *201211010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1971ea6aee23
User: Milos Kleint <mkleint@netbeans.org>
Log: #220941 no longer call getContent("maven-pom")