Maven with Cargo and Installed Glassfish - maven

I have been having trouble getting this my maven project to work. I will show below my pom file and my error log. I am trying to run integration tests of my code on glassfish after it is deployed. Any help will be much appreciated. If there is a better solution to do that, that would also be appreciated.
pom.xml cargo portion:
<!-- cargo plugin -->
<dependency>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-core-uberjar</artifactId>
<version>1.4.3</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- cargo plugin -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.3</version>
<configuration>
<container>
<containerId>glassfish4x</containerId>
<type>installed</type>
</container>
<configuration>
<type>existing</type>
<home>C:\glassFishV4\glassfish4\glassfish\domains</home>
<properties>
<cargo.hostname>localhost</cargo.hostname>
<cargo.servlet.port>4848</cargo.servlet.port>
<!-- if no username/password don't use these, it will fail -->
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.passwordFile>C:\glassfish\glassfish4\glassfish\domains\domain1\config\admin-keyfile</cargo.remote.passwordFile>
<cargo.glassfish.domain.name>domain1</cargo.glassfish.domain.name>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>com.project</groupId>
<artifactId>projectID</artifactId>
<location>${project.build.directory}/${project.build.finalName}.war</location>
<type>war</type>
</deployable>
</deployables>
</configuration>
</plugin>
Error Log:
C:\Users\kev\projectID\com.project.projectID-1.0>mvn -e cargo:start
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building projectID 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cargo-maven2-plugin:1.4.3:start (default-cli) # projectID ---
[INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:car
go-core-container-glassfish:jar:1.4.3 for container glassfish4x
[INFO] [talledLocalContainer] GlassFish 4.x starting...
[INFO] [talledLocalContainer] Attempting to start domain1.... Please look at the
server log for more details.....
[INFO] [talledLocalContainer] Authentication failed for user: admin
[INFO] [talledLocalContainer] with password from password file: C:/glassFishV4/g
lassfish4/glassfish/domains/password.properties
[INFO] [talledLocalContainer] (Usually, this means invalid user name and/or pass
word)
[INFO] [talledLocalContainer] Command deploy failed.
[INFO] [talledLocalContainer] GlassFish 4.x is stopping...
[INFO] [talledLocalContainer] Waiting for the domain to stop .
[INFO] [talledLocalContainer] Command stop-domain executed successfully.
[INFO] [talledLocalContainer] GlassFish 4.x is stopped
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.139s
[INFO] Finished at: Fri Aug 16 16:19:33 EDT 2013
[INFO] Final Memory: 12M/304M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:star
t (default-cli) on project projectID: Execution default-cli of goal org.codehaus.c
argo:cargo-maven2-plugin:1.4.3:start failed: Failed to start the GlassFish 4.x c
ontainer. At least one GlassFish deployment has failed: org.codehaus.cargo.util.
CargoException: GlassFish admin command failed: asadmin exited 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.cargo:cargo-maven2-plugin:1.4.3:start (default-cli) on project projectID
: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:s
tart failed: Failed to start the GlassFish 4.x container.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:224)
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.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
357)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-c
li of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:start failed: Failed to
start the GlassFish 4.x container.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
... 19 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to start the
GlassFish 4.x container.
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(Abstrac
tLocalContainer.java:230)
at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAct
ion(ContainerStartMojo.java:96)
at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStart
Mojo.java:63)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo
.java:432)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:106)
... 20 more
Caused by: org.codehaus.cargo.util.CargoException: At least one GlassFish deploy
ment has failed: org.codehaus.cargo.util.CargoException: GlassFish admin command
failed: asadmin exited 1
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst
alledLocalContainer.doStart(AbstractGlassFishInstalledLocalContainer.java:193)
at org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer.star
tInternal(AbstractInstalledLocalContainer.java:313)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(Abstrac
tLocalContainer.java:211)
... 24 more
Caused by: org.codehaus.cargo.util.CargoException: GlassFish admin command faile
d: asadmin exited 1
at org.codehaus.cargo.container.glassfish.internal.GlassFish3xAsAdmin.in
vokeAsAdmin(GlassFish3xAsAdmin.java:88)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst
alledLocalContainer.invokeAsAdmin(AbstractGlassFishInstalledLocalContainer.java:
96)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst
alledLocalContainer.invokeAsAdmin(AbstractGlassFishInstalledLocalContainer.java:
69)
at org.codehaus.cargo.container.glassfish.GlassFish3xInstalledLocalDeplo
yer.doDeploy(GlassFish3xInstalledLocalDeployer.java:89)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst
alledLocalDeployer.redeploy(AbstractGlassFishInstalledLocalDeployer.java:97)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst
alledLocalContainer.doStart(AbstractGlassFishInstalledLocalContainer.java:174)
... 26 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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
nException
The weird thing is, is that I can see it start the glassfish server through eclipse and then stop it. I also tried with no password and user name for defaults because that's what they are, and as you see in this configuration I use a username and password file as described on the cargo site. I receive the same error both times.

