I've created a simple Web app from jersey archetype in Eclipse and followed the tutorial given here, but the command mvn -e heroku:deploy-war throws the following errors
$ mvn -e heroku:deploy-war
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building wallpost 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> heroku-maven-plugin:1.1.1:deploy-war (default-cli) > package # wallpost >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # wallpost ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # wallpost ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # wallpost ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Workspace For Java\wallpost\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # wallpost ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # wallpost ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # wallpost ---
[INFO] Packaging webapp
[INFO] Assembling webapp [wallpost] in [D:\Workspace For Java\wallpost\target\wallpost]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\Workspace For Java\wallpost\src\main\webapp]
[INFO] Webapp assembled in [187 msecs]
[INFO] Building war: D:\Workspace For Java\wallpost\target\wallpost.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] --- maven-dependency-plugin:2.3:copy-dependencies (copy-dependencies) # wallpost ---
[INFO] hk2-api-2.5.0-b05.jar already exists in destination.
[INFO] jersey-guava-2.23.2.jar already exists in destination.
[INFO] hk2-utils-2.5.0-b05.jar already exists in destination.
[INFO] javassist-3.20.0-GA.jar already exists in destination.
[INFO] osgi-resource-locator-1.0.1.jar already exists in destination.
[INFO] jersey-server-2.23.2.jar already exists in destination.
[INFO] jersey-client-2.23.2.jar already exists in destination.
[INFO] javax.ws.rs-api-2.0.1.jar already exists in destination.
[INFO] hk2-locator-2.5.0-b05.jar already exists in destination.
[INFO] jersey-container-servlet-core-2.23.2.jar already exists in destination.
[INFO] jersey-common-2.23.2.jar already exists in destination.
[INFO] validation-api-1.1.0.Final.jar already exists in destination.
[INFO] aopalliance-repackaged-2.5.0-b05.jar already exists in destination.
[INFO] jersey-media-jaxb-2.23.2.jar already exists in destination.
[INFO] javax.inject-2.5.0-b05.jar already exists in destination.
[INFO] javax.annotation-api-1.2.jar already exists in destination.
[INFO]
[INFO] --- maven-dependency-plugin:2.3:copy (default) # wallpost ---
[INFO] Configured Artifact: com.github.jsimone:webapp-runner:8.0.30.2:jar
[INFO] com.github.jsimone:webapp-runner:8.0.30.2:jar already exists in D:\Workspace For Java\wallpost\target\dependency
[INFO]
[INFO] <<< heroku-maven-plugin:1.1.1:deploy-war (default-cli) < package # wallpost <<<
[INFO]
[INFO] --- heroku-maven-plugin:1.1.1:deploy-war (default-cli) # wallpost ---
[INFO] Configured Artifact: com.github.jsimone:webapp-runner:8.0.30.2:jar
[INFO] com.github.jsimone:webapp-runner:8.0.30.2:jar already exists in D:\Workspace For Java\wallpost\target\dependency
[INFO] -----> Packaging application...
[INFO] - app: immense-beach-86309t
[INFO] - including: target/dependency/webapp-runner.jar
[INFO] - including: target/wallpost.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.865 s
[INFO] Finished at: 2016-10-17T02:43:01+05:30
[INFO] Final Memory: 26M/225M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.heroku.sdk:heroku-maven-plugin:1.1.1:deploy-war (default-cli) on project wallpost: Failed to deploy application: Not Found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.heroku.sdk:heroku-maven-plugin:1.1.1:deploy-war (default-cli) on project wallpost: Failed to deploy application
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to deploy application
at com.heroku.sdk.maven.DeployWarMojo.execute(DeployWarMojo.java:26)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.http.client.HttpResponseException: Not Found
at com.heroku.sdk.deploy.utils.RestClient.handleResponse(RestClient.java:172)
at com.heroku.sdk.deploy.utils.RestClient.get(RestClient.java:66)
at com.heroku.sdk.deploy.ConfigVars.getConfigVars(ConfigVars.java:41)
at com.heroku.sdk.deploy.ConfigVars.merge(ConfigVars.java:24)
at com.heroku.sdk.deploy.Deployer.mergeConfigVars(Deployer.java:106)
at com.heroku.sdk.deploy.Deployer.deploy(Deployer.java:68)
at com.heroku.sdk.deploy.App.deploy(App.java:57)
at com.heroku.sdk.deploy.App.deploy(App.java:61)
at com.heroku.sdk.deploy.WarApp.deploy(WarApp.java:30)
at com.heroku.sdk.maven.DeployWarMojo.execute(DeployWarMojo.java:22)
... 22 more
[ERROR]
[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/MojoFailureException
I have also tried the suggestions mentioned here, here, here and here, but they were of no use. I made sure the app name on Heroku matched the <appName></appName> in pom.xml, but that too didn't solve the problem.
Following is my pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.auro.assignment</groupId>
<artifactId>wallpost</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>wallpost</name>
<build>
<finalName>wallpost</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
</execution>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.github.jsimone</groupId>
<artifactId>webapp-runner</artifactId>
<version>8.0.30.2</version>
<destFileName>webapp-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<configuration>
<jdkVersion>1.8</jdkVersion>
<appName>immense-beach-86309t</appName>
</configuration>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>1.1.1</version>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
<!-- artifactId>jersey-container-servlet</artifactId -->
</dependency>
<!-- uncomment this to get JSON support
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
</dependency>
-->
</dependencies>
<properties>
<jersey.version>2.23.2</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Below is the Procfile
web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war
I suspect that your app name is supposed to be "immense-beach-86309" but you have "immense-beach-86309t" (note the trailing "t") in your pom.xml entry for <appName>.
The error message should be better, and I've opened an issue on the heroku-maven-plugin project, which is open source.
Related
I have created a test for my aspectj class.
When I execute my test it works fine to "Run as TestNG" from Eclipse.
Then when I execute it in maven:
mvn clean test
I get the following error:
[15:15] [eraonel/git/java-runtime-stats] -> mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building java-runtime-stats 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # java-runtime-stats ---
[INFO] Deleting /repo/eraonel/git/java-runtime-stats/target
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (default) # java-runtime-stats ---
[INFO] Executing tasks
main:
[echo] BUILDING : /repo/eraonel/git/java-runtime-stats/src/main/java/com/company/commonlibrary/javaruntimestats/Version.java
[echo] BUILD 2018-10-24 13:18 UTC : /repo/eraonel/git/java-runtime-stats/src/main/java/com/company/commonlibrary/javaruntimestats/Version.java
[INFO] Executed tasks
[INFO]
[INFO] --- maven-java-formatter-plugin:0.6.1-threadsafe:format (default) # java-runtime-stats ---
[INFO] Using 'UTF-8' encoding to format source files.
[INFO] Number of files to be formatted: 21
[INFO] Successfully formatted: 1 file(s)
[INFO] Fail to format : 0 file(s)
[INFO] Skipped : 20 file(s)
[INFO] Approximate time taken: 0s
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # java-runtime-stats ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /repo/eraonel/git/java-runtime-stats/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) # java-runtime-stats ---
[INFO] Compiling 15 source files to /repo/eraonel/git/java-runtime-stats/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # java-runtime-stats ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 11 resources
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) # java-runtime-stats ---
[INFO] Compiling 6 source files to /repo/eraonel/git/java-runtime-stats/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /repo/eraonel/git/java-runtime-stats/src/test/java/com/company/commonlibrary/javaruntimestats/aspects/DeprecatedMethodsAspectTest.java:[17,13] cannot find symbol
symbol: class DeprecatedMethodsAspect
location: class com.company.commonlibrary.javaruntimestats.aspects.DeprecatedMethodsAspectTest
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.127 s
[INFO] Finished at: 2018-10-24T15:18:08+02:00
[INFO] Final Memory: 33M/730M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project java-runtime-stats: Compilation failure
[ERROR] /repo/eraonel/git/java-runtime-stats/src/test/java/com/company/commonlibrary/javaruntimestats/aspects/DeprecatedMethodsAspectTest.java:[17,13] cannot find symbol
[ERROR] symbol: class DeprecatedMethodsAspect
[ERROR] location: class com.company.commonlibrary.javaruntimestats.aspects.DeprecatedMethodsAspectTest
[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/MojoFailureException
What am I missing here?
Why is the aspectj not compiled before the test case?
Is there a way to change this?
I used this example ( for the library part) to follow since I am creating a lib that should be used for other applications:
AspectJ: How to weave an aspect library into a Java project
TestClass:
/**
* Unit test to see if pointcut works as expected in ${#link DeprecatedMethodsAspect}
*/
public class DeprecatedMethodsAspectTest {
private DeprecatedMethodsAspect aspect;
private DeprecatedMethods deprecatedMethodsMock;
private DeprecatedMethodsApp app;
#BeforeClass
public void setUp() throws Exception {
app = new DeprecatedMethodsApp();
deprecatedMethodsMock = mock(DeprecatedMethods.class);
when(deprecatedMethodsMock.isActive()).thenReturn(true);
aspect = Aspects.aspectOf(DeprecatedMethodsAspect.class);
aspect.setDeprecatedMethods(deprecatedMethodsMock);
}
#Test
public void testSumIsMatched() throws Throwable {
app.sum(1, 2);
verify(deprecatedMethodsMock, times(1)).collect(any(JoinPoint.class));
}
#Test(description = " we should not gather information from methods annotated #Beta.")
public void testSubIsNotMatched() throws Throwable {
app.sub(2, 1);
verify(deprecatedMethodsMock, times(0)).collect(any(JoinPoint.class));
}
}
This is excerpt from my pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Compile scope dependencies -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<!-- IMPORTANT -->
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${java.version}</version>
<configuration>
<showWeaveInfo>true</showWeaveInfo>
<source>${java.version}</source>
<target>${java.version}</target>
<Xlint>ignore</Xlint>
<complianceLevel>${java.version}</complianceLevel>
<encoding>${project.build.sourceEncoding}</encoding>
<!--<verbose>true</verbose> -->
<!--<warn>constructorName,packageDefaultMethod,deprecation,maskedCatchBlocks,unusedLocals,unusedArguments,unusedImport</warn> -->
</configuration>
<executions>
<execution>
<!-- IMPORTANT -->
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
You've included the aspectj-maven-plugin in <pluginManagement/> but you haven't included it in <plugins>
Try adding:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
</plugin>
</plugins>
under the <build/> element.
See also: Maven: What is pluginManagement?
I am working on an end-to-end project which includes backend and frontend. The frontend works fine (angular2 framework, the 'npm start' and 'ng build' works). However, when I run 'mvn clean install' from the project home folder, it gives me an error where I have no clue:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar (default-jar) on project frontend: Error assembling JAR: Failed to determine inclusion status for: .\frontend\pom.xml: The request is not supported. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: ...
Under the project home folder, I can run 'mvn compile' successfully, but not 'mvn clean install'. It shows frontend Failure with the error message above, backend Skip.
The maven settings.xml is the original one. I have correct setting of Java Home.
Can you help me?
POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xlinq.gtool</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>parent</name>
<description>Demo project for X-LinQ Graphical Tool</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<modules>
<module>frontend</module>
<module>backend</module>
</modules>
</project>
fronted POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>frontend</artifactId>
<name>frontend</name>
<description>The X-LinQ frontend project</description>
<parent>
<groupId>com.xlinq.gtool</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<nodeVersion>v6.10.3</nodeVersion>
<npmVersion>3.10.10</npmVersion>
<workingDirectory>src/main/frontend</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>target/frontend</directory>
<targetPath>static</targetPath>
</resource>
</resources>
</build>
</project>
Response:
> mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent
[INFO] frontend
[INFO] backend
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # parent ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # parent ---
[INFO] Installing H:\project\pom.xml to C:\Users\x\.m2\repository\com\xlinq\gtool\parent\0.0.1-SNAPSHOT\parent-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building frontend 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # frontend ---
[INFO] Deleting H:\project\frontend\target
[INFO]
[INFO] --- frontend-maven-plugin:1.3:install-node-and-npm (install node and npm) # frontend ---
[INFO] Node v6.10.3 is already installed.
[INFO] NPM 3.10.10 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.3:npm (npm install) # frontend ---
[INFO] Running 'npm install' in H:\project\frontend\src\main\frontend
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
[INFO]
[INFO] --- frontend-maven-plugin:1.3:npm (npm run build) # frontend ---
[INFO] Running 'npm run build' in H:\project\frontend\src\main\frontend
[INFO]
[INFO] > gtool#0.0.0 build H:\project\frontend\src\main\frontend
[INFO] > ng build
[INFO]
[INFO] Hash: 46436a79c4d4bc172d29
[INFO] Time: 52660ms
[INFO] chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 177 kB {5} [initial] [rendered]
[INFO] chunk {1} main.bundle.js, main.bundle.js.map (main) 104 kB {4} [initial] [rendered]
[INFO] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 270 kB {5} [initial] [rendered]
[INFO] chunk {3} scripts.bundle.js, scripts.bundle.js.map (scripts) 733 kB {5} [initial] [rendered]
[INFO] chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 6.01 MB [initial] [rendered]
[INFO] chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
[ERROR]
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # frontend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 36 resources to static
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # frontend ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # frontend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory H:\project\frontend\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # frontend ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # frontend ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) # frontend ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................. SUCCESS [ 0.350 s]
[INFO] frontend ........................................... FAILURE [03:06 min]
[INFO] backend ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:07 min
[INFO] Finished at: 2017-08-16T15:27:21+02:00
[INFO] Final Memory: 21M/357M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar (default-jar) on project frontend: Error assembling JAR: Failed to determine inclusion status for: H:\project\frontend\pom.xml: H:\project\frontend\pom.xml: The request is not supported. -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :frontend
I solved this problem. Nothing wrong with the POM and Maven settings.xml. The problem is that the project was mounted in a network location. After moving it to a local hard disk drive, the mvn clean install works.
Sadly a mounted WSL drive is considered a network mount as well as that is where I'm seeing it.
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar
and
Error assembling JAR: Failed to determine inclusion status for
were messages that I am seeing. This was not a problem with previous versions of the maven-jar-plugin (2.5)
When I am trying to run a Maven with JUnit test in an eclipse project I've got this ERROR below:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building exemplo-maven 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # exemplo-maven ---
[INFO] Deleting C:\Users\vcamargo\workspace\exemplo-maven\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # exemplo-maven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # exemplo-maven ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\vcamargo\workspace\exemplo-maven\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # exemplo-maven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # exemplo-maven ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\vcamargo\workspace\exemplo-maven\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # exemplo-maven ---
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.12.4/maven-surefire-common-2.12.4.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.470 s
[INFO] Finished at: 2017-02-27T10:08:30-03:00
[INFO] Final Memory: 19M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project exemplo-maven: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): RSA premaster secret error: SunTls12RsaPremasterSecret KeyGenerator not available -> [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/PluginResolutionException
Following my pom.xml below:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.algaworks.curso</groupId>
<artifactId>exemplo-maven</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<killAfter>-1</killAfter>
<mainClass>com.algaworks.curso.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
My main class:
package com.algaworks.curso;
public class Main {
public static void main(String[] args) {
System.out.println("Hello Maven");
}
}
And finally my test class:
package com.algaworks.curso;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class FibonacciTest {
#Test
public void deve_retornar_fibonacci_posicao_1() {
assertEquals(1L, 1L);
}
}
When I run my test class individually it runs perfect. And if I try to run a Maven project without test (goal: exec:java) it runs perfect too.
The error occur just when I try to run the Maven project with the JUnit test (goal: clean project).
Error says dependencies which are directly or indirectly used by surefire plug-in can not be resolved. i never had this error but, delete your maven-surefire-plugin folder from location : ".m2\repository\org\apache\maven\plugins"
and re-run the build which will automatically re-download all the plugin files.
make sure to have aback up of the folder before deleting so that you can analyse what were missing.
From the logs you've posted it seems like issue is not with your JUnit test cases, but with your maven not able to download few artifacts..In the repo I could see a maven surefire booter jar of required version..I guess there is some issue with network firewalls or connectivity...can we try reconnecting to network and then running a goal ?
everyone. I'm trying to sign an Android APK with Maven Jarsigner. I followed the instructions on the maven-jarsigner site and told it to use my own keystore and verify. It doesn't look like the jarsigner plugin is even running from my pom.xml, much less verifying. I'm using Codenvy as my environment right now, so Maven console commands are unavailable to me. Any help would be appreciated. Here's my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kealinghornets.mapsapplication</groupId>
<artifactId>mobile-android-java-basic</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>MapsApp</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version>4.1.1.4</platform.version>
<android.plugin.version>3.8.0</android.plugin.version>
<android.sdk.platform.version>20</android.sdk.platform.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>com.jdroidframework</groupId>
<artifactId>google-play-services</artifactId>
<type>apklib</type>
<version>LATEST</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>java</sourceDirectory>
<finalName>${project.artifactId}</finalName>
<defaultGoal>install</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>sign</id>
<goals>
<goal>sign</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>${project.basedir}/mapsapp.keystore</keystore>
<storepass>maps_app</storepass>
<keypass>maps_app</keypass>
<alias>maps_app</alias>
<verbose>true</verbose>
<certs>true</certs>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<sign>
<debug>false</debug>
</sign>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>${android.sdk.platform.version}</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
</project>
Here's my Maven output from the build:
[INFO] Injecting source code into builder...
[INFO] Source code injection finished
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MapsApp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # mobile-android-java-basic ---
[INFO]
[INFO] --- android-maven-plugin:3.8.0:generate-sources (default-generate-sources) # mobile-android-java-basic ---
[DEBUG] Expanding: /home/codenvy/.m2/repository/com/jdroidframework/google-play-services/0.6.0/google-play-services-0.6.0.apklib into /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/unpack/apklibs/com.jdroidframework_google-play-services_apklib_0.6.0
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] /usr/local/android-sdk-linux/build-tools/21.1.1/aapt [package, -m, -J, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/generated-sources/r, -M, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/AndroidManifest.xml, -S, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/res, -S, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/unpack/apklibs/com.jdroidframework_google-play-services_apklib_0.6.0/res, --auto-add-overlay, -I, /usr/local/android-sdk-linux/platforms/android-20/android.jar]
[INFO] /usr/local/android-sdk-linux/build-tools/21.1.1/aapt [package, --non-constant-id, -m, -J, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/generated-sources/r, --custom-package, com.google.android.gms, -M, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/AndroidManifest.xml, -S, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/res, -S, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/unpack/apklibs/com.jdroidframework_google-play-services_apklib_0.6.0/res, --auto-add-overlay, -I, /usr/local/android-sdk-linux/platforms/android-20/android.jar]
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # mobile-android-java-basic ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/src/main/resources
[INFO] skip non existing resourceDirectory /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/generated-sources/extracted-dependencies/src/main/resources
[INFO] skip non existing resourceDirectory /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/unpack/apklibs/com.jdroidframework_google-play-services_apklib_0.6.0/src
[INFO]
[INFO] --- android-maven-plugin:3.8.0:consume-aar (default-consume-aar) # mobile-android-java-basic ---
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) # mobile-android-java-basic ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/classes
[INFO]
[INFO] --- android-maven-plugin:3.8.0:proguard (default-proguard) # mobile-android-java-basic ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) # mobile-android-java-basic ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) # mobile-android-java-basic ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # mobile-android-java-basic ---
[INFO] No tests to run.
[INFO]
[INFO] --- android-maven-plugin:3.8.0:emma (default-emma) # mobile-android-java-basic ---
[INFO]
[INFO] --- android-maven-plugin:3.8.0:dex (default-dex) # mobile-android-java-basic ---
[INFO] /usr/local/jdk1.7.0_71/jre/bin/java [-Xmx1024M, -jar, /usr/local/android-sdk-linux/build-tools/21.1.1/lib/dx.jar, --dex, --output=/media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/classes.dex, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/classes, /home/codenvy/.m2/repository/com/jdroidframework/google-play-services/0.6.0/google-play-services-0.6.0.apklib, /home/codenvy/.m2/repository/android/google-play-services/r21/google-play-services-r21.jar, /home/codenvy/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar]
[INFO]
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) # mobile-android-java-basic ---
[INFO] Building jar: /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/mobile-android-java-basic.jar
[INFO]
[INFO] --- android-maven-plugin:3.8.0:apk (default-apk) # mobile-android-java-basic ---
[INFO] Enabling debug build for apk.
[INFO] /usr/local/android-sdk-linux/build-tools/21.1.1/aapt [package, -f, -M, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/AndroidManifest.xml, -S, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/res, -S, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/unpack/apklibs/com.jdroidframework_google-play-services_apklib_0.6.0/res, --auto-add-overlay, -I, /usr/local/android-sdk-linux/platforms/android-20/android.jar, -F, /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/mobile-android-java-basic.ap_, --debug-mode]
[INFO]
[INFO] --- android-maven-plugin:3.8.0:internal-pre-integration-test (default-internal-pre-integration-test) # mobile-android-java-basic ---
[INFO] No InstrumentationRunner found - skipping tests
[INFO]
[INFO] --- android-maven-plugin:3.8.0:internal-integration-test (default-internal-integration-test) # mobile-android-java-basic ---
[INFO] No InstrumentationRunner found - skipping tests
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # mobile-android-java-basic ---
[INFO] Installing /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/mobile-android-java-basic.apk to /home/codenvy/.m2/repository/org/kealinghornets/mapsapplication/mobile-android-java-basic/1.0-SNAPSHOT/mobile-android-java-basic-1.0-SNAPSHOT.apk
[INFO] Installing /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/pom.xml to /home/codenvy/.m2/repository/org/kealinghornets/mapsapplication/mobile-android-java-basic/1.0-SNAPSHOT/mobile-android-java-basic-1.0-SNAPSHOT.pom
[INFO] Installing /media/ephemeral1/builder/maven/builds/build-4794906119007517519/androidmaps/target/mobile-android-java-basic.jar to /home/codenvy/.m2/repository/org/kealinghornets/mapsapplication/mobile-android-java-basic/1.0-SNAPSHOT/mobile-android-java-basic-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.161s
[INFO] Finished at: Thu Feb 26 19:57:09 UTC 2015
[INFO] Final Memory: 22M/398M
[INFO] ------------------------------------------------------------------------
[INFO] Project androidmaps successfully build
The maven-jarsigner-plugin is declared inside pluginManagement section, so it will not be executed. pluginManagement is only supposed to be used to factor configuration on a plugin for different Maven modules.
Note that the android-maven-plugin is in fact executed because it it also declared inside the plugins section, so it inherits from the declaration made in pluginManagement.
You should move the maven-jarsigner-plugin code into the plugins section.
I trying to run weblocig server with maven (wls-maven-plugin). But, i recieve NullPointerException:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web_application Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- wls-maven-plugin:12.1.2.0:start-server (default-cli) # web_application ---
[INFO] ++====================================================================++
[INFO] ++ wls-maven-plugin: start-server ++
[INFO] ++====================================================================++
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.236 s
[INFO] Finished at: 2015-02-25T10:42:19+02:00
[INFO] Final Memory: 7M/103M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.2.0:start-server (default-cli) on project web_application: Error starting server: NullPointerException -> [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/MojoFailureException
Process finished with exit code 1
My pom.xml:
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Lab3.web_application</groupId>
<artifactId>web_application</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>web_application Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>web_application</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-site</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>wls-maven-plugin</artifactId>
<version>12.1.2.0</version>
<configuration>
<middlewareHome>c:/Oracle/Middleware/Oracle_Home</middlewareHome>
<adminurl>http://localhost:7001</adminurl>
<domainHome>c:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain</domainHome>
<user>weblogic</user>
<password>password123</password>
<upload>true</upload>
<remote>false</remote>
<verbose>true</verbose>
<source>./target/web_application.war</source>
<name>${project.build.finalName}</name>
<noexit>true</noexit>
</configuration>
<executions>
<execution>
<id>wls-start-domain</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
</execution>
<!--<execution>
<phase>post-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>-->
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>localSnapshot</id>
<name>local snapshot repository</name>
<url>file:///c:/Users/Admin/.m2/repository</url>
</snapshotRepository>
</distributionManagement>
</project>
running with -e flag:
"C:\Program Files\Java\jdk1.7.0_75\bin\java" "-Dmaven.home=C:\Program Files\Apache Software Foundation\apache-maven-3.2.5" "-Dclassworlds.conf=C:\Program Files\Apache Software Foundation\apache-maven-3.2.5\bin\m2.conf" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Apache Software Foundation\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.0.3 deploy -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web_application Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # web_application ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # web_application ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # web_application ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Dropbox\NetCracker\Lab3\web_application\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # web_application ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # web_application ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # web_application ---
[INFO] Packaging webapp
[INFO] Assembling webapp [web_application] in [D:\Dropbox\NetCracker\Lab3\web_application\target\web_application]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\Dropbox\NetCracker\Lab3\web_application\src\main\webapp]
[INFO] Webapp assembled in [78 msecs]
[INFO] Building war: D:\Dropbox\NetCracker\Lab3\web_application\target\web_application.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] --- wls-maven-plugin:12.1.2.0:start-server (wls-start-domain) # web_application ---
[INFO] ++====================================================================++
[INFO] ++ wls-maven-plugin: start-server ++
[INFO] ++====================================================================++
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.155 s
[INFO] Finished at: 2015-02-25T22:14:52+02:00
[INFO] Final Memory: 12M/103M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.2.0:start-server (wls-start-domain) on project web_application: Error starting server: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.2.0:start-server (wls-start-domain) on project web_application: Error starting server
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.maven.plugin.MojoFailureException: Error starting server
at weblogic.tools.maven.plugins.control.StartServerMojo.execute(StartServerMojo.java:112)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 25 more
Caused by: java.lang.NullPointerException
at weblogic.tools.maven.plugins.configure.RunScriptMojo.transformString(RunScriptMojo.java:186)
at weblogic.tools.maven.plugins.control.StartServerMojo.defaultArgs(StartServerMojo.java:127)
at weblogic.tools.maven.plugins.control.StartServerMojo.execute(StartServerMojo.java:57)
... 27 more
[ERROR]
[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/MojoFailureException
Process finished with exit code 1
I run it in Intellij IDEA > execute maven goal > wls:start-server.
P.S. Running manualy by call: c:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\startWebLogic.cmd was sucessful.