I have a maven project with two main classes and would like to run each class individually from the command like so:

```
java -jar appName.jar -cp com.green.RunApp1
java -jar appName.jar -cp com.blue.RunApp2

```

I tried adding the absolute paths to both classes in execute tags but doing so did not allow me to run them individually. 

For instance, RunApp1 would always run no matter which main class I pointed to when running the jar. I am pretty sure its something minor that I am overlooking.

My pom.xml:

```
 <build>
   <resources>
      <resource>
         <directory>src/main/resources</directory>
         <filtering>false</filtering>
      </resource>
   </resources>
   <testResources>
      <testResource>
         <directory>src/test/resources</directory>
         <filtering>false</filtering>
      </testResource>
   </testResources>
   <plugins>
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
         <version>2.7</version>
         <configuration>
            <encoding>UTF-8</encoding>
         </configuration>
         <executions>
            <execution>
               <id>default-resources</id>
               <phase>process-resources</phase>
               <goals>
                  <goal>resources</goal>
               </goals>
            </execution>
            <execution>
               <id>default-testResources</id>
               <phase>process-test-resources</phase>
               <goals>
                  <goal>testResources</goal>
               </goals>
            </execution>
         </executions>
      </plugin>
      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.5.1</version>
         <configuration>
            <source>1.8</source>
            <target>1.8</target>
         </configuration>
         <executions>
            <execution>
               <id>default-testCompile</id>
               <phase>test-compile</phase>
               <goals>
                  <goal>testCompile</goal>
               </goals>
            </execution>
            <execution>
               <id>default-compile</id>
               <phase>compile</phase>
               <goals>
                  <goal>compile</goal>
               </goals>
            </execution>
         </executions>
      </plugin>
      <plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
         <configuration />
      </plugin>
      <plugin>
         <artifactId>maven-deploy-plugin</artifactId>
         <version>2.8.1</version>
         <configuration>
            <skip>true</skip>
         </configuration>
         <executions>
            <execution>
               <id>default-deploy</id>
               <phase>deploy</phase>
               <goals>
                  <goal>deploy</goal>
               </goals>
            </execution>
         </executions>
      </plugin>
      <plugin>
         <groupId>org.sonatype.plugins</groupId>
         <artifactId>nexus-staging-maven-plugin</artifactId>
         <version>1.3</version>
         <executions>
            <execution>
               <id>default-deploy</id>
               <phase>deploy</phase>
               <goals>
                  <goal>deploy</goal>
               </goals>
            </execution>
         </executions>
         <configuration>
            <skipStaging>true</skipStaging>
         </configuration>
      </plugin>
   </plugins>
</build>

```