Archload questions

I need to update some archetypes in a batch environment - ie I have to use archload rather than using the Import facility in Administartion|Archetypes.

Q1: Testing seems to indicate that you cannot use archload to load just a few archetypes (ie the ones you want to update). Is this true? ie you have to archload the complete set including your modified ones.

Q2: Is the directory structure important?  ie if I need to modify the product.merchandise architype, does it have to be in org\openvpms\archetype\product

Q3: If I modify the line <archetype name="product.merchandise.1.0" latest="true" to say
<archetype name="product.service.1.1" latest="true"
will my modified 1.1 version override the standard 1.0 version?

 

Regards, Tim G

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Archload questions

The archload script runs with the -c argument (clean).

This removes existing archetypes before loading those in the ../update/archetypes directory. You can either:

  • modify the archetypes in the ../update/archetypes directory
  • provide a script that loads those archetypes you have modified, in a separate directory. If you do this, you don't want to specify the -c argument

The archetype versioning scheme was never fully implemented, so different archetype versions is unsupported.

You can see what archload is doing by:

1. adding the following lines to ../conf/log4j.properties

 log4j.logger.org.openvpms.tools.archetype.loader.ArchetypeLoader=INFO, stdoutshort
log4j.additivity.org.openvpms.tools.archetype.loader.ArchetypeLoader=false 

2. changing archload.bat/.sh to specify the log4j.configuration:

 java -Dlog4j.debug -Dlog4j.configuration=file:../conf/log4j.properties org.openvpms.tools.archetype.loader.ArchetypeLoader  etc 

I'll add this to the release.

-Tim

Re: Archload questions

Tim - thanks for this - worked like a train.  You might also want to document the arguments in the bat/sh text.  -c we now know is Clear; -v is I guess Verbose; -s = ????; and -d is Directory

Regards, Tim G

Syndicate content