I have the following setup using Maven3 (or 2.2):

Parent-Pom (same directory level as Child1,2. Use relativePath for parent in
Child1, Child2)
Child1: ClassA, ClassB
Child2: ClassA_Entity.aj, ClassB_Entity.aj

So Child2 needs Child1 classes to augment with aspectj. I have all of the
aspectj components setup correctly (e.g. Child1 dependency is on the inpath,
etc.). Everything works fine if I run package or test in the parent
directory. Child2 sees the assembly from Child1 just as the docs suggest.

The docs also say that if I run mvn test (for example) in Child2, then
Child1 has to be in the repository because maven won't build Child1.

However, is there a setting that says, don't expect Child1 in the
repository, just use the target class files since its a sibling child? The
docs also say that if I run mvn test in the parent, Child2 will see the
target directory in Child1 and not have to have Child1 in the repository. So
its slightly different behavior depending on where you issues the test or
assembly command in the parent or child projects. That's fine, but for
various IDE reasons, I would like to have Child1 target classes directly
accessed whenever I run a maven command in Child2.

Is there a switch that says when I issue a mvn command in Child2 to use the
target classes in Child1 instead of forcing Child1 to have to be in the
repository?

I had envisioned 2-3 child projects each depending on a sibling or two that
augment the basic classes using aspectj. In this case, chaining helps me
with IDE development. ADJT in eclipse can do this, but when I use m2eclipse
and it runs maven under the hood on a full rebuild, maven forces the sibling
to be in the repository, which its not (and which incurs even more build
time to force it to be in the repository).

Is there another way to handle this that is a better pattern or approach?


-- 
View this message in context: 
http://maven.40175.n5.nabble.com/parent-pom-and-child-compile-child-needs-sibling-classes-tp3345200p3345200.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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

Reply via email to