Reputation: 1020
I'm using fax4j in maven java project on windows 7.
I have a little code to send a fax. When run code the program responds follow error:
Error Code: 258 Message: Unable to send fax.
My pom.xml project just have one dependency:
<dependencies>
<dependency>
<groupId>net.sf.fax4j</groupId>
<artifactId>fax4j</artifactId>
<version>0.42.9</version>
</dependency>
</dependencies>
and my project just have one class main like this:
import java.io.File;
import org.fax4j.FaxClient;
import org.fax4j.FaxClientFactory;
import org.fax4j.FaxJob;
import org.fax4j.FaxJob.FaxJobPriority;
import org.fax4j.FaxJobStatus;
public class FaxTest {
public static void main(String[] args) {
FaxClient faxClient = FaxClientFactory.createFaxClient();
FaxJob faxJob = faxClient.createFaxJob();
File file = getFile("fax/fax.txt");
if (file == null) {
System.err.println("ERRO fax.txt.");
return;
} else {
System.out.println("OK fax.txt.");
}
faxJob.setFile(file);
faxJob.setPriority(FaxJobPriority.HIGH_PRIORITY);
faxJob.setTargetAddress("0222088888");
faxJob.setTargetName("ANO piso 1");
faxJob.setSenderEmail("[email protected]");
faxJob.setSenderFaxNumber("0222088889");
faxJob.setSenderName("xxx");
//Once the fax job contains all the needed info, you submit it via fax client:
//submit fax job
faxClient.submitFaxJob(faxJob);
System.out.println("Fax Job Sumbitted: " + faxJob.getID());
while (faxClient.getFaxJobStatus(faxJob) == FaxJobStatus.PENDING) {
System.out.println("STATUS: "
+ faxClient.getFaxJobStatus(faxJob).toString());
for (int i = 0; i < 100; i++) {
try {
Thread.sleep(100);
} catch (InterruptedException ex) {
System.out.println("Error sleep: " + ex.getMessage());
}
System.out.print(".");
}
}
System.out.println("FINAL STATUS: "
+ faxClient.getFaxJobStatus(faxJob).toString());
}
/**
* getFile pass argument pathFile
*
* @param fileName
* @return
*/
private static File
getFile(String fileName) {
//Get file from resources folder
ClassLoader classLoader = FaxTest.class
.getClassLoader();
File file = new File(classLoader.getResource(fileName).getFile());
return file;
}
}
now(23(04/2015), the output log is:
------------------------------------------------------------------------
Building faxTeste 1.0-SNAPSHOT
------------------------------------------------------------------------
Lifecycle default -> [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]
Lifecycle clean -> [pre-clean, clean, post-clean]
Lifecycle site -> [pre-site, site, post-site, site-deploy]
=== PROJECT BUILD PLAN ================================================
Project: pt.ano:faxTeste:1.0-SNAPSHOT
Dependencies (collect): []
Dependencies (resolve): [test]
Repositories (dependencies): [central (http://repo.maven.apache.org/maven2, releases)]
Repositories (plugins) : [central (http://repo.maven.apache.org/maven2, releases)]
-----------------------------------------------------------------------
Goal: org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli)
Style: Regular
Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<basedir default-value="${basedir}"/>
<classpathScope default-value="runtime">${exec.classpathScope}</classpathScope>
<commandlineArgs>${exec.args}</commandlineArgs>
<executable>${exec.executable}</executable>
<longClasspath default-value="false">${exec.longClasspath}</longClasspath>
<outputFile>${exec.outputFile}</outputFile>
<project default-value="${project}"/>
<session default-value="${session}"/>
<skip default-value="false">${skip}</skip>
<sourceRoot>${sourceRoot}</sourceRoot>
<testSourceRoot>${testSourceRoot}</testSourceRoot>
<workingDirectory>${exec.workingdir}</workingDirectory>
</configuration>
=======================================================================
pt.ano:faxTeste:jar:1.0-SNAPSHOT
net.sf.fax4j:fax4j:jar:0.42.9:compile
javax.mail:mail:jar:1.4.7:compile
javax.activation:activation:jar:1.1:compile
commons-httpclient:commons-httpclient:jar:3.1:compile
commons-codec:commons-codec:jar:1.2:compile
commons-logging:commons-logging:jar:1.1.3:compile
org.json:json:jar:20090211:compile
net.sf.gnu-hylafax:gnu-hylafax-core:jar:1.0.3:compile
net.sf.gnu-hylafax:gnu-hylafax-inet-ftp:jar:1.0.3:compile
net.sf.gnu-hylafax:gnu-hylafax-utils:jar:1.0.3:compile
log4j:log4j:jar:1.2.14:compile
commons-cli:commons-cli:jar:1.0:compile
commons-lang:commons-lang:jar:1.0:compile
junit:junit:jar:3.7:compile
urbanophile:java-getopt:jar:1.0.9:compile
net.sf.gnu-hylafax:gnu-hylafax-pool:jar:1.0.3:compile
concurrent:concurrent:jar:1.3.4:compile
org.rxtx:rxtx:jar:2.1.7:compile
--- exec-maven-plugin:1.2.1:exec (default-cli) @ faxTeste ---
Created new class realm maven.api
Importing foreign packages into class realm maven.api
Imported: org.apache.maven.wagon.events < maven.ext
Imported: org.sonatype.aether.transfer < maven.ext
Imported: org.apache.maven.exception < maven.ext
Imported: org.sonatype.aether.metadata < maven.ext
Imported: org.codehaus.plexus.util.xml.Xpp3Dom < maven.ext
Imported: org.sonatype.aether.collection < maven.ext
Imported: org.sonatype.aether.version < maven.ext
Imported: org.apache.maven.monitor < maven.ext
Imported: org.apache.maven.wagon.repository < maven.ext
Imported: org.apache.maven.repository < maven.ext
Imported: org.apache.maven.wagon.resource < maven.ext
Imported: org.codehaus.plexus.logging < maven.ext
Imported: org.apache.maven.profiles < maven.ext
Imported: org.sonatype.aether.repository < maven.ext
Imported: org.apache.maven.classrealm < maven.ext
Imported: org.apache.maven.execution < maven.ext
Imported: org.sonatype.aether.artifact < maven.ext
Imported: org.sonatype.aether.spi < maven.ext
Imported: org.apache.maven.reporting < maven.ext
Imported: org.apache.maven.usability < maven.ext
Imported: org.codehaus.plexus.container < maven.ext
Imported: org.codehaus.plexus.component < maven.ext
Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < maven.ext
Imported: org.apache.maven.wagon.authentication < maven.ext
Imported: org.apache.maven.lifecycle < maven.ext
Imported: org.codehaus.plexus.classworlds < maven.ext
Imported: org.sonatype.aether.graph < maven.ext
Imported: org.sonatype.aether.* < maven.ext
Imported: org.apache.maven.settings < maven.ext
Imported: org.codehaus.classworlds < maven.ext
Imported: org.sonatype.aether.impl < maven.ext
Imported: org.apache.maven.wagon.* < maven.ext
Imported: org.apache.maven.toolchain < maven.ext
Imported: org.sonatype.aether.deployment < maven.ext
Imported: org.apache.maven.wagon.observers < maven.ext
Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < maven.ext
Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < maven.ext
Imported: org.apache.maven.configuration < maven.ext
Imported: org.apache.maven.cli < maven.ext
Imported: org.sonatype.aether.installation < maven.ext
Imported: org.codehaus.plexus.context < maven.ext
Imported: org.apache.maven.wagon.authorization < maven.ext
Imported: org.apache.maven.project < maven.ext
Imported: org.apache.maven.rtinfo < maven.ext
Imported: org.codehaus.plexus.lifecycle < maven.ext
Imported: org.codehaus.plexus.configuration < maven.ext
Imported: org.apache.maven.artifact < maven.ext
Imported: org.apache.maven.model < maven.ext
Imported: org.apache.maven.* < maven.ext
Imported: org.apache.maven.wagon.proxy < maven.ext
Imported: org.sonatype.aether.resolution < maven.ext
Imported: org.apache.maven.plugin < maven.ext
Imported: org.codehaus.plexus.* < maven.ext
Imported: org.codehaus.plexus.personality < maven.ext
Populating class realm maven.api
org.codehaus.mojo:exec-maven-plugin:jar:1.2.1:
org.apache.maven:maven-toolchain:jar:1.0:compile
org.apache.maven:maven-project:jar:2.0.6:compile
org.apache.maven:maven-settings:jar:2.0.6:compile
org.apache.maven:maven-profile:jar:2.0.6:compile
org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
org.apache.maven:maven-model:jar:2.0.6:compile
org.apache.maven:maven-artifact:jar:2.0.6:compile
org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
org.apache.maven:maven-core:jar:2.0.6:compile
org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6:compile
org.apache.maven.reporting:maven-reporting-api:jar:2.0.6:compile
org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7:compile
org.apache.maven:maven-error-diagnostics:jar:2.0.6:compile
commons-cli:commons-cli:jar:1.0:compile
org.apache.maven:maven-plugin-descriptor:jar:2.0.6:compile
org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile
org.apache.maven:maven-monitor:jar:2.0.6:compile
classworlds:classworlds:jar:1.1:compile
org.apache.maven:maven-plugin-api:jar:2.0.6:compile
org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile
junit:junit:jar:3.8.2:test (scope managed from compile) (version managed from 3.8.1)
org.apache.commons:commons-exec:jar:1.1:compile
Created new class realm plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1
Importing foreign packages into class realm plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1
Imported: < maven.api
Populating class realm plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1
Included: org.codehaus.mojo:exec-maven-plugin:jar:1.2.1
Included: org.apache.maven.reporting:maven-reporting-api:jar:2.0.6
Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7
Included: commons-cli:commons-cli:jar:1.0
Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
Included: org.apache.commons:commons-exec:jar:1.1
Excluded: org.apache.maven:maven-toolchain:jar:1.0
Excluded: org.apache.maven:maven-project:jar:2.0.6
Excluded: org.apache.maven:maven-settings:jar:2.0.6
Excluded: org.apache.maven:maven-profile:jar:2.0.6
Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
Excluded: org.apache.maven:maven-model:jar:2.0.6
Excluded: org.apache.maven:maven-artifact:jar:2.0.6
Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
Excluded: org.apache.maven:maven-core:jar:2.0.6
Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6
Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.6
Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.6
Excluded: org.apache.maven:maven-monitor:jar:2.0.6
Excluded: classworlds:classworlds:jar:1.1
Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9
Excluded: junit:junit:jar:3.8.2
Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.2.1:exec from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1, parent: sun.misc.Launcher$AppClassLoader@1497b7b1]
Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.2.1:exec' with basic configurator -->
(f) basedir = C:\Projectos\GSPGSEMDD\faxTeste
(f) classpathScope = runtime
(f) commandlineArgs = -classpath %classpath pt.ano.faxteste.FaxTest
(f) executable = C:\Program Files\Java\jdk1.7.0_51\bin\java.exe
(f) longClasspath = false
(f) project = MavenProject: pt.ano:faxTeste:1.0-SNAPSHOT @ C:\Projectos\GSPGSEMDD\faxTeste\pom.xml
(f) session = org.apache.maven.execution.MavenSession@4e6cf5e8
(f) skip = false
-- end configuration --
Collected project artifacts [net.sf.fax4j:fax4j:jar:0.42.9:compile, javax.mail:mail:jar:1.4.7:compile, javax.activation:activation:jar:1.1:compile, commons-httpclient:commons-httpclient:jar:3.1:compile, commons-codec:commons-codec:jar:1.2:compile, commons-logging:commons-logging:jar:1.1.3:compile, org.json:json:jar:20090211:compile, net.sf.gnu-hylafax:gnu-hylafax-core:jar:1.0.3:compile, net.sf.gnu-hylafax:gnu-hylafax-inet-ftp:jar:1.0.3:compile, net.sf.gnu-hylafax:gnu-hylafax-utils:jar:1.0.3:compile, log4j:log4j:jar:1.2.14:compile, commons-cli:commons-cli:jar:1.0:compile, commons-lang:commons-lang:jar:1.0:compile, junit:junit:jar:3.7:compile, urbanophile:java-getopt:jar:1.0.9:compile, net.sf.gnu-hylafax:gnu-hylafax-pool:jar:1.0.3:compile, concurrent:concurrent:jar:1.3.4:compile, org.rxtx:rxtx:jar:2.1.7:compile]
Collected project classpath [C:\Projectos\GSPGSEMDD\faxTeste\target\classes]
dealing with net.sf.fax4j:fax4j:jar:0.42.9:compile
dealing with javax.mail:mail:jar:1.4.7:compile
dealing with javax.activation:activation:jar:1.1:compile
dealing with commons-httpclient:commons-httpclient:jar:3.1:compile
dealing with commons-codec:commons-codec:jar:1.2:compile
dealing with commons-logging:commons-logging:jar:1.1.3:compile
dealing with org.json:json:jar:20090211:compile
dealing with net.sf.gnu-hylafax:gnu-hylafax-core:jar:1.0.3:compile
dealing with net.sf.gnu-hylafax:gnu-hylafax-inet-ftp:jar:1.0.3:compile
dealing with net.sf.gnu-hylafax:gnu-hylafax-utils:jar:1.0.3:compile
dealing with log4j:log4j:jar:1.2.14:compile
dealing with commons-cli:commons-cli:jar:1.0:compile
dealing with commons-lang:commons-lang:jar:1.0:compile
dealing with junit:junit:jar:3.7:compile
dealing with urbanophile:java-getopt:jar:1.0.9:compile
dealing with net.sf.gnu-hylafax:gnu-hylafax-pool:jar:1.0.3:compile
dealing with concurrent:concurrent:jar:1.3.4:compile
dealing with org.rxtx:rxtx:jar:2.1.7:compile
Toolchains are ignored, 'executable' parameter is set to C:\Program Files\Java\jdk1.7.0_51\bin\java.exe
Executing command line: C:\Program Files\Java\jdk1.7.0_51\bin\java.exe -classpath C:\Projectos\GSPGSEMDD\faxTeste\target\classes;C:\Users\nuno_marinho\.m2\repository\net\sf\fax4j\fax4j\0.42.9\fax4j-0.42.9.jar;C:\Users\nuno_marinho\.m2\repository\javax\mail\mail\1.4.7\mail-1.4.7.jar;C:\Users\nuno_marinho\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\nuno_marinho\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\nuno_marinho\.m2\repository\commons-codec\commons-codec\1.2\commons-codec-1.2.jar;C:\Users\nuno_marinho\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\nuno_marinho\.m2\repository\org\json\json\20090211\json-20090211.jar;C:\Users\nuno_marinho\.m2\repository\net\sf\gnu-hylafax\gnu-hylafax-core\1.0.3\gnu-hylafax-core-1.0.3.jar;C:\Users\nuno_marinho\.m2\repository\net\sf\gnu-hylafax\gnu-hylafax-inet-ftp\1.0.3\gnu-hylafax-inet-ftp-1.0.3.jar;C:\Users\nuno_marinho\.m2\repository\net\sf\gnu-hylafax\gnu-hylafax-utils\1.0.3\gnu-hylafax-utils-1.0.3.jar;C:\Users\nuno_marinho\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar;C:\Users\nuno_marinho\.m2\repository\commons-cli\commons-cli\1.0\commons-cli-1.0.jar;C:\Users\nuno_marinho\.m2\repository\commons-lang\commons-lang\1.0\commons-lang-1.0.jar;C:\Users\nuno_marinho\.m2\repository\junit\junit\3.7\junit-3.7.jar;C:\Users\nuno_marinho\.m2\repository\urbanophile\java-getopt\1.0.9\java-getopt-1.0.9.jar;C:\Users\nuno_marinho\.m2\repository\net\sf\gnu-hylafax\gnu-hylafax-pool\1.0.3\gnu-hylafax-pool-1.0.3.jar;C:\Users\nuno_marinho\.m2\repository\concurrent\concurrent\1.3.4\concurrent-1.3.4.jar;C:\Users\nuno_marinho\.m2\repository\org\rxtx\rxtx\2.1.7\rxtx-2.1.7.jar pt.ano.faxteste.FaxTest
OK fax.txt.
READ file fax.txt:
Teste Nuno Marinho
Exception in thread "main" org.fax4j.FaxException: Error while invoking fax action process, exit code: -1073740940 process output:
[fax4j-native][DEBUG] Debug mode enabled.
[fax4j-native][DEBUG] Checking argument:
[fax4j-native][DEBUG] -action
[fax4j-native][DEBUG] Argument value:
[fax4j-native][DEBUG] submit
[fax4j-native][DEBUG] Checking argument:
[fax4j-native][DEBUG] -target_address
[fax4j-native][DEBUG] Argument value:
[fax4j-native][DEBUG] 132
[fax4j-native][DEBUG] Checking argument:
[fax4j-native][DEBUG] -target_name
[fax4j-native][DEBUG] Argument value:
[fax4j-native][DEBUG] ANO
[fax4j-native][DEBUG] Checking argument:
[fax4j-native][DEBUG] -sender_name
[fax4j-native][DEBUG] Argument value:
[fax4j-native][DEBUG] Nuno Marinho
[fax4j-native][DEBUG] Checking argument:
[fax4j-native][DEBUG] -file
[fax4j-native][DEBUG] Argument value:
[fax4j-native][DEBUG] C:\Projectos\GSPGSEMDD\faxTeste\target\classes\fax\fax.txt
[fax4j-native][DEBUG] Read input:
[fax4j-native][DEBUG] Action:
[fax4j-native][DEBUG] submit
[fax4j-native][DEBUG] Server:
[fax4j-native][DEBUG] (null)
[fax4j-native][DEBUG] Fax Job ID:
[fax4j-native][DEBUG] (null)
[fax4j-native][DEBUG] Target Address:
[fax4j-native][DEBUG] 132
[fax4j-native][DEBUG] Target Name:
[fax4j-native][DEBUG] ANO
[fax4j-native][DEBUG] Sender Name:
[fax4j-native][DEBUG] Nuno Marinho
[fax4j-native][DEBUG] File:
[fax4j-native][DEBUG] C:\Projectos\GSPGSEMDD\faxTeste\target\classes\fax\fax.txt
[fax4j-native][DEBUG] Handling specific fax action.
[fax4j-native][DEBUG] Invoking submitFaxJobNative
[fax4j-native][DEBUG] Connecting to fax server.
[fax4j-native][DEBUG] Initializing fax job parameters.
process error:
at org.fax4j.spi.process.ExitCodeProcessOutputValidator.validateProcessOutput(ExitCodeProcessOutputValidator.java:42)
at org.fax4j.spi.windows.WindowsProcessOutputValidator.validateProcessOutput(WindowsProcessOutputValidator.java:42)
at org.fax4j.spi.process.ProcessFaxClientSpi.validateProcessOutput(ProcessFaxClientSpi.java:566)
at org.fax4j.spi.process.ProcessFaxClientSpi.executeProcess(ProcessFaxClientSpi.java:492)
at org.fax4j.spi.process.ProcessFaxClientSpi.submitFaxJobImpl(ProcessFaxClientSpi.java:351)
at org.fax4j.spi.AbstractFaxClientSpi.submitFaxJob(AbstractFaxClientSpi.java:308)
at org.fax4j.spi.adapter.AbstractAdapterFaxClientSpi.submitFaxJobImpl(AbstractAdapterFaxClientSpi.java:94)
at org.fax4j.spi.AbstractFaxClientSpi.submitFaxJob(AbstractFaxClientSpi.java:308)
at org.fax4j.spi.adapter.AbstractAdapterFaxClientSpi.submitFaxJobImpl(AbstractAdapterFaxClientSpi.java:94)
at org.fax4j.spi.AbstractFaxClientSpi.submitFaxJob(AbstractFaxClientSpi.java:308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.fax4j.spi.AbstractFaxClientSpiProxy.invoke(AbstractFaxClientSpiProxy.java:203)
at com.sun.proxy.$Proxy0.submitFaxJob(Unknown Source)
at org.fax4j.FaxClient.submitFaxJob(FaxClient.java:214)
at pt.ano.faxteste.FaxTest.main(FaxTest.java:57)
Picked up _JAVA_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 18.282s
Finished at: Thu Apr 23 10:55:01 BST 2015
Final Memory: 5M/122M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project faxTeste: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project faxTeste: Command execution failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
... 21 more
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Picked up _JAVA_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
Upvotes: 2
Views: 541
Reputation: 116
your code is fine. I know because i created a maven project with your code in my PC with windows 7 and all works fine :D
Upvotes: 2