You should really send these questions to the Maven User list, Bill...
People (like myself) who know "a lot" about Maven on that list would
be happy to help.
1. A "doc" directory is fine. But more generally these things go in
src/main/resources. It really depends on what you hope to do with
them.
2. Ideally they need to be moved to src/main/resources. You can
configure things so that you can leave them in src/main/java, but it
starts getting messy.
3. You probably want to make a parent project for Javamail and then a
child module for the samples.
4. You should probably use a <profile> for each of these builds.
5. You can "filter" the content of the files. And you can rename them
with antrun plugin, and probably some others.
Wayne
On 11/13/07, Bill Shannon <bill.shannon_at_sun.com> wrote:
> I'm converting the GlassFish "mail" module to the maven2 directory
> layout, as specified at
> http://wiki.glassfish.java.net/Wiki.jsp?page=V3WorkspaceStructure
> Rather than start with the CVS version of the module, I'm starting
> with the "real" master workspace, which I've migrated from Teamware
> to Mercurial. Ultimately I hope to publish it as a completely
> separate java.net project/module.
>
> In addition to build the JavaMail mail.jar file, I also want to be
> able to build the JavaMail release zip file, which includes the mail.jar
> file, other jar files, documentation, javadocs, demo source code, etc.
>
> I haven't learned much about maven2 yet so I have some simple questions
> about the directory layout...
>
> 1. Where should I put the documentation? Is a top level "doc"
> directory ok?
>
> 2. Can I leave package.html and overview.html in the src/main/java
> directory tree?
>
> 3. Where do I put sample/demo source code? When I make a JavaMail
> release, I want to include the demo source code in the zip file.
> And I want to be able to build the demos to make sure they build
> properly before release, but the resulting class files aren't
> included in the release. Most demos are simple, standalone,
> independent applications. Should I put them all in src/demo/java?
> Do I need a different directory under src for each one?
>
> From the same set of sources I build multiple jar files with
> different combinations of sources. Each jar file needs its
> own manifest and its own resource files. The manifest files
> need to be preprocessed to (e.g.) fill in the correct version
> number before use.
>
> 4. Should I put all these manifest and resource files under
> src/main/resources?
>
> 5. Is there a way to preprocess these files before use, including
> changing their names? Or do the things in src/main/resources
> just get copied with no processing?
>
> I'm sure I'll have more questions once I start figuring out how
> to actually use maven2 to build my module...
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>