Problem building java-impl: missing acode:adl-parser:jar:1.0.5-SNAPSHOT

I try to build the java-impl project - almost went thru but building the ADL
Serializer fails with the message below.
(Alternatively I tried to look for the adl-serializer.jar on the project
page (http://www.openehr.org/svn/ref_impl_java/TRUNK/docs/download.htm) to
download the binary, but couldn't find it there, only the adl-parser is
there.)

My environment:

Probably is the version information in the pom.xml from adl-parser not the
same as the required version in dependencies of pom.xml of adl-serializer, or
you did not build adl-parser, so the required jar file does not exist on your
system.

Please check your pom-files and rebuild the packages.

Bert

Bert, thanks for the quick response.

I checked the version in both pom.xml and the dependency entry, it's
1.0.5-SNAPSHOT in both versions.

I figured out a way to solve the problem now though:

Before, I was building everything via 'mvn install' from the main level,
like it says in the quick-start doc. But this only builds the
adl-parser.jar, not the adl-parser-with-dependencies.jar, which is obviously
not enough.
When I go into the adl-parser directory though, and just make a 'mvn
install' for the adl-parser in there, it will build the
adl-parser-with-dependencies.jar. With that, I can then build the
adl-serializer then.

It didn't get clear to me from the quick-start doc, that I have to do it
this way. Or is it supposed to be done like this way at all, or anything
wrong in my way of building it?

Mathias

Bert Verhees wrote:

Hi Mathias,

I had the same problem.

There is a thread on the ref_impl_java mailing list regarding this. Just follow this link
http://www.openehr.org/mailarchives/ref_impl_java/msg00840.html

I do not know the source of the problem, but there a 2 possible solutions to completely build the project with maven:

First solution:
This solution is described on the thread mentioned above.
1. Download adl-parser-1.0.5-SNAPSHOT.jar from http://openehr.cambiosys.org/continuum/servlet/continuum/target/WorkingCopy.vm/view/WorkingCopy/id/16?userDirectory=target and install it in your maven 2 repository under ".m2\repository\acode\adl-parser\1.0.5-SNAPSHOT".
2. Run again "mvn clean install".

Second solution:
1. Change to /adl-parser and
2. Run "mvn clean install".

Probably it is better to post queries about the java reference implementation to the ref_impl_java mailing list.
http://www.openehr.org/community/mailinglists.html

Cheers,
Bruno

Mathias Conradt wrote:

Bert, thanks for the quick response.

I checked the version in both pom.xml and the dependency entry, it's
1.0.5-SNAPSHOT in both versions.

So we can eliminate that cause.
If you use mvn from top-level, I never did that, but I can imagine the order
is important.
Also, I don't know if mvn checks that (a failing build), maybe the build of
adl-parser does not succeed, and there is no adl-parser in your mvn repository
at the moment it starts building adl-serializer.

What can go wrong is that when you do mvn clean install, the build of some
projects can fail, because they need resources, in adl-parser the test-files
could need the *.adl-files, I had that kind of problems, and in that case, I
do "mvn clean resources:resources install".

By the way, cleaning is not always necessary, mvn itself detects if source-
code has changed.

A good tool, mvn, but like the Swiss army knife, many options, but unlike the
Swiss army knife, badly documented and not at all, self explanatory.

good luck
Bert

Hi Mathias,

Just some quick hints:

  1. The download page for the Java project should be updated. Right now, the quickest way to fetch jar files is from the build server: http://openehr.cambiosys.org/continuum/
  2. the jar adl-parser-with-dependencies is not in the dependency list of other components. It’s only useful if you want to run the parser as command-line tool.

So it’s strange that when you run “mvn install” from top level and adl-parser is installed but still you got adl-parser missing.

Bert & Bruno, thanks for helping out. Let’s discuss this issue further on the Java list.

Cheers,
Rong

Rong Chen schreef:

Hi Mathias,

Just some quick hints:
1. The download page for the Java project should be updated. Right
now, the quickest way to fetch jar files is from the build server:
http://openehr.cambiosys.org/continuum/
2. the jar adl-parser-with-dependencies is not in the dependency list
of other components. It's only useful if you want to run the parser as
command-line tool.

So it's strange that when you run "mvn install" from top level and
adl-parser is installed but still you got adl-parser missing.

When manually installing copies from the website, one should carefully
build up the directory-structure in the repository were they are put,
else maven cannot find them

Bert