C:>java -jar traprange-0.0.1-SNAPSHOT.jar -h
Командная строка выдает: no main manifest attribute, in traprange-0.0.1-SNAPSHOT.jar
pom.xml
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>traprange.MAIN</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
Главный класс:
package traprange;
import org.apache.log4j.PropertyConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MAIN {
private static final Logger logger = LoggerFactory.getLogger(MAIN.class);
public static void main(String[] args) {
PropertyConfigurator.configure(MAIN.class.getResource("/traprange/log4j.properties"));
if (args.length == 1 && "-h".equals(args[0])) {
printHelp();
}
}
private static void printHelp() {
StringBuilder help = new StringBuilder();
help.append("Argument list: \n");
logger.info(help.toString());
}
}
Что не так?