You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Craig S. Cottingham" <cr...@cottingham.net> on 2005/03/09 16:23:30 UTC
How to reference a dependency by filename?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have two projects (A and B) that use Hibernate, so they contain
*.hbm.xml files for their persisted classes. Up to now, they've been
mutually exclusive, but I'm trying to add a dependency on a class in A
to a class in B. (The class in B is to have a collection of the class
in A.)
Adding a dependency in project.xml is straightforward. However, we also
generate our database schema using Hibernate's schema export tool, and
it needs to know the path to the *.hbm.xml *files*. I haven't seen any
way to tell it to look in the classpath.
So, I figure I can unjar the *.hbm.xml files from the jarfile for A
into an appropriate place in B's maven.build.dir and reference them
from there. Now, the stumbling block is telling the unjar task where to
find A's jarfile in the local repository.
maven.repo.local gives me the path to the local repository. I don't
mind hardcoding the groupId and artifactId, but I don't want to
hardcode the version.
Is there some way to do something in maven.xml akin to "find the
dependency with groupId == 'mycompany' and artifactId == 'A', and
return version"? Alternatively, can someone suggest a better way to
accomplish what I'm trying to accomplish?
- --
Craig S. Cottingham
craig@cottingham.net
OpenPGP key available from:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCLxT3EJLQ3Hl395wRAi6LAJ4yFeTYfVUwhhFfWYTp7MyOb6jzcwCdGEIK
1upCH5Jv7k3RfIDkvGY+2VM=
=wC/j
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org