Hello, Im trying to build a project which requires the mail.jar from Sun. it runs perfectly in Netbeans. However, when I tried compiling it with maven, it produces a jar file that will display this error message when I tried to execute it : Could not find the main class : ANNEX.Program will exit. This is the content of my POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>ANNEX</artifactId> <packaging>jar</packaging> <version>1.0</version> <name>ANNEX</name> <url>http://maven.apache.org</url> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <mainClass>ANNEX</mainClass> </manifest> </archive> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/main/non-packaged-resources</directory> <filtering>true</filtering> <targetPath>..</targetPath> </resource> </resources> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4.4</version> </dependency> </dependencies> </project> Please help me. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/HELP-javax-mail-could-not-find-the-main-class-tp4614483p4614483.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
