On Apr 22, 2008, at 8:16 PM, Lachlan Deck wrote:

Hi Joshua,

On 23/04/2008, at 12:56 AM, Joshua ChaitinPollak wrote:

Have you tried, or has anyone suggested using the system scope?

I had thought about it, but, unless I'm mistaken, that assumes that the jar will be found in that location at runtime/deployment also (which it won't).

Well, as far as I understand, using the system scope tells Maven not to do anything with it at release time, so putting the library in your release bundle, jar, or whatever, and on the classpath would be your responsiblity.

We get around that by using a custom assembly definition and a custom shell script to start our application which puts anything in our libs directory (in our deployed installation) on the classpath.

On the other hand, what we've done internally is created an inhouse Maven repository with Artifactory, and we uploaded our third party jars to the internal 3rd party jar repository (things like JIDE that aren't externally redistributable)
I think you mentioned that solution isn't available to you.

I might be able to make it happen... we'll see.

The part I'm needing help with now is creating the final assembly/ bundle.
Specifically I need to do the following:
- filter a text file (replacing certain properties) +

Well, we do this:

            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>

and then we have a version.properties file that looks like:

[EMAIL PROTECTED]:~/src/$ cat src/main/resources/pkg/spec/ version.properties
application.repository.version=${buildNumber}
application.releasenumber=${project.version}
application.customer=${customer}
application.repository.url=${project.scm.connection}

Those properties are supplied by Maven. I believe you can refer to anything in the <properties> block in this fashion as well.

- append to the text file a list of the jars bundled (prefixing each with a custom path).


That's a tricky one. I'd have to say start with the dependency or assembly plugin and see if they can do what you need. I know one of the plugins can put the jars on your classpath in the Manifest, but we don't use the manifest, so I have no experience with it.

-Josh

--
Joshua ChaitinPollak | Software Engineer
Kiva Systems, Inc., 225 Wildwood Ave, Woburn, MA 01970






Reply via email to