Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

webapp generator requires <finalName> to be set #1276

Closed
rhuss opened this issue Apr 21, 2018 · 4 comments · Fixed by #1325
Closed

webapp generator requires <finalName> to be set #1276

rhuss opened this issue Apr 21, 2018 · 4 comments · Fixed by #1325
Assignees
Labels
cat/bug Bug which needs fixing

Comments

@rhuss
Copy link
Contributor

rhuss commented Apr 21, 2018

Description

The build must contain a

 <build>
    <finalName>${project.artifactId}</finalName>
    ....

because otherwise the "webapp" assembly used in the generator doesn't find the war file to add. The generator should be smarter and really consider ${project.build.finalName} for adding the proper war-file

Info

  • f-m-p version : 3.5.38
  • Maven version (mvn -v) :
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
Maven home: /Users/roland/.sdkman/candidates/maven/current
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"
@rhuss rhuss changed the title webapp generator requires <finalName>${project.artifactId}</finalName> to be set webapp generator requires <finalName> to be set Apr 21, 2018
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Apr 29, 2018
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jun 19, 2018
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jul 4, 2018
@rohanKanojia rohanKanojia added the cat/bug Bug which needs fixing label Jul 13, 2018
@rohanKanojia
Copy link
Member

@rhuss : I've discussed one temporary solution with you(not sure it's right approach though) on IRC, If <finalName> is not provided, maven auto-generates it and we can check for <finalName> by checking whether it's in an auto generated phase or not. Although it's more of a hack and I also don't feel it's clean solution.

Is there some other way via which we can validate <finalName>? WDYT?

@rohanKanojia rohanKanojia self-assigned this Jul 13, 2018
rhuss added a commit to rhuss/fabric8-maven-plugin that referenced this issue Jul 19, 2018
and also fix the assembly to include the proper artefact, regardless
of the 'final' name.

Fixes fabric8io#1276.
@rohanKanojia
Copy link
Member

@rhuss: Actually I wanted little help from your side so that I could have figured it out myself(that's why I assigned issue to myself). Anyways thanks for PR :)

@rhuss
Copy link
Contributor Author

rhuss commented Jul 20, 2018

well the simple fix was already mentioned more or less in the problem description: Change the assembly webapp.xml to use ${project.build.finalName} as the file to include.

However, an even better solution is to use a dependencySet instead of a fileSet and while I was at it, I found out that the Route generated for the Service for webapp doesn't really work nicely as it includes the artefact name + version as context path in the URL. So I added the path element to explicitly set the path which accidentally fixes this issue here, too. It was not my intention to take this issue away from you.

rohanKanojia pushed a commit that referenced this issue Jul 23, 2018
and also fix the assembly to include the proper artefact, regardless
of the 'final' name.

Fixes #1276.
@rohanKanojia
Copy link
Member

Closed via #1325

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/bug Bug which needs fixing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants