mvn tomcat7:deploy - Cannot invoke Tomcat manager: Broken pipe - java

I'm getting an error trying to deploy the CLIFF .war to my tomcat7 server.
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:deploy (default-cli) on project cliff: Cannot invoke Tomcat manager: Connection to http://localhost:8080 refused: Connection refused
OS X 10.10.5
Apache Tomcat/8.0.24
JVM 1.8.0_05-b13
David-Laxers-MacBook-Pro:CLIFF davidlaxer$ mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00)
Maven home: /Users/davidlaxer/Downloads/apache-maven-3.2.1
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac"
David-Laxers-MacBook-Pro:CLIFF davidlaxer$
David-Laxers-MacBook-Pro:CLIFF davidlaxer$ sudo mvn tomcat7:deploy -DskipTests
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] CLIFF
[INFO] common
[INFO] stanford-entity-extractor
[INFO] cliff
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CLIFF 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) # CLIFF >>>
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.1:deploy (default-cli) # CLIFF <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) # CLIFF ---
[INFO] Skipping non-war project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building common 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) # common >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/common/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/common/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # common ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) # common ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # common ---
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.1:deploy (default-cli) # common <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) # common ---
[INFO] Skipping non-war project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building stanford-entity-extractor 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) # stanford-entity-extractor >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # stanford-entity-extractor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # stanford-entity-extractor ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # stanford-entity-extractor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 23 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # stanford-entity-extractor ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) # stanford-entity-extractor ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # stanford-entity-extractor ---
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.1:deploy (default-cli) # stanford-entity-extractor <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) # stanford-entity-extractor ---
[INFO] Skipping non-war project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cliff 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) # cliff >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # cliff ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 12 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # cliff ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # cliff ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/webapp/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # cliff ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) # cliff ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # cliff ---
[INFO] Packaging webapp
[INFO] Assembling webapp [cliff] in [/Users/davidlaxer/CLIFF/webapp/target/cliff-2.3.0]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/davidlaxer/CLIFF/webapp/src/main/webapp]
[INFO] Webapp assembled in [1345 msecs]
[INFO] Building war: /Users/davidlaxer/CLIFF/webapp/target/cliff-2.3.0.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.1:deploy (default-cli) # cliff <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) # cliff ---
[INFO] Deploying war to http://localhost:8080/cliff-2.3.0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CLIFF ............................................. SUCCESS [ 1.728 s]
[INFO] common ............................................ SUCCESS [ 1.883 s]
[INFO] stanford-entity-extractor ......................... SUCCESS [ 0.265 s]
[INFO] cliff ............................................. FAILURE [ 11.384 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.717 s
[INFO] Finished at: 2015-08-26T08:07:32-08:00
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:deploy (default-cli) on project cliff: Cannot invoke Tomcat manager: Connection to http://localhost:8080 refused: Connection refused -> [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/ConnectException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :cliff
pom.xml:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<server>CliffTomcatServer</server>
<path>/${project.build.finalName}</path>
</configuration>
</plugin>
~/.m2/settings.xml:
<server>
<id>CliffTomcatServer</id>
<username>cliff</username>
<password>beer</password>
</server>
/usr/local/apache-tomcat-8.0.24/conftomcat_users.xml:
<tomcat-users>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="cliff" password="beer" roles="manager,manager-gui,manager-script"/>
Added to pom.xlm: http://localhost:8080/manager/text
[INFO] Deploying war to http://localhost:8080/cliff-2.3.0
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
2052/127150 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
2356/127150 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
2052/127150 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
2156/127150 KB
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CLIFF ............................................. SUCCESS [ 1.523 s]
[INFO] common ............................................ SUCCESS [ 1.718 s]
[INFO] stanford-entity-extractor ......................... SUCCESS [ 0.359 s]
[INFO] cliff ............................................. FAILURE [ 12.664 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.735 s
[INFO] Finished at: 2015-08-26T11:04:23-08:00
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:deploy (default-cli) on project cliff: Cannot invoke Tomcat manager: Broken pipe -> [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 :cliff
David-Laxers-MacBook-Pro:CLIFF davidlaxer$

When I set in the ~/.m2/settings.xml,it does not work. So I set in the pom.xml,like this:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>${tomcat7-maven-plugin.version}</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>tomcat</server>
<username>admin1</username>
<password>admin1</password>
<path>/${project.artifactId}</path>
<update>true</update>
</configuration>
</plugin>
And in $CATALINA_HOME/conf/tomcat-users.xml file, in <tomcat-users> element, add as follows:
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>
<user username="admin1" password="admin1" roles="manager-script"/>
Then it works for me. :)

The role for deploying on /manager/text is "manager-script" and the Apache Tomcat Manager How-To indicates it shouldn't be applied to a user with the manager-gui role. I use a deployment user with only the manager-script role and no others, and that uploads the WAR file fine without the broken pipe message. If I add the manager-gui role to my deployment user, I get the broken pipe message you encounter. Try changing your tomcat-users.xml to limit Cliff's role to the single manager-script role. Hope it helps.
http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html

You may need to add this
<configuration>
..
<update>true</update>
..
</configuration>
to your pom.xml file to run
mvn tomcat7:deploy

I got this error when running mvn tomcat7:deploy instead of mvn tomcat7:redeploy.

If you're running CentOS, you may need to install additional management libraries:
yum install tomcat-webapps tomcat-admin-webapps
On other platforms solution may be similar.

I haven't been able to use the mvn redeploy shortcut since I merged in the code that split it into a few mvn modules. I recommend copying the .war file from webapp/target to the tomcat webapps dir on your computer/server.

May be you should check the webapps/manager/WEB-INF/web.xml file to ensure your .war file is smaller than the configured value.
<max-file-size>152428800</max-file-size>
<max-request-size>152428800</max-request-size>
See this question: IBM MobileFirst Platform 6.3 Operational Analytics Failed installation for Tomcat

if you already have the same application deploy on the tomcat server you need to undeploy it first. If you deploy it again it can give your the connection error.

Related

mvn clean compile jib:build failed

so i have been trying to deploy my spring microservices using jib and it has been really fustrating :(
I have been jumping from one issue to another and right now i dont how to get out of this present situation... I have used openjdk 17 alphine and this is the logs i get from my build...
PS C:\xampp\htdocs\weddingapp-main\weddingapp> mvn clean compile jib:build -rf :discovery-service [INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] discovery-service [jar]
[INFO] api-gateway [jar]
[INFO] wedding [jar]
[INFO] users [jar]
[INFO]
[INFO] -----------------< com.slinkdigital:discovery-service >-----------------
[INFO] Building discovery-service 1.0-SNAPSHOT [1/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # discovery-service ---
[INFO] Deleting C:\xampp\htdocs\weddingapp-main\weddingapp\discovery-service\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # discovery-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # discovery-service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\xampp\htdocs\weddingapp-main\weddingapp\discovery-service\target\classes
[INFO]
[INFO] --- jib-maven-plugin:3.3.0:build (default-cli) # discovery-service ---
[INFO]
[INFO] Containerizing application to registry.hub.docker.com/davidtega/discovery-service...
[INFO] Using credentials from Maven settings file for registry.hub.docker.com/davidtega/discovery-service
[INFO]
[INFO] Container entrypoint set to [java, -cp, #/app/jib-classpath-file, com.slinkdigital.eureka.DiscoveryServiceApplication]
[WARNING] PATCH https://registry.hub.docker.com/v2/davidtega/discovery-service/blobs/uploads/79257277-0299-4f05-90cc-e33f34d3a44a?_state=P1UgMi0NjbwAR3C9mu77RBBM0P2yRJNUC5Qz-wEGppl7Ik5hbWUiOiJkYXZpZHRlZ2EvZGlzY292ZXJ5LXNlcnZpY2UiLCJVVUlEIjoiNzkyNTcyNzctMDI5OS00ZjA1LTkwY2MtZTMzZjM0ZDNhNDRhIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTEwLTEyVDA0OjMyOjU2Ljg4OTcxNzc4OFoifQ%3D%3D failed and will NOT be retried
[ERROR] I/O error for image [registry.hub.docker.com/davidtega/discovery-service]:
[ERROR] java.net.SocketException
[ERROR] An established connection was aborted by the software in your host machine
[INFO] Executing tasks:
[INFO] [======================= ] 77.8% complete
[INFO] > launching layer pushers
[INFO] > scheduling pushing manifests
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for discovery-service 1.0-SNAPSHOT:
[INFO]
[INFO] discovery-service .................................. FAILURE [32:57 min]
[INFO] api-gateway ........................................ SKIPPED
[INFO] wedding ............................................ SKIPPED
[INFO] users .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32:58 min
[INFO] Finished at: 2022-10-12T06:05:32+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.3.0:build (default-cli) on project discovery-service: An established connection was aborted by the software in your host machine -> [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
I have restarted my pc severally, cleaned up my config.json file and tried every other solution i have seen but its still not working, i will appreciate the assistance... Thanks

Can't create a Hippocms project

I am trying to make a new project on Hippocms. I have followed the steps from the onehippo web page. I have downloaded Maven seperately. I have removed all the metadatas from other projects, but it keeps showing me the same error when I ran mvn clean verify. I have deleted the repository multiple times
and I still got this message. The problem is that there are not any solutions on the Internet especially for Hippo.
[Hippo Errors][1].
C:\Users\Administrator\myhippoproject>mvn clean verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] My Hippo Project
[INFO] My Hippo Project Repository Data
[INFO] My Hippo Project Repository Data For Application
[INFO] My Hippo Project Repository Data For Development
[INFO] My Hippo Project Site
[INFO] My Hippo Project Repository Data Web Files
[INFO] My Hippo Project CMS
[INFO] My Hippo Project Essentials
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My Hippo Project 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # myhippoproject ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven-versions) #
myhippoproject ---
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (property-
commandline-offline) # myhippoproject ---
[INFO] No match to regex '"true"' found in '"false"'. The initial value
'"false"' is left as-is...
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (property-
commandline-online) # myhippoproject ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) #
myhippoproject ---
[INFO]
[INFO] --- maven-source-plugin:3.0.1:jar-no-fork (attach-sources-no-fork) #
myhippoproject ---
[INFO]
[INFO] ---------------------------------------------------------------------
---
[INFO] Building My Hippo Project Repository Data 0.1.0-SNAPSHOT
[INFO] ---------------------------------------------------------------------
---
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # myhippoproject-
repository-data ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven-versions) #
myhippoproject-repository-data ---
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (property-
commandline-offline) # myhippoproject-repository-data ---
[INFO] No match to regex '"true"' found in '"false"'. The initial value
'"false"' is left as-is...
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (property-
commandline-online) # myhippoproject-repository-data ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) #
myhippoproject-repository-data ---
[INFO]
[INFO] --- maven-source-plugin:3.0.1:jar-no-fork (attach-sources-no-fork) #
myhippoproject-repository-data ---
[INFO]
[INFO] ---------------------------------------------------------------------
---
[INFO] Building My Hippo Project Repository Data For Application 0.1.0-
SNAPSHOT
[INFO] ---------------------------------------------------------------------
---
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # myhippoproject-
repository-data-application ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven-versions) #
myhippoproject-repository-data-application ---
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (property-
commandline-offline) # myhippoproject-repository-data-application ---
[INFO] No match to regex '"true"' found in '"false"'. The initial value
'"false"' is left as-is...
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (property-
commandline-online) # myhippoproject-repository-data-application ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create (default) # myhippoproject-
repository-data-application ---
[INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
[INFO] Working directory: C:\Users\Administrator\myhippoproject\repository-
data\application
[INFO] ----------------------------------------------------------------------
--
[INFO] Reactor Summary:
[INFO]
[INFO] My Hippo Project ................................... SUCCESS [ 1.328
s]
[INFO] My Hippo Project Repository Data ................... SUCCESS [ 0.062
s]
[INFO] My Hippo Project Repository Data For Application ... FAILURE [ 0.469
s]
[INFO] My Hippo Project Repository Data For Development ... SKIPPED
[INFO] My Hippo Project Site .............................. SKIPPED
[INFO] My Hippo Project Repository Data Web Files ......... SKIPPED
[INFO] My Hippo Project CMS ............................... SKIPPED
[INFO] My Hippo Project Essentials ........................ SKIPPED
[INFO] ----------------------------------------------------------------------
--
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------------------------------
--
[INFO] Total time: 2.766 s
[INFO] Finished at: 2017-09-19T11:48:05+02:00
[INFO] Final Memory: 21M/316M
[INFO] ----------------------------------------------------------------------
--
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-
plugin:1.4:create (default) on project myhippoproject-repository-data-
application: Cannot get the revision information from the scm repository :
[ERROR] Exception while executing SCM command.: Error while executing
command. Error while executing process. Cannot run program "git" (in
directory "C:\Users\Administrator\myhippoproject\repository-
data\application"): CreateProcess error=2, The system cannot find the file
specified
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :myhippoproject-repository-data-application
[1]: https://i.stack.imgur.com/j7Lm8.png
Your build problem seems to be related to a maven plugin that tries to execute a git command. See this line in your log:
[ERROR] Exception while executing SCM command.: Error while executing
command. Error while executing process. Cannot run program "git" (in
directory "C:\Users\Administrator\myhippoproject\repository-
data\application"): CreateProcess error=2, The system cannot find the file
specified
It seems it requires git to be installed on your system. You probably need to install git first and then try that build command again.
You shouldn't need git to build Hippo, but something seems to be wrong in the 12.0.1 archetype. I will file a bug. Please install git if you can.

Maven Deploy to Tomcat

I want to deploy Maven based war file to Tomcat.
Technologies used :
Maven 3.1.1
Eclipse 4.2
JDK 7
Spring 4.1.1.RELEASED
Tomcat 7
Logback 1.0.13
I have this plugin in my maven file:
<!-- For Maven Tomcat Plugin -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>TomcatServer</server>
<path>/DevicesCloudWebApp</path>
<username>admin</username>
<password>admin</password>
<update>true</update>
</configuration>
</plugin>
but when I deploy using the command mvn tomcat7:deploy
I have this error:
[DEBUG] Connection 0.0.0.0:62265<->127.0.0.1:8080 closed
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package # DevicesCloudWebApp >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # DevicesCloudWebApp ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # DevicesCloudWebApp ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # DevicesCloudWebApp ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # DevicesCloudWebApp ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # DevicesCloudWebApp ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # DevicesCloudWebApp ---
[INFO] Packaging webapp
[INFO] Assembling webapp [DevicesCloudWebApp] in [/Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/target/DevicesCloudWebApp]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/src/main/webapp]
[INFO] Webapp assembled in [97 msecs]
[INFO] Building war: /Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/target/DevicesCloudWebApp.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package # DevicesCloudWebApp <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) # DevicesCloudWebApp ---
[INFO] Deploying war to http://localhost:8080/DeviceslCloudWebApp
Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
2170/6062 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
2198/6062 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
2176/6062 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
2188/6062 KB
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.922 s
[INFO] Finished at: 2016-12-02T20:57:29+01:00
[INFO] Final Memory: 16M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project DevicesCloudWebApp: Cannot invoke Tomcat manager: Broken pipe -> [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
Try adding authentication configuration like below
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>${tomcat7-maven-plugin.version}</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>tomcat</server>
<username>admin1</username>
<password>admin1</password>
<path>/${project.artifactId}</path>
<update>true</update>
</configuration>
</plugin>
Update the role configuration like below in the tomcat -> $CATALINA_HOME/conf/tomcat-users.xml in <tomcat-users> element
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>
<user username="admin1" password="admin1" roles="manager-script"/>

Maven with Java play 2 framework: Server not starting

I have a java play 2 project that i'm trying to run using maven. I added the play2-maven-plugin to my pom.xml.
When I try to run the following command mvn clean compile play2:run, I get the following:
```
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my_project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # my_project ---
[INFO] Deleting /Users/sergenasr/my_project/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # my_project ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # my_project ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] >>> play2-maven-plugin:1.0.0-alpha5:run (default-cli) > process-classes # my_project >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # my_project ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # my_project ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< play2-maven-plugin:1.0.0-alpha5:run (default-cli) < process-classes # my_project <<<
[INFO]
[INFO] --- play2-maven-plugin:1.0.0-alpha5:run (default-cli) # my_project ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.640 s
[INFO] Finished at: 2016-11-01T22:07:17-07:00
[INFO] Final Memory: 11M/125M
[INFO] ------------------------------------------------------------------------
```
However, I don't see the server running.
Also, note that I can run the server normally using activator, then ~run. What am I doing wrong?
Use the latest 1.0.0-beta5 plugin version.
Read general plugin usage document.
Read plugin usage page for Play! Framework version used in your project (there are links on general usage page).

Unable to deploy code to google cloud environment

I am using eclipse Luna + maven 3.2 . I have developed small application and trying to move to console.developers.google.com using mvn:appengine:devserver .
But i am getting build failure . below is the error .
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> appengine-maven-plugin:1.9.32:devserver (default-cli) > package # helloworld >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\googleAppEngine\helloworld\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # helloworld ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\googleAppEngine\helloworld\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # helloworld ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # helloworld ---
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) # helloworld ---
[INFO] Packaging webapp
[INFO] Assembling webapp [helloworld] in [F:\googleAppEngine\helloworld\target\helloworld-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [F:\googleAppEngine\helloworld/src/main/webapp/WEB-INF] to [F:\googleAppEngine\helloworld\target\helloworld-1.0-SNAPSHOT]
[INFO] Copying webapp resources [F:\googleAppEngine\helloworld\src\main\webapp]
[INFO] Webapp assembled in [121 msecs]
[INFO] Building war: F:\googleAppEngine\helloworld\target\helloworld-1.0-SNAPSHOT.war
[INFO]
[INFO] <<< appengine-maven-plugin:1.9.32:devserver (default-cli) < package # helloworld <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.9.32:devserver (default-cli) # helloworld ---
[INFO]
[INFO] Google App Engine Java SDK - Running Development Server
[INFO]
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.016 s
[INFO] Finished at: 2016-03-09T08:14:33+05:30
[INFO] Final Memory: 15M/219M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.32:devserver (default-cli) on project helloworld: Execution default-cli of goal com.google.appengine:appengine-maven-plugin:1.9.32:devserver failed. NoSuchElementException -> [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

Categories

Resources