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 130955

Summary: Message warning about the server library creation
Product: javaee Reporter: Petr Hejl <phejl>
Component: CodeAssignee: Petr Hejl <phejl>
Status: RESOLVED FIXED    
Severity: blocker CC: jrojcek, kganfield
Priority: P3 Keywords: UI
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: screenshot

Description Petr Hejl 2008-03-24 21:49:43 UTC
Small late UI change:
When using the server library and changing the server from project properties tab - the warning message should appear in
case when the server library will be created.

Discussed offline with jrojcek. Attaching screenshot.
Comment 1 Petr Hejl 2008-03-24 21:55:31 UTC
Created attachment 58946 [details]
screenshot
Comment 2 Petr Hejl 2008-03-24 21:58:45 UTC
Should appear in all project types.
Comment 3 Kenneth Ganfield 2008-03-25 00:43:39 UTC
So does this message only appear if the project is using a shared library and the copy server JAR files option is selected?

What does it mean that the library will be created? Is a library created or are server JARs just copied to folder?

The message could be something like this (if i understand correctly):

The shared library does not contain the server library for the selected server.
The required server library will be create and copied to the shared libraries folder.

Comment 4 Petr Hejl 2008-03-25 08:46:41 UTC
> So does this message only appear if the project is using a shared library and the copy server JAR files option is
selected?

Yes and only if it does not exist yet.

> What does it mean that the library will be created? Is a library created or are server JARs just copied to folder?

Both - server JARs are copied and the shared library is created.

> The message could be something like this (if i understand correctly):
> 
> The shared library does not contain the server library for the selected server.
> The required server library will be create and copied to the shared libraries folder.

Sounds perfect to me. I will change it.

Thanks.
Comment 5 jrojcek 2008-03-25 09:08:55 UTC
Ken's proposal seems good to me. Maybe just using "libraries folder" consistently instead of "shared library" would be better. So if Ken agrees we could use 
something like:
---
The libraries folder does not contain the server library for the selected server.
The required server library will be create and copied to the libraries folder.
---
Comment 6 Kenneth Ganfield 2008-03-25 09:45:08 UTC
jano, your wording is fine with me.
but should be:
"The required server library will be created and copied to the shared libraries folder"
(created with a "d") 

but i am still unclear on one thing: 
you say the server library is created. what does that actually do?
what is actually created? would a new server library appear in the Libraries manager?

the shared library location is already specified
copying JARs is clear
Comment 7 Kenneth Ganfield 2008-03-25 09:56:30 UTC
So it looks like the libraries are added to the Libraries folder in the Projects window.
The library JARs are also added to the shared libraries folder.

but the old libraries are not removed, which is good, but maybe that should be explicit, otherwise they may be surprised
that the older server JARs are still there.
 
So there should maybe be an additional line that says:
"The IDE will not remove any libraries from the shared libraries folder."
Comment 8 Petr Hejl 2008-03-25 10:03:22 UTC
To make a summary:
1) server JAR files are copied - just copied
2) library is created (visible in Library Manager) - can be used in project
3) project is configured to use it
4) old library is not removed because it can be used in other projects as well
Comment 9 jrojcek 2008-03-25 10:06:44 UTC
I think Petr can answer your questions.

Now I see that we forgot to add the check box about using server libraries into project properties. We should permit the user to turn the usage of server 
libraries on and off in project properties. Something like:

Server: |_Tomcat_____v_|
[x] Use libraries for server JAR files (or whatever wording we use in the new project wizard)

If we did it, the warning message would be easier to understand.
Comment 10 Petr Hejl 2008-03-25 10:28:48 UTC
I wouldn't do that - at least not for 6.1.

Advanced user can always remove the server library in libraries tab - it is just a library so I would avoid another
control. If the message is unclear we can change it to start with "Project is using server library....".
Comment 11 Kenneth Ganfield 2008-03-25 10:59:26 UTC
thanks for the summary, petr

i agree that for 6.1 we dont need to add another option to the Run page.

I will say it would be good to add the message that nothing is removed/deleted from shared libraries folder
Comment 12 jrojcek 2008-03-25 11:29:30 UTC
Yes, adding the check box is not for 6.1. It's not that important. But it's something to do after 6.1, I think.
Comment 13 Petr Hejl 2008-03-25 15:14:08 UTC
Fixed in changeset 7c0fe5134abb.