Lukas Theussl wrote:
Check the docs for maven.jar.override:
http://maven.apache.org/maven-1.x/using/managing-dependencies.html
Thanks. I looked at this and it wasn't clear to me whether override
meant that an entry had to be present in the project.xml which was
subsequently overridden by this entry in my project.properties. I tried
it both ways and got the message when doing a 'maven war:war' that a
file was being copied to the target folder, which looked promising - but
no such file appeared (maybe because the compilation failed? I hadn't
done the same process with all the other jars, wanting to test it on
just one).
I know that Maven 2 has the ability to use a directory as a local
repository, declared in a <repository> tag in pom.xml, using e.g.,
'file:///./lib'. Maven 1 does not seem to allow that, though, or at
least I can't get it to work.
In the meantime I've effected a kludgy workaround by creating a
project-specific folder in my local repository, copying all my required
jar files into a jars folder within it, and then using the following
Groovy script to spit out the necessary dependency tags for my
project.xml file:
def path="/opt/projects/forwarder/src/lib/"
File dir=new File(path)
String s=""
for (filename in dir.list()){
String[] parts=filename.split("\\.")
def text="""
<dependency>
<groupId>forwarder</groupId>
<artifactId>${parts[0]}</artifactId>
<jar>${filename}</jar>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
"""
s+=text
}
println s
Maybe I should move to Maven 2?
John
--
==============================================
John Moore - Norwich, UK - [EMAIL PROTECTED]
==============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]