For building a .jar with all dependencies and a main-class attribute, you can use the maven plugin maven-assembly-plugin
You can use it like this in your pom-file:
<plugin>                                                        
    <artifactId>maven-assembly-plugin</artifactId>              
    <configuration>                                             
        <archive>                                               
            <manifest>                                          
                <mainClass>package.mainClass</mainClass>           
            </manifest>                                         
        </archive>                                              
        <descriptorRefs>                                        
            <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>                                       
    </configuration>                                            
    <executions>                                                
        <execution>                                             
            <id>make-assembly</id>                              
            <goals>                                             
                <goal>single</goal>                             
            </goals>                                            
            <phase>package</phase>                              
        </execution>                                            
    </executions>                                               
</plugin>    
Inside the <build> and plugins of course :)