Yeah, the .ivy cache method should work, but is definitely a bit tricky
to make sure you get all the jars and dependencies--it's easy to miss
something, which would lead to the "could not find..." error you mentioned.
A more sure-fire way to get what you want is to build the zip that we
use for releases by running this:
sbt daffodil-cli/Universal/packageBin
That builds a zip that contains all the daffodil jars and dependencies
in a lib/ folder, and the daffodil .sh and .bat in a bin/ folder. The
generated zip is put in:
daffodil-cli/target/universal/apache-daffodil-*.zip
- Steve
On 10/7/21 11:47 AM, Regis Thomas wrote:
Good Morning,
I pulled down the latest source code and compiled it, but I didn’t
understand how to take the resulting jar files and run them from the
command
line. A team member reached out to Mike Beckerle for some guidance. Mike
suggested we run “sbt package” and then “sbt publishLocal” and use the jar
files from the .ivy2/cache. I ran both commands and produced the daffodil
jar files. The files were named like “daffodil-core_2.12.jar”. The
daffodil files in the lib folder of the release install (on WIndows 10)
were
named like “org.apache.daffodil.daffodil-core-3.1.0.jar”. Also the release
lib folder contained a number of non-daffodil jar files. I saved the
release lib folder to a new name, and copied the daffodil 3.2.0 jar files
to
the lib folder. I also copied in the non-daffodil jar files from the
lib_managed directory that corresponded to the jar files in the release lib
directory then tried to run daffodil.bat. I got an error “Could not find
or
load main class org.apache.daffodil.Main”. I renamed the new jar files to
correspond to the naming convention of the files in the release lib
directory, but that didn’t help. I tried various renaming schemes for the
daffodil jar files, but always got the same error. If you could offer some
advice on how we might be able to run the 3.2.0 jar files from
daffodil.bat,
it would be greatly appreciated.
Rege