RE: Embedding - howto

"David Leangen" <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <[email protected]>
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(Unknown
> 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(Unknown
> 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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.