ingenieux / awseb-deployment-plugin

Jenkins Plugin for AWS Elastic Beanstalk
Apache License 2.0
29 stars 53 forks source link

AWS Elastic Beanstalk plugin deploying zip instead of WAR file to Elastic Beanstalk #66

Closed abprash closed 7 years ago

abprash commented 7 years ago

I have a Jenkins CI server running on AWS EC2. However when I want to deploy the WAR to Elastic beanstalk, it always gets deployed as a zip file. Would be great if you could kindly guide as to what the issue could be

Here is the console output from the last successful build.

[INFO] --- spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) @ WebServer --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ WebServer --- [INFO] Installing /var/lib/jenkins/workspace/test1/target/WebServer-0.0.1-SNAPSHOT.war to /var/lib/jenkins/.m2/repository/PetTracking/WebServer/0.0.1-SNAPSHOT/WebServer-0.0.1-SNAPSHOT.war [INFO] Installing /var/lib/jenkins/workspace/test1/pom.xml to /var/lib/jenkins/.m2/repository/PetTracking/WebServer/0.0.1-SNAPSHOT/WebServer-0.0.1-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 30.318 s [INFO] Finished at: 2017-08-16T18:59:11+00:00 [INFO] Final Memory: 38M/91M [INFO] ------------------------------------------------------------------------ [JENKINS] Archiving /var/lib/jenkins/workspace/test1/pom.xml to PetTracking/WebServer/0.0.1-SNAPSHOT/WebServer-0.0.1-SNAPSHOT.pom [JENKINS] Archiving /var/lib/jenkins/workspace/test1/target/WebServer-0.0.1-SNAPSHOT.war to PetTracking/WebServer/0.0.1-SNAPSHOT/WebServer-0.0.1-SNAPSHOT.war channel stopped Zipping contents of Root File Object (test1) into tmp file awseb-4125932005542497838.zip (includes=, excludes=) Uploading file awseb-4125932005542497838.zip as s3://elasticbeanstalk-us-west-2-090235289178/jenkins/Test-d10773d8d5445e14ea5c1bc99d82d841a96148c9-jenkins-test1-25.zip Creating application version d10773d8d5445e14ea5c1bc99d82d841a96148c9-jenkins-test1-25 for application Test for path s3://elasticbeanstalk-us-west-2-090235289178/jenkins/Test-d10773d8d5445e14ea5c1bc99d82d841a96148c9-jenkins-test1-25.zip

Thank you very much.

aldrinleal commented 7 years ago

A war file is a zip file.

abprash commented 7 years ago

I didn't know that they are the same. i read from here that they are different.

here

Another thing which i noticed was, the zip which i deploy is 204 MB, while the usual WAR file which i deploy from Eclipse is 76-77MB. The ZIP file has a SNAPSHOT war file included in it. But when i examined the contents of both, the SNAPSHOT war file was 62 MB (A) the WAR from Eclipse - 76 MB. (B)

The WEB-INF/classes folder in (A) were empty, and the ones in (B) has all the required classes of my web application. So does this mean that, the way in which the build is happening incorrect and i have to make the maven project's structure properly?

aldrinleal commented 7 years ago

Sorry, but I can't give Eclipse, Java or Maven support here. I hope you understand.

abprash commented 7 years ago

Thank you for your assistance.