maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <baerr...@gmail.com>
Subject Re: Noob question
Date Wed, 01 Feb 2012 06:23:46 GMT
On Wed, Feb 1, 2012 at 10:15 AM, wimcolgate <wimcolgate@gmail.com> wrote:
> I re-arranged things, the way I probably should have started.

The best advice I have seen is
"Don't fight against Maven, you'll loose. So, follow and use its
conventions, adopt its philosophy, use it the way it works. If Maven
doesn't work the way YOU want, don't use it.
http://stackoverflow.com/a/2254528/552958
(repeated on this list many time by others as well)

There is a reason that Maven has convention over configuration.
And as you have noticed, it's easier to conform to Maven and backport Ant :)

> The examples is now the main maven pom.xml. I indicate in my pom.xml, that
> have two modules, the utility class and the rest of the main library. These
> now all build into .class files.
>
> Next hurdle is to figure out how to build the examples. There are at least
> 11, and more will be forthcoming.
>
> The research I've done indicates maven's design center is a one jar/war per
> project; however, I did find this:
>
> http://stackoverflow.com/questions/2132958/ant-to-maven-multiple-build-targets
>
> Is this the proper path to follow?

It's not quite the same thing, but it is sound advice.

Chances are your configuration files and resources are going to be
identical amongst the examples, but as soon as they differ you will
have wished you split them into their own modules.
I'd recommend inserting another level into your build module named
"examples" so that your example projects are kept out of the way of
the main project and are easy to find.
i.e.
root/
  utilities/
  library/
  examples/
    example-1/
    example-2/
    ...
    example-n/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message