Bug 1327 : Library names cannot contain dashes or version numbers, as is standard java convention
Last modified: 2009-09-14 18:26




Status:
RESOLVED
Resolution:
WONTFIX -
Priority:
P2
Severity:
normal

 

Reporter:
heuermh
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2009-09-14 13:30
Standard java convention for jar artifact names is

${artifactId}-${version}.jar

See e.g. http://ibiblio.org/maven2/

Thus, a project with a release named according to this convention cannot be
used as a library in Processing without copying the contents to a different
file structure that loses artifact name and version information.

For instance, the jar artifact piccolo2d-core-1.3.jar, one of several jar
artifacts produced by the Piccolo2D project, when added to the
sketchbook/libraries folder as

piccolo2d-core-1.3/library/piccolo2d-core-1.3.jar

gives an error message

The library "piccolo2d-core-1.3" cannot be used.
Library names must contain only basic letters and numbers.
(ASCII only and no spaces, and it cannot start with a number)

Only after reducing this to

piccolo2d/library/piccolo2d.jar

can Processing recognize it is as a library. But we've lost the -core
qualifier and have no idea of the version.
Additional Comment #1 From fry 2009-09-14 14:21
You're mixing the idea of a Processing "library" with a .jar file from
Java. To use .jar files, just drag them into the sketch window, and they'll
be copied to the 'code' folder of the sketch, and imported automatically.
Additional Comment #2 From heuermh 2009-09-14 18:26
Not necessarily.

Currently to use Piccolo2D from Processing I have to resort to casting
PGraphics.

i.e.
http://processing.org/discourse/yabb2/YaBB.pl?num=1226014722

My next step is to extend PApplet to hide this implementation detail and
provide additional convenience methods for e.g. creating Piccolo2D nodes.
That is the Processing library I wish to provide. Since Piccolo2D is
modular in build structure, the jar artifact containing this adapter would
be called piccolo2d-processing-1.3.jar or similar.

Thus my concern still remains, how does Processing handle multiple versions
of a library?