It seems the version 1.x versions of JSON-lib is now postfixed with the jdk version. I find that a bit strange since that breaks with how maven-generated artifacts are supposed to be named. And will require extra configuration to get working.
Any reason they are not simply named like this:
json-lib-jdk15-1.0.jar
That would keep the maven naming conventions and still show JDK version.
Anyone know how to add this as a dependency anyway? It seems maven 2 does not have the option to specify the artifact name like maven 1 did? Or if it does I can't find the documentation for it anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tiran,
Its supposed to work with Maven2 when you use a classifier. The maven2 documentation states that the classifier is
postfixed after the version (http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_dependency)
"The classifier of the dependency. This allows distinguishing two artifacts that belong to the same POM but were built differently, and is appended to the filename after the version. For example, jdk14 and jdk15."
Yes, it doesn't work with source and javadoc yet :(
I'll noticed a couple of months ago but didn't check the plugin page
for an explanation. I'll check later if there is any update on that.
Cheers,
Andres
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems the version 1.x versions of JSON-lib is now postfixed with the jdk version. I find that a bit strange since that breaks with how maven-generated artifacts are supposed to be named. And will require extra configuration to get working.
Any reason they are not simply named like this:
json-lib-jdk15-1.0.jar
That would keep the maven naming conventions and still show JDK version.
Anyone know how to add this as a dependency anyway? It seems maven 2 does not have the option to specify the artifact name like maven 1 did? Or if it does I can't find the documentation for it anyway.
Tiran,
Its supposed to work with Maven2 when you use a classifier. The maven2 documentation states that the classifier is
postfixed after the version (http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_dependency)
"The classifier of the dependency. This allows distinguishing two artifacts that belong to the same POM but were built differently, and is appended to the filename after the version. For example, jdk14 and jdk15."
<dependency>
<groupId>net.sf.json</groupId>
<artifactId>json-lib</artifactId>
<version>1.0</version>
<classifier>jdk15</classifier>
</dependency>
will load json-lib-1.0-jdk15.jar as expected.
For maven 1 you'll have to do something like
<dependency>
<groupId>net.sf.json</groupId>
<artifactId>json-lib</artifactId>
<version>1.0-jdk15</version>
</dependency>
Ah. I missed the classifier thing. Maven documentation isn't exactly the most user friendly. And I didn't get around to looking in 'the book'
Hmm. Don't seem to work for downloading source and javadoc tho. But that may be an issue with the Maven 2 plugin for Eclipse.
Yes, it doesn't work with source and javadoc yet :(
I'll noticed a couple of months ago but didn't check the plugin page
for an explanation. I'll check later if there is any update on that.
Cheers,
Andres