Getting no main manifest attribute,Maven Springboot












0















I did saw multiple posts regarding this issue however none of them solved my issue.
I do have a spring boot maven based application and I am building a war file with that.



When I am using



java -jar targetApp-0.0.1.war


I am getting no main manifest attribute, in targetApp-0.0.1.war



However when I am using mvn spring-boot:run, i am able to run the application.



Thing is i need to deploy this app in PCF, and this is kind of failing in there with buildpack issue , i am guessing because of this.



POM.xml




http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0



<groupId>com.tech.bar</groupId>
<artifactId>BarChainDemo</artifactId>
<version>${revision}</version>
<packaging>war</packaging>
<name>BarChainDemo</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>****CONFIDENTIAL***</groupId>
<artifactId>****CONFIDENTIAL***</artifactId>
<version>****CONFIDENTIAL***</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<revision>0.0.1</revision>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.15.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.5.15.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
<!--Adding exclusions and then below adding runtime as poms internal to jackson are mismatched -->
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.5</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>
</plugins>
</build>











share|improve this question

























  • Can you please post your pom.xml?

    – Kunal Puri
    Nov 21 '18 at 0:51











  • I am little confused about that weather I can do that or not . I think I should not because parent in that which I am using ja client specific

    – DevAvitesh
    Nov 21 '18 at 0:52











  • Then please post only that portion of pom.xml that you feel worth sharing.

    – Kunal Puri
    Nov 21 '18 at 0:56











  • Are you using JDK or JRE? By that, I mean is that if you go to Window > Preferences > Java > Installed JREs, JRE is selected or some JDK is selected?

    – Kunal Puri
    Nov 21 '18 at 1:13











  • It’s jdk but how does that matter? Just curious

    – DevAvitesh
    Nov 21 '18 at 1:21
















0















I did saw multiple posts regarding this issue however none of them solved my issue.
I do have a spring boot maven based application and I am building a war file with that.



When I am using



java -jar targetApp-0.0.1.war


I am getting no main manifest attribute, in targetApp-0.0.1.war



However when I am using mvn spring-boot:run, i am able to run the application.



Thing is i need to deploy this app in PCF, and this is kind of failing in there with buildpack issue , i am guessing because of this.



POM.xml




http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0



<groupId>com.tech.bar</groupId>
<artifactId>BarChainDemo</artifactId>
<version>${revision}</version>
<packaging>war</packaging>
<name>BarChainDemo</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>****CONFIDENTIAL***</groupId>
<artifactId>****CONFIDENTIAL***</artifactId>
<version>****CONFIDENTIAL***</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<revision>0.0.1</revision>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.15.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.5.15.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
<!--Adding exclusions and then below adding runtime as poms internal to jackson are mismatched -->
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.5</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>
</plugins>
</build>











share|improve this question

























  • Can you please post your pom.xml?

    – Kunal Puri
    Nov 21 '18 at 0:51











  • I am little confused about that weather I can do that or not . I think I should not because parent in that which I am using ja client specific

    – DevAvitesh
    Nov 21 '18 at 0:52











  • Then please post only that portion of pom.xml that you feel worth sharing.

    – Kunal Puri
    Nov 21 '18 at 0:56











  • Are you using JDK or JRE? By that, I mean is that if you go to Window > Preferences > Java > Installed JREs, JRE is selected or some JDK is selected?

    – Kunal Puri
    Nov 21 '18 at 1:13











  • It’s jdk but how does that matter? Just curious

    – DevAvitesh
    Nov 21 '18 at 1:21














0












0








0








I did saw multiple posts regarding this issue however none of them solved my issue.
I do have a spring boot maven based application and I am building a war file with that.



When I am using



java -jar targetApp-0.0.1.war


I am getting no main manifest attribute, in targetApp-0.0.1.war



However when I am using mvn spring-boot:run, i am able to run the application.



Thing is i need to deploy this app in PCF, and this is kind of failing in there with buildpack issue , i am guessing because of this.



POM.xml




http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0



<groupId>com.tech.bar</groupId>
<artifactId>BarChainDemo</artifactId>
<version>${revision}</version>
<packaging>war</packaging>
<name>BarChainDemo</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>****CONFIDENTIAL***</groupId>
<artifactId>****CONFIDENTIAL***</artifactId>
<version>****CONFIDENTIAL***</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<revision>0.0.1</revision>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.15.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.5.15.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
<!--Adding exclusions and then below adding runtime as poms internal to jackson are mismatched -->
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.5</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>
</plugins>
</build>











