On 7/6/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
All,

If you have a project setup where all your projects have a common
parent project, and some are dependend on the others, how can you
accomodate the downloaders of your assemblies such that they still can
build your project using maven if/when they are offline?

I've never used offline mode, but if everything is in your local
repository it should be available for a build in offline mode.


Example setup:
<project>
<groupId>foo</groupId>
<artifactId>foo-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
</project>

<project>
<parent>
    <groupId>foo</groupId>
    <artifactId>foo-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>
<artifactId>bar</artifactId>
<packaging>jar</packaging>
</project>

The first problem is the parent pom. Is the snapshot version of the
parent pom updated when I build the bar project?

Maven does not build parent poms or dependencies on a project.
You must either have access to a repository that the artifact can be
downloaded from or manually run the mvn install command on each
dependency so it is installed into your local repository.

If your parent pom has <modules> defined then you can run mvn install
at the parent level and the modules will automatically get built as
well.

How should I construct my (source) assembly for bar, such that it can
be compiled using maven, even when the foo-parent pom is not available
on the central repo (usually the case for snapshot versions)? Add
(somehow) the foo-parent.pom to the assembly and provide README
instructions to perform an install first on the parent pom?

Your source should be compilable because your parent pom and other
dependencies are already in your local repository.

If they are not in the local repository then, as above, you either
need to make them available from a remote repository or you need to
have manually installed them into your local repository.

HTH

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to