I have a new project, and I want to run Wildfly from Maven.
Command: mvn wildfly:run
What I excpect to happen, is that maven will pack my project to a WAR file, start Wildfly, and then deploy it.
The problem is that it works the first time I run it. It is downloading Wildfly, building and deploying the POM file. If I stop Wildfly, and start it again with the same command, I get a FileNotFoundException and Access is denied message (se below). The strange thing is that I copied this small project over from another computer, where it works all the time. I also tried to make a new project, but still getting the same error.
Exception:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 53.197 s [INFO] Finished at: 2016-05-02T16:23:11+02:00 [INFO] Final Memory: 19M/212M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Alpha7:run (default-cli) on project new-test: The server failed to start: Deployment failed: Operation failed: {"WFLYCTL0062: Composite operation faile d and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./pg" => "org.jboss.msc.service.StartException in service jboss.undert ow.deployment.default-server.default-host./pg: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.File NotFoundException: D:\Skole\New folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access is denied) [ERROR] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: D:\Skole \New folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access is denied) [ERROR] Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: D:\Skole\New folder\target\wildfl y-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access is denied) [ERROR] Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: D:\Skole\New folder\target\wildfly-run\wildfly-10.0.0.Final\ \standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access is denied) [ERROR] Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: D:\Skole\New folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afb ab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access is denied) [ERROR] Caused by: javax.faces.FacesException: java.io.FileNotFoundException: D:\Skole\New folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-3 0131585882030325.tmp (Access is denied) [ERROR] Caused by: java.io.FileNotFoundException: D:\Skole\New folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access is denied)"}}}} [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
POM file:
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<groupId>new.test</groupId>
<artifactId>new-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>1.0.3.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>4.1.1</version>
<scope>test</scope>
</dependency>
<!-- JEE for WildFly -->
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>pg</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha7</version>
<configuration>
<add-user>
<users>
<user>
<username>admin</username>
<password>admin</password>
</user>
</users>
</add-user>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Anyone have any ideas? I'm running Windows 10 on both computers.