share|improve this question
















I did saw multiple posts regarding this issue however none of them solved my issue.
I do have a spring boot maven based application and I am building a war file with that.



When I am using



java -jar targetApp-0.0.1.war


I am getting no main manifest attribute, in targetApp-0.0.1.war



However when I am using mvn spring-boot:run, i am able to run the application.



Thing is i need to deploy this app in PCF, and this is kind of failing in there with buildpack issue , i am guessing because of this.



POM.xml




http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0



<groupId>com.tech.bar</groupId>
<artifactId>BarChainDemo</artifactId>
<version>${revision}</version>
<packaging>war</packaging>
<name>BarChainDemo</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>****CONFIDENTIAL***</groupId>
<artifactId>****CONFIDENTIAL***</artifactId>
<version>****CONFIDENTIAL***</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<revision>0.0.1</revision>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.15.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.5.15.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
<!--Adding exclusions and then below adding runtime as poms internal to jackson are mismatched -->
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.5</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>
</plugins>
</build>








java maven spring-boot pivotal-cloud-foundry






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 1:06







DevAvitesh

















asked Nov 20 '18 at 20:33









DevAviteshDevAvitesh

316




316













  • Can you please post your pom.xml?

    – Kunal Puri
    Nov 21 '18 at 0:51











  • I am little confused about that weather I can do that or not . I think I should not because parent in that which I am using ja client specific

    – DevAvitesh
    Nov 21 '18 at 0:52











  • Then please post only that portion of pom.xml that you feel worth sharing.

    – Kunal Puri
    Nov 21 '18 at 0:56











  • Are you using JDK or JRE? By that, I mean is that if you go to Window > Preferences > Java > Installed JREs, JRE is selected or some JDK is selected?

    – Kunal Puri
    Nov 21 '18 at 1:13











  • It’s jdk but how does that matter? Just curious

    – DevAvitesh
    Nov 21 '18 at 1:21



















  • Can you please post your pom.xml?

    – Kunal Puri
    Nov 21 '18 at 0:51











  • I am little confused about that weather I can do that or not . I think I should not because parent in that which I am using ja client specific

    – DevAvitesh
    Nov 21 '18 at 0:52











  • Then please post only that portion of pom.xml that you feel worth sharing.

    – Kunal Puri
    Nov 21 '18 at 0:56











  • Are you using JDK or JRE? By that, I mean is that if you go to Window > Preferences > Java > Installed JREs, JRE is selected or some JDK is selected?

    – Kunal Puri
    Nov 21 '18 at 1:13











  • It’s jdk but how does that matter? Just curious

    – DevAvitesh
    Nov 21 '18 at 1:21

















Can you please post your pom.xml?

– Kunal Puri
Nov 21 '18 at 0:51





Can you please post your pom.xml?

– Kunal Puri
Nov 21 '18 at 0:51













I am little confused about that weather I can do that or not . I think I should not because parent in that which I am using ja client specific

– DevAvitesh
Nov 21 '18 at 0:52





I am little confused about that weather I can do that or not . I think I should not because parent in that which I am using ja client specific

– DevAvitesh
Nov 21 '18 at 0:52













Then please post only that portion of pom.xml that you feel worth sharing.

– Kunal Puri
Nov 21 '18 at 0:56





Then please post only that portion of pom.xml that you feel worth sharing.

– Kunal Puri
Nov 21 '18 at 0:56













Are you using JDK or JRE? By that, I mean is that if you go to Window > Preferences > Java > Installed JREs, JRE is selected or some JDK is selected?

– Kunal Puri
Nov 21 '18 at 1:13





Are you using JDK or JRE? By that, I mean is that if you go to Window > Preferences > Java > Installed JREs, JRE is selected or some JDK is selected?

– Kunal Puri
Nov 21 '18 at 1:13













It’s jdk but how does that matter? Just curious

– DevAvitesh
Nov 21 '18 at 1:21





It’s jdk but how does that matter? Just curious

– DevAvitesh
Nov 21 '18 at 1:21












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401073%2fgetting-no-main-manifest-attribute-maven-springboot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401073%2fgetting-no-main-manifest-attribute-maven-springboot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

Npm cannot find a required file even through it is in the searched directory