I found an easy solution to this...Don't put the Components.library file in
the jar...instead, put it with the html/jwc files (located in
/WEB-INF/components/) and merely reference the package structure of the jar
file...something like...
<library-specification>
<meta key="org.apache.tapestry.component-class-packages" value="
com.mydomain.tap40.components"/>
....
<component-type type="Border" specification-path="Border.jwc"/>
</library-specification>
On 1/12/06, Patrick Casey <[EMAIL PROTECTED]> wrote:
>
>
> I take the opposite approach, not out of any deeply held
> conviction,
> but just habit I guess. All my images go in /img, all my css goes in /css,
> etc. It means that a component might not be in its own self contained
> directory, but it also means that I don't have to look all over the map to
> find the hundred little png files that my application uses.
>
> I'm not sure what problem the OP is having though. If you use the
> asset service and reference your images, they can be anywhere under
> context
> e.g.
>
> <context-asset name="home_img" path="/img/homewire.gif" />
>
> In my experience at least, it works fine.
>
> --- Pat
>
>
> > -----Original Message-----
> > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, January 12, 2006 10:43 AM
> > To: Tapestry users
> > Subject: Re: Deploying Tap4 components - newbie question
> >
> > I always prefer to stick everything together whenever possible with
> > components. All of the html/css/images/etc are all in the same directory
> > as
> > the actual component. Works for me..
> >
> > On 1/12/06, Jason Suplizio <[EMAIL PROTECTED]> wrote:
> > >
> > > I could really use some help with this. I've been told to separate all
> > the
> > > web artifacts (html/css/images/etc...) from the Java files. I then
> need
> > to
> > > add my tapestry components to an unrelated, external Java app.
> > >
> > > I've broken out my components into the following format:
> > >
> > > com.mydomain.tap40.components -- jarred up files containing only
> > > component
> > > Java files and the Components.library file
> > >
> > > /context
> > > |_/css/MyComponent.css
> > > |_/images/MyComponent.gif
> > > |_/WEB-INF/components/MyComponent.htm, MyComponent.jwc
> > >
> > > So, my plan is to ant to handle the build in the external app. I
> realize
> > > that all the assets (css, images, html/jwc files found under /context)
> > are
> > > relative to my Components.library file in my jar, in /context/WEB-
> > INF/lib.
> > > My references to these assets in my Components.library file now look
> > > something like:
> > >
> > > <component-type type="MyComponent"
> > > specification-path="../../../../components/MyComponent.jwc"/>
> > >
> > > I end up with an error like:
> > > "Unable to locate resource 'css/MyComponent.css' relative to
> > >
> >
> classpath:/com/mydomain/tap40/components/../../components/MyComponent.jwc"
> > >
> > > This is kind of ugly, is there a preferred *standard* way to handle
> this
> > > type of deployment? Again, its been mandated that my build separates
> the
> > > web
> > > artifacts of my components from my component java files. Any
> tutorials,
> > > how-tos, examples, would be greatly appreciated!
> > > Thanks!
> > > Jason
> > >
> > >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>