And between these two jar files of the bundle voice for example :
org.openhab.core.voice-3.2.0-SNAPSHOT.jar
AND
org.openhab.core.voice-3.2.0-SNAPSHOT-sources.jar
What is the difference and which one is better to take?
And between these two jar files of the bundle voice for example :
org.openhab.core.voice-3.2.0-SNAPSHOT.jar
AND
org.openhab.core.voice-3.2.0-SNAPSHOT-sources.jar
What is the difference and which one is better to take?
Difference is fundamental. The filenames you find in target directory are:
$artifactId[-$classifier].$type
, where artifactId is taken from pom.xml, classifier depends on several things, but it is usually used together with maven plugins, type indicates a kind of file you work with (jar = java archive). Classifier is optional and allows one module ship multiple build artifacts. Primary outcome should always be without classifier, hence org.openhab.core.voice-3.2.0-SNAPSHOT.jar
is a primary build result produced by given module.
The org.openhab.core.voice-3.2.0-SNAPSHOT-sources.jar
contains, as classifier points, source code which been used to build first file you mentioned.
Best,
Łukasz
Thank you for your explanation.
If I understand correctly, the org.openhab.core.voice-3.2.0-SNAPSHOT-sources.jar
file is used to produce the org.openhab.core.voice-3.2.0-SNAPSHOT.jar
file. So when I test a bundle that I have modified I can only copy the org.openhab.core.voice-3.2.0-SNAPSHOT-sources.jar
file into the <DISTRO_DIR>/addons
, putting both files is not necessary (org.openhab.core.voice-3.2.0-SNAPSHOT.jar
and org.openhab.core.voice-3.2.0-SNAPSHOT-sources.jar
).
Other way around you need to copy org.openhab.core.voice-3.2.0-SNAPSHOT.jar
. This is a build artifact. Sources are just text files for other developers and have no real use within runtime.