Just grab your editor, open C:/glassFishV4/g
lassfish4/glassfish/domains/password.properties
Change:
AS_ADMIN_PASSWORD=adminadmin
To:
AS_ADMIN_PASSWORD=

Related

Liquibase Maven Plugin Error: Provider liquibase.serializer.core.xml.XMLChangeLogSerializer could not be instantiated

I am having trouble getting my changelog to be compiled, due to Liquibase not being able to load the correct Serializer. Anyone know what the issue could be? Here is my config:
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<configuration>
<changeLogFile>${project.basedir}/src/main/resources/config/liquibase/master.xml</changeLogFile>
<diffChangeLogFile>${project.basedir}/src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<driver>org.h2.Driver</driver>
<url>jdbc:h2:file:${project.build.directory}/h2db/db/my_project</url>
<defaultSchemaName></defaultSchemaName>
<username>my_project</username>
<password></password>
<referenceUrl>hibernate:spring:com.my.comp?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
<contexts>!test</contexts>
<diffExcludeObjects>oauth_access_token, oauth_approvals, oauth_client_details, oauth_client_token, oauth_code, oauth_refresh_token</diffExcludeObjects>
</configuration>
Error Message:
[INFO] Cannot load service: liquibase.serializer.ChangeLogSerializer:
Provider liquibase.serializer.core.xml.XMLChangeLogSerializer could
not be instantiated [INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 16.947 s [INFO] Finished at:
2021-09-25T11:57:46+02:00 [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal
org.liquibase:liquibase-maven-plugin:4.3.5:diff (default-cli) on
project notionmeet: [ERROR] Error setting up or running Liquibase:
[ERROR] liquibase.command.CommandExecutionException:
java.lang.RuntimeException: No serializers associated with the
filename or extension
'/home/projects/project/src/main/resources/config/liquibase/changelog/20210925095729_changelog.xml'

How to release Xtext 2.13 project to Maven Central

I have created an Xtext Language and I want to release it to Maven central. I have already prepared the release with:
mvn release:prepare
My first try to release with
mvn release:perform
failed due to the strict Javadoc checking (Xtext generates some tags that are not understood by the javadoc plugin). So I added this to my pluginManagement section, to silence the errors and convert them into warnings:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
However, this fails with
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.0.0:p2-metadata (attach-p2-metadata) on project com.hribol.bromium.dsl: Execution attach-p2-metadata of goal org.eclipse.tycho:tycho-p2-plugin:1.0.0:p2-metadata failed.
What could be the reason for this error? It happens immediately after the warnings for the Javadoc, if that matters.
EDIT: After I manually executed the steps from the Maven log, I got the full stack trace:
[INFO] [ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-
plugin:1.1.0-SNAPSHOT:p2-metadata (attach-p2-metadata) on project com.hribol.bromium.dsl: Execution attach-p2-metadata of goal org.eclipse.tycho:tycho-p2-plugin:1.1.0-SNAPSHOT:p2-metadata failed.: IllegalArgumentException -> [Help 1]
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.1.0-SNAPSHOT:p2-metadata (attach-p2-metadata) on project com.hribol.bromium.dsl: Execution attach-p2-metadata of goal org.eclipse.tycho:tycho-p2-plugin:1.1.0-SNAPSHOT:p2-metadata failed.
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[INFO] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
[INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
[INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
[INFO] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
[INFO] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
[INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] Caused by: org.apache.maven.plugin.PluginExecutionException: Execution attach-p2-metadata of goal org.eclipse.tycho:tycho-p2-plugin:1.1.0-SNAPSHOT:p2-metadata failed.
[INFO] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[INFO] ... 20 more
[INFO] Caused by: java.lang.IllegalArgumentException
[INFO] at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.getCanonicalArtifact(P2GeneratorImpl.java:193)
[INFO] at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:146)
[INFO] at org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata(P2MetadataMojo.java:149)
[INFO] at org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute(P2MetadataMojo.java:108)
[INFO] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[INFO] ... 21 more
EDIT 2: After following the workaround from here - moving the tycho p2 plugin only to the projects that need it - feature, repository and target, the build no longer breaks with IllegalArgumentException. This time it fails in the signing phase, because a file named p2content.xml is missing. Does anyone know what could be the reason? If I just build the project with mvn clean install the p2content.xml is indeed created, so I think that is probably due to some wrong execution order.

Jelastic maven plugin throws gateway time-out on deploy goal

I'm using jelastic to build and deploy spring-boot application with a many classes. It takes few minutes for jelastic to redeploy this application. But when environment starts reloading after plugin execution - plugin throws Gateway time-out.
Here is plugin configuration:
<plugin>
<groupId>com.jelastic</groupId>
<artifactId>jelastic-maven-plugin</artifactId>
<version>${jelastic-maven-plugin.version}</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<email>${jelastic-maven-plugin.login}</email>
<password>${jelastic-maven-plugin.password}</password>
<context>${jelastic-maven-plugin.context}</context>
<environment>${jelastic-maven-plugin.environment-name}</environment>
<comment />
<api_hoster>${jelastic-maven-plugin.hoster-api}</api_hoster>
</configuration>
</plugin>
Here is log from console (I removed File URL from this trace, but I've checked - it was valid):
[INFO] [94%]
[INFO] [95%]
[INFO] [96%]
[INFO] [97%]
[INFO] [98%]
[INFO] [99%]
[INFO] [100%]
[INFO] File UpLoad : SUCCESS
[INFO] File URL : http://{{host}}/xssu/rest/download/{{fileid}}
[INFO] File size : 61768307
[INFO] ------------------------------------------------------------------------
[INFO] File registration : SUCCESS
[INFO] Registration ID : 16518
[INFO] Developer ID : 1431
[INFO] ------------------------------------------------------------------------
[ERROR] Gateway Time-out
org.apache.http.client.HttpResponseException: Gateway Time-out
at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:67)
at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:55)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:945)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910)
at com.jelastic.JelasticMojo.deploy(JelasticMojo.java:667)
at com.jelastic.DeployMojo.execute(DeployMojo.java:40)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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: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: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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:18.859s
[INFO] Finished at: Sun Jul 30 11:26:03 MSK 2017
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jelastic:jelastic-maven-plugin:1.8.1:deploy (default-cli) on project dance-form: Execution default-cli of goal com.jelastic:jelastic-maven-plugin:1.8.1:deploy failed. 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/PluginExecutionException
I checked in console that environment was reloaded as the result of this execution.
How can I increase time-out in jelastic maven plugin?

Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin deploy failed. NullPointerException

While running command
mvn -X clean deploy
I am getting following error
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # something ---
[DEBUG] [buildinfo] Resolved artifact: org.apache.maven.plugins:maven-deploy-plugin:pom:2.7:build from: team (http://myrepo/maven/m2repos, releases+snapshots) Context is: plugin
[DEBUG] [buildinfo] Resolved artifact: org.apache.maven.plugins:maven-deploy-plugin:jar:2.7:build from: team (http://myrepo/maven/m2repos, releases+snapshots) Context is: plugin
[DEBUG] [buildinfo] Resolved artifact: junit:junit:jar:3.8.1:build from: C:\Users\user\.m2\repository (enhanced) Context is: plugin
[DEBUG] [buildinfo] Resolved artifact: org.codehaus.plexus:plexus-utils:jar:1.5.6:build from: C:\Users\user\.m2\repository (enhanced) Context is: plugin
[INFO] Uploading: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.war
[INFO] Uploaded: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.war (162384 KB at 23020.0 KB/sec)
[INFO] Uploading: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.pom
[INFO] Uploaded: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.pom (46 KB at 27.3 KB/sec)
[INFO] Downloading: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml
[INFO] Downloaded: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml (19 KB at 162.1 KB/sec)
[INFO] Uploading: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml
[INFO] Uploaded: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml (19 KB at 12.6 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9:07.223s
[INFO] Finished at: Thu Apr 27 21:40:53 PDT 2017
[INFO] Final Memory: 54M/568M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project myproject: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project myproject: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
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:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:185)
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:497)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
Caused by: java.lang.NullPointerException
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:178)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 31 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/PluginExecutionException
If i look at my maven repo, all files are already uploaded with build as seen in log (it says uploaded for files), But at last build status failed with nullpointer exception. I have no clue even after enabling debug mode.
Any help please.
Upgrading to recent version of maven-deploy-plugin solved the issue for me.
E.g.:
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
</plugins>
</build>

Maven with Spark, Error message by the Java execution

I use Eclipse to run my Spark code and use tool Maven in Eclipse to build the dependencies.
Currently I have the situation, when I have to run my code not from Eclipse platform, but from console (bash). I upload and install Maven local on my machine and was playing with the different simple examples. My Maven folder is in Downloads repository. All standard examples are going very well, I have got a right output. All introductions I have found on this site.
Now I want also execute a spark code. After I have placed my Java file with the spark code in the directory, where I have other files, and updated pom.xml, I couldn't build my jar file. I have got the next error:
user#user-HP-ProBook-6570b:~/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app$ mvn package -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # CTI ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # CTI ---
[INFO] Compiling 1 source file to /home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.728s
[INFO] Finished at: Mon Oct 26 15:18:52 CET 2015
[INFO] Final Memory: 14M/167M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project CTI: Compilation failure
[ERROR] /home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project CTI: Compilation failure
/home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.CompilationFailureException: Compilation failure
/home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 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
How I understand, is everything wrong with my Spark version. I use currently spark 1.4.0 version. I also post my pom.xml file:
<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>Prototype</groupId>
<artifactId>CTI</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency> <!-- Spark dependency -->
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
</project>
Regarding the documentation in the link at the bottom of error message it is not a error of maven, but something wrong is with plugin.
According to you error log, you need to set your java compiler version in maven to the corresponding java version you are using (1.7 or 1.8). It seems that your maven is using a old version of Java (1.3)
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
This is the line that gave the error up :
spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3

Resources