I am working in Eclipse.
My Maven program has a pom.xml file with the exec plugin :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.plugin.version}</version>
<configuration>
<arguments>
<argument>src/test/resources/file.txt</argument>
</arguments>
<executable>mvn</executable>
<mainClass>${main.class}</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
I've attempted to pass an argument, but I continue to get the error:
Unknown lifecycle phase ".\src\test\resources\file.txt". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
I have also tried to pass the file via the command line arguments found in Eclipse via Run As -> Run Configurations. I receive the same error message.
How can I pass an input file argument to the application?