>>>>> "Rob Withers" <[email protected]>:
> Here are my questions, I suppose:
> 1.. How can I install murmur-events, even though pmd/findbugs is issuing
> warnings? The mvn install is failing.
What's the directory layout of your projects? Where do you issue the
command? What are the error messages you're getting.
> 2.. Where is the local repository where these get installed?
On a linux/unix'ish machine, it is in $HOME/.m2/repository unless you've
configured it otherwise.
On a Windows XP machine it would typically be
C:\Documents and Settings\yourusername\.m2\repository
On a Vista/Windows 7/Windows 2008 Server and newer, it would typically
be in
C:\users\yourusername\.m2\repository
> 3.. Do I need to have a parent pom with two modules, one for each
> project?
That would be "the maven way", yes, structured so:
murmur-top/
pom.xml
murmur-events/
pom.xml
murmur/
pom.xml
If you structure your project this with POMs like this, you will have
the minimum configuration needed:
murmur-top/pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.murmur</groupId>
<artifactId>murmur-top</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>murmur-top</name>
<modules>
<module>murmur-events</module>
<module>murmur</module>
</modules>
</project>
murmur-top/murmur-events/pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.murmur</groupId>
<artifactId>murmur-top</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>murmur-events</artifactId>
<name>murmur-events</name>
</project>
murmur-top/murmur/pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.murmur</groupId>
<artifactId>murmur-top</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>murmur</artifactId>
<name>murmur</name>
<dependencies>
<dependency>
<groupId>org.murmur</groupId>
<artifactId>murmur-events</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
(I've left out external dependencies such as eg. JUnit for brevity).
To build everything you would do "mvn install" or "mvn clean install"
from the murmur-top directory.
If you go to murmur-top/murmur/ and do "mvn install" from that directory
it will try to resolve the murmur-events dependency from the local
repository ($HOME/.m2/repository) and if the jar isn't there, it will
fail.
If you want to be sure that you are depending on the newest
murmur-events in murmur, you will need to do "mvn install" from the
murmur-top directory.
Note: you don't _have_ to structure your projects like above, but it is
easier that way.
> Does this impact where my local repository is?
Nope.
> 4.. Should I specify the murmur-events-1.0.1-SNAPSHOT.jar, as a dependency
> in the murmur project, by system file path?
No. That is: you probably could, but you definitely should not.
> 5.. If the jar is named ‘murmur-events-1.0.1-SNAPSHOT.jar’, will the above
> dependency of the following find it?
Um... not sure I understood that...?
> 6.. What about setting up an internal repository? Would that be a better
> solution?
What do you mean by an internal repository? A repository for internal
to your project? Or a repository local to your site?
> 7.. If I have the dependency in maven, will eclipse pick it up?
Not eclipse by itself. But you can either use the eclipse m2e plugin
that will make maven projects appear as eclipse projects, or you can use
the maven-eclipse-plugin to let maven generate the eclipse project
settings. You can also use maven as an external build tool in eclipse.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]