"no main manifest attribute" и Maven

При попытке выполнения jar собранного с помошью maven, я столкнулся со следующей проблемой:

no main manifest attribute

Для решения этой проблемы нужно указать класс для выполнения. Как мы уже знаем, что в maven всё делается через плагины, вот пример моего pom.xml:

 

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>ru.devhead</groupId>
  <artifactId>SuperApp</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>SuperApp</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
   <build>
   <plugins>
   <plugin>
    <!-- Build an executable JAR -->
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <configuration>
    <archive>
      <manifest>
      <addClasspath>true</addClasspath>
      <classpathPrefix>lib/</classpathPrefix>
          <mainClass>ru.devhead.superapp.App</mainClass>
      </manifest>
    </archive>
     </configuration>
    </plugin>
    </plugins>
    </build>

</project>

 

Теги: , ,

Дата: 19 августа 2012

Автор: Аноним

Комментарии: 557

Комментарии: 557

  1. cialis competitors buy cheap cialis cialis tadalafil 20mg

  2. such abroad [url=https://amstyles.com/#]ventolin hfa aerosol[/url] deliberately goal normally profile ventolin hfa aer generic tourist stress ventolin hfa aerosol direct
    equal https://amstyles.com/

  3. together republic [url=http://viacheapusa.com/#]viagra on line no prec[/url] lower city rather ask generic viagra usa to usa roughly
    item viagra on line no prec basically doctor http://viacheapusa.com/

  4. ultimately lab [url=https://drbryanpwalsh.com/#]cialis generic jonjonsbbq[/url] successfully
    advantage readily satisfaction buying generic viagra online reviews currently sweet cialis generic jonjonsbbq somehow preparation https://drbryanpwalsh.com/

  5. cam girl [url=https://camgirls1.com]camgirls1.com[/url] best cam girl.
    camgirl [url=https://hotcamgirls1.com]hotcamgirls1[/url] ebony girls on cam.
    live free sex cam [url=https://bestonlinesexcams1.com]secret sex cam [/url] japanese sex cam.
    cam free live sex [url=https://bestonlinesexwebcams.com]cam sex live [/url] free live sex cam chat.
    free cam sites [url=https://adultfreewebcamsites.com]adultfreewebcamsites[/url] xxx cam site.
    cam to cam sites [url=https://adultcamsites1.com]cam to cam sites [/url] online webcam sites.

  6. young girls on cam [url=https://camgirls1.com]camgirls1.com[/url] best cam girl site.
    webcammodels [url=https://hotcamgirls1.com]free cam girls [/url] girl webcams.
    teen webcam sex videos [url=https://bestonlinesexcams1.com]bestonlinesexcams1.com[/url] wife has sex with dog on webcam.
    cam live sex [url=https://bestonlinesexwebcams.com]bestonlinesexwebcams[/url] teen sex webcam.
    sex cam site [url=https://adultfreewebcamsites.com]adultfreewebcamsites[/url] russian cam sites.
    cam 2 cam sites [url=https://adultcamsites1.com]adultcamsites1[/url] best amateur cam sites.

  7. best cam girls [url=https://camgirls1.com]camming [/url] cams girl.
    cammodels [url=https://hotcamgirls1.com]web cams girls [/url] top webcam girl.
    real webcam sex [url=https://bestonlinesexcams1.com]secret sex cam [/url] local sex cam.
    xxx cam sex [url=https://bestonlinesexwebcams.com]bestonlinesexwebcams.com[/url] live cam sex.
    free web cam sites [url=https://adultfreewebcamsites.com]sex cam site [/url] korean cam site.
    best adult webcam sites [url=https://adultcamsites1.com]porn webcam sites [/url] ebony webcam sites.

Оставить комментарий

*

Комментарий:

Ваш e-mail не будет опубликован.
Обязательные поля помечены *

Разрешенные HTML теги:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>