Bug 203008 - dist.jar ought not include spaces
dist.jar ought not include spaces
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Project
7.1
PC Windows 7
: P4 (vote)
: 7.1
Assigned To: Tomas Zezula
issues@java
: SPACE_IN_PATH
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-03 23:07 UTC by javydreamercsw
Modified: 2011-10-15 14:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2011-10-03 23:07:52 UTC
Product Version = NetBeans IDE 7.1 Beta (Build 201109252201)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) Client VM 21.0-b17

This is hard to explain. And for some reason I was unable to reproduce it on an smaller project. Try to keep up with me:

Steps to reproduce:

1) Checkout this source: https://hg.java.net/hg/simple-marauroa~source-code-repository
2) Build the Marauroa Application Manager (will take some time the first time because it'll checkout two other projects.
3) Build the Simple Marauroa Client/Zone List Manager project (You get the same result if you build the whole suite, but this way is faster).
4) No error.
5) Now modify this 2 files changing from Zone_Extension to Zone Extension:
a)Simple Marauroa Java\Zone Extension\nbproject\project.properties (dist.jar entry)
b)Marauroa Application Manager\Marauroa Zone Extension\nbproject\project.xml
6) notice the error:

Classpath entry Z:\Netbeans\Simple Marauroa\Marauroa Application Manager\build\cluster\modules\ext\extensions\Zone does not exist; skipping
Classpath entry Z:\Netbeans\Simple Marauroa\Marauroa Application Manager\build\cluster\modules\Extension.jar does not exist; skipping
Z:\Netbeans\Simple Marauroa\netbeans\harness\build.xml:174: The JARs [Z:\Netbeans\Simple Marauroa\Marauroa Application Manager\build\cluster\modules\simple-server-extension-zone.jar, Z:\Netbeans\Simple Marauroa\Marauroa Application Manager\build\cluster\modules\ext\extensions\Zone, Z:\Netbeans\Simple Marauroa\Marauroa Application Manager\build\cluster\modules\Extension.jar] contain no classes in the supposed public packages simple.client.extension.*, simple.server.extension.* and so cannot be compiled against

I'll keep trying to figure it out tomorrow.
Comment 1 javydreamercsw 2011-10-04 13:54:50 UTC
Missing steps to see the error::

7) Build Marauroa Zone Extension module
8) Build Zone List Manager module

Note: Created tag Bug 203008 in the mentioned repository so the state to reproduce the error is maintained.
Comment 2 Jesse Glick 2011-10-12 20:20:15 UTC
Never use spaces in JAR names. Regardless of anything in NB, it will not work correctly with javac.

*** This bug has been marked as a duplicate of bug 195730 ***
Comment 3 javydreamercsw 2011-10-12 20:47:15 UTC
I understand the space comment but then the issue is that NetBeans assigned that name on it's own. If you create a Java project and the project name has spaces the dist.jar property should replace the spaces with '_' or something. Is not like I manually put the spaces there.
Comment 4 Jesse Glick 2011-10-12 21:04:22 UTC
(In reply to comment #3)
> If you create a Java project and the project name has
> spaces the dist.jar property should replace the spaces with '_' or something.

So do not put spaces in the project name, and bug #195730 will not be triggered. The _display name_ may have whatever characters you like, but using spaces in the actual (sub-)folder path or any other identifiers is a bad idea. That said, replacing ' ' with '_' (or more precisely, PropertyUtils.getUsablePropertyName) in dist.jar would be useful.

> [It's] not like I manually put the spaces there.

That seems to contradict what you say in step #5 in comment #0.

In general, please provide a small, self-contained test case if you want developers to evaluate. This kind of issue does not happen "randomly" so there should be no reason why such a test case should be hard to create, given the ability to reproduce a problem in your real projects.
Comment 5 Tomas Zezula 2011-10-14 06:35:02 UTC
Works fine on Unix but I will rather use PropertyUtils.getUsablePropertyName for dist.jar
Comment 6 Tomas Zezula 2011-10-14 07:14:01 UTC
fixed jet-main 3c4a85520a42
Newly created j2se project uses PropertyUtils.getUsablePropertName()
Comment 7 Quality Engineering 2011-10-15 14:45:00 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/3c4a85520a42
User: Tomas Zezula <tzezula@netbeans.org>
Log: #203008:dist.jar ought not include spaces


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo