On 31/08/2011 9:50 AM, Denis Haskin wrote:
Sorry, to follow up:

If I do "mvn install" in the parent project first, then it succeeds
(because, I believe, it finds the installed jar
for onebusaway-nyc-vehicle-tracking in the local .m2 repo)

dwh
That is how it is supposed to work.
Do yourself a big favour and install a repo of your own.
It will take 1/2 a day but will save you a lot of aggravation.
We waited a couple of years to put one in and I have regretted it ever since.
Makes Maven so much easier to understand and use.

Ron

On Wed, Aug 31, 2011 at 9:48 AM, Denis Haskin<[email protected]>wrote:

$ mvn -v
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)

Doesn't *seem* to be working as described, though.  To be specific, I'm
trying to use hbm2ddl and it's not finding classes in sibling modules unless
I install first.  So for example:

onebusaway-nyc dwhsix$ mvn compile
...this succeeds...
onebusaway-nyc dwhsix$ cd onebusaway-nyc-dbsetup/
onebusaway-nyc-dbsetup dwhsix$ mvn hibernate3:hbm2ddl
...fails with:
[ERROR] Failed to execute goal on project onebusaway-nyc-dbsetup: Could not
resolve dependencies for project
org.onebusaway:onebusaway-nyc-dbsetup:jar:2.0.1-SNAPSHOT: Could not find
artifact org.onebusaway:onebusaway-nyc-vehicle-tracking:jar:2.0.1-SNAPSHOT
in snapshots.github.onebusaway.org (
https://github.com/camsys/mvn-repo/raw/master/snapshots) ->  [Help 1]

(see my onebusway-nyc-dbsetup/pom.xml below)

Is this maybe a problem with version numbers?  What more information can I
provide?

Thanks!

dwh

onebusway-nyc-dbsetup/pom.xml

<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";
  xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";>
  <modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>onebusaway-nyc</artifactId>
  <groupId>org.onebusaway</groupId>
<version>2.0.1-SNAPSHOT</version>
  </parent>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-nyc-dbsetup</artifactId>
  <version>2.0.1-SNAPSHOT</version>
<name>onebusaway-nyc-dbsetup</name>
  <url>http://maven.apache.org</url>
<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.onebusaway</groupId>
  <artifactId>onebusaway-transit-data-federation</artifactId>
<version>${onebusaway.appmodule.version}</version>
  </dependency>
<dependency>
<groupId>org.onebusaway</groupId>
  <artifactId>onebusaway-geocoder</artifactId>
<version>${onebusaway.appmodule.version}</version>
  </dependency>
<dependency>
<groupId>org.onebusaway</groupId>
  <artifactId>onebusaway-users</artifactId>
<version>${onebusaway.appmodule.version}</version>
  </dependency>
<dependency>
<groupId>org.onebusaway</groupId>
  <artifactId>onebusaway-nyc-vehicle-tracking</artifactId>
<version>${onebusaway.appmodule.version}</version>
  </dependency>
<dependency>
<groupId>junit</groupId>
  <artifactId>junit</artifactId>
<version>3.8.1</version>
  <scope>test</scope>
</dependency>
</dependencies>
</project>



On Wed, Aug 31, 2011 at 7:37 AM, Anders Hammar<[email protected]>  wrote:

When using Maven 3.0 on a multi-module project, this should happen
automagically (you just declare normal dependencies). If this wasn't
the case, "mvn compile" wouldn't work on a multi-module project.
Maven 2.x has some issues in this area though.

What Maven version are you using?

/Anders

On Wed, Aug 31, 2011 at 13:22, Denis Haskin<[email protected]>
wrote:
Is there a way to indicate dependencies between sibling modules using
just
build artifacts (e.g. not requiring an install into local m2 repository
nor
push to a remote one)?

Every time I indicate a dependency between sibling modules, maven seems
to
look to satisfy the dependency elsewhere than the project's build
environment.  I suspect my issue is that I'm not thinking lifecycle-y
enough, but still viewing the world through ant-ish glasses.

(Yes, this is related to my earlier question about needing to get
classes in
path for hbm2ddl; it actually works fine for the dependencies *between*
the
two multimodule projects; it's satisfying the dependencies within one
multimodule project that I'm still having trouble completing.)

Thanks,

dwh

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to