On Fri, 2002-08-09 at 18:20, Warner Onstine wrote:
> Hi all,
> I am trying to figure out how to use these two to do what I want ;-). I have
> a bunch of HTML and SZD (webobject files) that are currently in the source
> tree. I want to add these back into the jar that I create in the same
> directories that they came in. However when I use the jarResources it still
> places them in src/java/org...., rather than just org.whatever.

You need to set this property to pick your basedir:

maven.jarResources.basedir = src/java

And then select your resources using the <resources/> element. You can
look at the maven project.xml for an example. 

Alternatively you can also use a postGoal to copy whatever you want into
the ${maven.build.dest} directory. Here's a little snippet from a plexus
component build:

  <postGoal name="java:compile">

    <copy
      file="${maven.src.dir}/conf/configuration.xml"
      todir="${maven.build.dest}/org/apache/plexus/manager"
    />

  </postGoal>
 
You can copy whatever you like into the ${maven.build.dest}
(target/classes) directory before the JAR is created. The postGoal is
run right after compilation and you can do whatever you like in the
postGoal before the next phase, java:jar, occurs.
 
> That's the first issue.
> 
> Second, I have a number of jars in the repo that I want to add into the
> final jar for deployment, since <jars> only looks locally, how do I specify
> the repo in the project.xml?

<jars/> is not used. It's a vestigal gump thing.

If you want to copy all your dependencies into the final JAR you can do
something like:

<postGoal name="java:compile">
  <dist:copy-deps todir="${maven.build.dest}">
</postGoal>

Which will copy all your dependency JARs into ${maven.build.dest} and
they will be JAR'd up. Or you can use can you a postGoal to copy
manually what you need, where you need to put it.

> Thanks in advance.
> 
> -warner
> 
> +warner onstine+
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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

Reply via email to