On 4/22/06, Tommy Svensson <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  From reading the information on the maven web and trying the plugins
> for NetBeans and Eclipse I was quickly sold on Maven, and decided to
> give it a try by converting an old very simple project with 4 parts into
> maven projects. The four parts of my project are: A library, 1 code
> generator, 1 documentation generator, and a support library used by both
> generators. I made them each into separate maven atrifacts with the
> relevant dependencies to each other. Getting them to compile was very
> easy, but now came my problems:
>
> Problem 1:
> When I used Ant to build my project I made the 2 generators executable
> with java -jar by supplying a Main-Class and Class-path entries in the
> MANIFEST.MF file of the jar files. There seem to be no way to do this
> with maven!
>

Add this to your project pom files.

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>your.main.class</mainClass>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

http://maven.apache.org/guides/mini/guide-manifest.html

> The maven plugin for netbeans apparently provides its own maven plugin
> for doing this. Is it really required to do your own packaging plugin to
> handle this ? I dont want my project to have any dependency on any
> specific IDE so I dont want to use that plugin.
>
> Problem 2:
> In the end I also want to package these 4 parts into a release zip (also
> including documentation) that can be installed and used by simply
> unzipping somewhere. I can't even find a mention somewhere that such a
> thing is even possble with maven.

http://maven.apache.org/guides/mini/guide-assemblies.html

The documentation is very basic but it will get you started. Don't be
afraid to ask more questions.

>
> Problem 3:
> I want to be able to checkout clean sources from CVS and then simply
> build the whole project with one build command. With maven I seem to be
> required to manually initiate the build for each part and to do it in
> the correct order so that dependencies are resolved correctly. I want a
> dependency on the source also, not only the compiled binaries. I want to
> be able to have a top project with dependencies on the other 4 and when
> I build that all projects are build in the order required to support
> compile dependencies.
>
> I get the impression that Ant is still needed to manage the project as a
> whole.
>
> I've read what documentation I can find on the Maven home page, but it
> is unfortunately not very helpful.

Do some researches on multi-modules projet on this list, you'll find
tons of informations and if you have any specific questions don't be
afraid to ask. This is currently a big hole in Maven documentation.

By the way, I understand that for beginner users the current Maven
documentation format is totally innapropriate. I mean how are you
suppose to know what is an assembly? I'm just an experiend Maven 2
user but I have been trying to work on a more detailled documentation,
which can be found as a work in progress
herehttp://docs.codehaus.org/display/MAVENUSER/The+Maven+2+tutorial.  
I haven't had the time at all lately because of some personal problems
but I will try to put more work on it this summer so mails like yours
are always great. Give us a quick impressions of what new Maven users
are looking for and trying to achieve.

>
> Any suggestions are appreciated.
>
> Best Regards,
> Tommy Svensson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Hope it's help!

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

Reply via email to