Hi,
Merlin webpage and the txt docs in the downloads say:
"Versions of Merlin prior to the 3.2-dev 20031210 build maintained a local repository of jar files under the %MERLIN_HOME%/repository
directory. As of the 20031210 build the repository is maintained under AVALON_HOME which defaults to ${user.home}/.avalon."
So what repository are we talking abt here.
When you execute a build the artifacts that are created (jar file etc.) and normally placed in the maven local cache (either ${user.home}/.maven/repository or %MAVEN_HOME_LOCAL%/repository).
When you run "merlin" from the command line it establishes two repositories:
(a) a system repository which it uses to resolve its own
internal jar files (b) an application repository that it uses to to resolve
any additional artifacts referenced by the block filenames
or urls you include on the command lineFor example - if I use the "merlin" command to run the hello tutorial then merlin will read through the <classloader> definition and attempt to get the resource from the local application repository cache. If you look at the block.xml descriptor for hello, there isn't a <classloader> declaration. That's because a block.xml is written to be embedded in a jar file, and jar file, and the containing jar file establishes an implicit classpath.
In practice what happens is that Merlin provides the avalon framework api within the top application classloader - so in fact the jars loaded when running hello via "merlin target\hello-1.0.jar" is as follows:
avalon-framework-api-4.1.5.jar (auto supplied by Merlin)
hello-1.1.jar (implicitly added because
you referenced it on the
command lineEqually, if you run the command "merlin target\classes" the classloader established by merlin is equal to :
avalon-framework-api-4.1.5.jar (auto supplied by Merlin)
target/class (implicitly added because
because you referenced it
command line)In both cases, Merlin looks for the embedded resource /BLOCK-INFO/block.xml as the location to load the block deployment directives (component deployment instructions). Another common characteristic is that in both examples there are no unresolved dependencies - therefore no repository access is required, therefor you don't see a .avalon/repository directory being created.
I used maven to build the
HelloComponent example and then used merlin -execute to run it, it ran fine
but so far no ${user.home}/.avalon has been created.
Try this example:
merlin -execute http://dpml.net/merlin/tutorial/blocks/hello.block
This is basically the same as the above except that we are not depending on any implicit /BLOCK-INF/block.xml. If you take a look at the file hello.block.xml you will see what is called a "standalone" block. Merlin will read the <classloader> directives, and use the application repository to cache the jar file hello-1.1.jar. This will certainly trigger the creation of .avalon/repository.
How is this repository be different from the local maven repository that I have where maven placed all the downloaded jars while building the examples.
The reason there are different repositories are as follows:
(a) development/test cycles result in a maven repository the
changes rather frequently - not the sort of repository that
you want to use for a 24/7 server (b) development and runtime security policies are different and
although we have a lot to do in this area, we want to be able
to declare different validation and trust policies at the level
of repository and host declarations (c) internal merlin system resources (and extensions) will be subject
to different code security policies which is one of the reasons
that the system repo is separate from the app repo, but the main
reason is to structural keep them separate for stability reasonsBut - to make life easy for developers, there is the "merlinx" command which is the same as the "merlin" command except that all of the repositories default to the maven repository.
And excuse me if I'm asking dumb questions.
No problem.
Cheers, Stephen.
Thanks
Vikas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/merlin/distributions/latest | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
