S
Sascha84
Gast
Hallo zusammen,
ich ibn auf ein Problem mit meinen Maven Profilen gestoßen.
Und zwer habe ich zwei Profile erstellt, welche jeweils das maven-exec-plugin aufrufen und java code ausführen sollen. Wenn ich Profile Nr. 2 ausführe läuft dies auch ohne Probleme durch, bei Profile 1 sagt er mir jedoch, dass <mainClass> nicht definiert ist, obwohl ich eine Klasse angegeben habe. Hat irgendwer eine Ahnung warum diese Fehlermeldung auftritt?
Also
funktioniert
und bei
bekomm ich die Fehlermeldung <mainClass> nicht definiert.
Gruß
Sascha
ich ibn auf ein Problem mit meinen Maven Profilen gestoßen.
Und zwer habe ich zwei Profile erstellt, welche jeweils das maven-exec-plugin aufrufen und java code ausführen sollen. Wenn ich Profile Nr. 2 ausführe läuft dies auch ohne Probleme durch, bei Profile 1 sagt er mir jedoch, dass <mainClass> nicht definiert ist, obwohl ich eine Klasse angegeben habe. Hat irgendwer eine Ahnung warum diese Fehlermeldung auftritt?
Java:
<profiles>
<profile>
<activation>
<property><name>viewer</name></property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<mainClass>de.monitor.tools.MonitorEventViewer</mainClass>
<arguments>
<argument>-Dfailonerror=true</argument>
<argument>-Dfork=true</argument>
<argument>-Dmaxmemory=1024</argument>
</arguments>
<systemProperties>
<systemProperty>
<key>monitor.events.file</key>
<value>../output/monitorEvents.out</value>
</systemProperty>
</systemProperties>
</configuration>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
<id>viewer</id>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<activation>
<property><name>player</name></property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<mainClass>de.monitor.tools.MonitorEventPlayer</mainClass>
<arguments>
<argument>-Dfailonerror=true</argument>
<argument>-Dfork=true</argument>
<argument>-Dmaxmemory=1024</argument>
</arguments>
<systemProperties>
<systemProperty>
<key>monitor.events.file</key>
<value>../output/test01/monitorEvents.out</value>
</systemProperty>
</systemProperties>
</configuration>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
<id>player</id>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Also
Java:
mvn exec:java -Dplayer
und bei
Java:
mvn exec:java -Dviewer
Gruß
Sascha