The "jars@ folder is derived from the artifact type.  If no type is
specificed then "jar" is assumed as the type.  The artifact spec is
expanded as follows for versioned artifacts:

  [repository-cache]/[group]/[type]s/[name]-[version].[type]

For artifacts that do not declare a version its:

  [repository-cache]/[group]/[type]s/[name].[type]

Steve.

-----Original Message-----
From: David Leangen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 21, 2004 5:17 AM
To: Avalon framework users
Subject: RE: Embedding - howto
Importance: High


Ok, I THINK I understand now, but perhaps you could confirm if my
assumption
is correct, since it is only a guess.

My guess is that using
"artifact:jar:avalon/merlin/avalon-merlin-impl#SNAPSHOT" is telling the
resolver to look in ${magic.home}/repository, in the directoy
"avalon/merlin". I guess that the folder "jars" is assumed, so the final
part of this "path" just tells what jar we want.

So, if this guess is correct, say I wanted to lookup the avalon
framework
component, would the "path" be written as:

artiface:jar:avalon/framework/avalon-framework-impl#SNAPSHOT?



> -----Original Message-----
> From: David Leangen [mailto:[EMAIL PROTECTED]
> Sent: July 21, 2004 12:08
> To: Avalon framework users
> Subject: RE: Embedding - howto
>
>
>
> Guys,
>
> Thanks so much for your explanations. I understand a lot better now.
>
> However, I am still not sure how the packages are resolved. I am
> using this:
>
>             String spec = "@MERLIN-IMPL-SPEC@";
>             Artifact artifact = Artifact.createArtifact( spec );
>             Builder builder = context.newBuilder( artifact );
>
> But I am getting this error:
>
> org.apache.avalon.repository.RepositoryException: Unable to retrieve
the
> metadata for the artifact
> :artifact:jar:@MERLIN-IMPL-SPEC@/@MERLIN-IMPL-SPEC@
>       at
>
org.apache.avalon.repository.impl.DefaultRepository.getAttributes(Unknow
n
> Source)
>       at
> org.apache.avalon.repository.main.DefaultBuilder.<init>(Unknown
Source)
>       at
> org.apache.avalon.repository.main.DefaultBuilder.<init>(Unknown
Source)
>       at
>
org.apache.avalon.repository.main.DefaultInitialContext.newBuilder(Unkno
wn
> Source)
>       at
> com.konova.expedition.db.splitter.avalon.KFileSplitterComponentTes
> t.testFile
> Splitter(KFileSplitterComponentTest.java:75)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
> pl.java:39
> )
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
> cessorImpl
> .java:25)
>       at java.lang.reflect.Method.invoke(Method.java:324)
>       at junit.framework.TestCase.runTest(TestCase.java:154)
>       at junit.framework.TestCase.runBare(TestCase.java:127)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Re
> moteTestRu
> nner.java:421)
>       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteT
> estRunner.
> java:305)
>       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Remote
> TestRunner
> .java:186)
> Caused by: org.apache.avalon.repository.RepositoryException: Unknown
> artifact: [artifact:jar:@MERLIN-IMPL-SPEC@/@[EMAIL PROTECTED]
>       at
org.apache.avalon.repository.util.LoaderUtils.getResource(Unknown
> Source)
>       at
>
org.apache.avalon.repository.impl.DefaultRepository.getResource(Unknown
> Source)
>       ... 20 more
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to