On Wed, Jul 20, 2011 at 2:45 PM, Abdul Hakim <[email protected]> wrote:
> My project directory is ANNEX. I place the main class (ANNEX.java) in
> \ANNEX\src\main\java\com\mycompany\app
> Does this mean that i have to put
> something like this in the POM?
> <mainClass>com.mycompany.app.ANNEX</mainClass>.

Yes, read http://maven.apache.org/shared/maven-archiver/examples/classpath.html

> Also, I intend to distribute it in a single jar, which is executable by just
> clicking at the file. How am I suppose to achieve this. I have compiled
> several other projects with maven and I have no problem with just putting
> the Main class in the tag (<mainClass>MAIN</mainClass>). I dont understand
> why I am getting this error now.
>
> This is what is in the manifest :
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: Apache Maven
> Built-By: akey
> Build-Jdk: 1.6.0_21
> Main-Class: ANNEX
> Class-Path: plexus-utils-1.1.jar mail-1.4.4.jar

You can create an "uber-jar" that contains all your dependencies via
http://maven.apache.org/plugins/maven-shade-plugin/examples/executable-jar.html

> Please assist me as I dont have much knowledge in this thing.

The best option is to help your self and get educated in this thing.
Start googling and reading.
Have you read these http://maven.apache.org/articles.html?

There is only so much knowledge you get will out of the mailing list.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to