springmavenjersey-client

Maven clean/install failing


when I'm trying to clean/install maven following error I'm facing... any suggestions Error: Could not find or load main class Pictures.spring-tool-suite-3.7.1.RELEASE-e4.5.1-win32-x86_64.sts-bundle.sts-3.7.1.RELEASE.configuration.org.eclipse.osgi.24.0..cp.;.D:.Saved


Solution

  • Two ways:

    1. below setting is tested in intellij IDE:
      edit configuration->Configuration->Main class: specify fully qualified path.
    2. you can specify main class through maven plugin in your pom.xml like below:.
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
              <archive>
                <manifest>
                  <addClasspath>true</addClasspath>
                  <mainClass>fully.qualified.MainClass</mainClass>
                </manifest>
              </archive>
            </configuration>
          </plugin>
        </plugins>
      </build>