[jbosstools-issues] [JBoss JIRA] (JBIDE-22138) Server adapter: doesn't respect openshift maven profile

Andre Dietisheim (JIRA) issues at jboss.org
Fri Jun 22 18:49:00 EDT 2018


    [ https://issues.jboss.org/browse/JBIDE-22138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13595835#comment-13595835 ] 

Andre Dietisheim edited comment on JBIDE-22138 at 6/22/18 6:48 PM:
-------------------------------------------------------------------

[~rob.stryker] I tracked the above down until I found an outdated map of the modules (that still had the old module name) in *JEEDeployableFactory*.
Here's the stacktrace for it:
{code}
JEEDeployableFactory(ProjectModuleFactoryDelegate).cacheModules(IProject) line: 53	
JEEDeployableFactory(ProjectModuleFactoryDelegate).getModules(IProject) line: 265	
ModuleFactory.getModules(IProject, IProgressMonitor) line: 140	
ServerUtil.getModules(IProject) line: 98	
OpenShiftServerUtils.findProjectModule(IProject) line: 289	
OpenShiftPublishController.publishRootModule(IProgressMonitor, IProject, File) line: 60	
OpenShiftPublishController.publishStart(IProgressMonitor) line: 53	
OpenShiftServerBehaviour(CachedPublisherProfileBehavior).publishStart(IProgressMonitor) line: 47	
OpenShiftServerBehaviour(ServerBehaviourDelegate).publish(int, IProgressMonitor) line: 942	
OpenShiftServerBehaviour(ServerBehaviourDelegate).publish(int, List<IModule[]>, IProgressMonitor, IAdaptable) line: 774	
Server.publishImpl(int, List<IModule[]>, IAdaptable, IProgressMonitor) line: 3182	
Server.publish(int, IProgressMonitor) line: 1340	
ResourceChangePublisher$MagicProjectChangeJob.autoPublish(IResourceChangeEvent) line: 248	
ResourceChangePublisher$MagicProjectChangeJob.run(IProgressMonitor) line: 230	
{code}

Looks like a bug in wtp, or do I miss something? Thoughts?


was (Author: adietish):
[~rob.stryker] I tracked the above down until I found in JEEDeployableFactory a map of the modules that didnt grasp the change. The map still contains the old module name that doesnt match what exists on disk (settings-file), wasn't updated.

Here's the stacktrace for it:
{code}
JEEDeployableFactory(ProjectModuleFactoryDelegate).cacheModules(IProject) line: 53	
JEEDeployableFactory(ProjectModuleFactoryDelegate).getModules(IProject) line: 265	
ModuleFactory.getModules(IProject, IProgressMonitor) line: 140	
ServerUtil.getModules(IProject) line: 98	
OpenShiftServerUtils.findProjectModule(IProject) line: 289	
OpenShiftPublishController.publishRootModule(IProgressMonitor, IProject, File) line: 60	
OpenShiftPublishController.publishStart(IProgressMonitor) line: 53	
OpenShiftServerBehaviour(CachedPublisherProfileBehavior).publishStart(IProgressMonitor) line: 47	
OpenShiftServerBehaviour(ServerBehaviourDelegate).publish(int, IProgressMonitor) line: 942	
OpenShiftServerBehaviour(ServerBehaviourDelegate).publish(int, List<IModule[]>, IProgressMonitor, IAdaptable) line: 774	
Server.publishImpl(int, List<IModule[]>, IAdaptable, IProgressMonitor) line: 3182	
Server.publish(int, IProgressMonitor) line: 1340	
ResourceChangePublisher$MagicProjectChangeJob.autoPublish(IResourceChangeEvent) line: 248	
ResourceChangePublisher$MagicProjectChangeJob.run(IProgressMonitor) line: 230	
{code}

Ideas?

> Server adapter: doesn't respect openshift maven profile
> -------------------------------------------------------
>
>                 Key: JBIDE-22138
>                 URL: https://issues.jboss.org/browse/JBIDE-22138
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>         Environment: JBoss Developer Studio (Core Features) 9.1.0.GA-v20160403-1700-B477
> Openshift plugin 3.1.0.Final-v20160401-2357-B263
>            Reporter: Rafael Benevides
>            Assignee: Andre Dietisheim
>              Labels: openshift_v3, server_adapter
>             Fix For: 4.6.0.Final
>
>         Attachments: image-2018-06-22-19-02-57-247.png
>
>
> This is a follow up on JBIDE-22128.
> The maven profile is never read to determine the actual archive name. That will require more coupling to m2e, in order to load the pom.xml model using the openshift profile, if it exists, in order to determine the archive name. This will be a long running operation and will require more significant changes
> steps:
> # EXEC: follow steps outlined in https://github.com/redhat-helloworld-msa/helloworld-msa/blob/master/hello.adoc (deploying with fabric8 maven plugin doesn't work, you end up having the pod failing with ImagePullBack error. You need to take the alternative road where you deploy via "oc new-build", "oc new-app", "oc expose" etc.)
> # EXEC: import the app into your Eclipse workspace
> # EXEC: "hello" (workspace) project: Properties > Maven > Active Maven Profile: set "openshift" 
> # EXEC: create a server adapter and start it
> # ASSERT: adapter starts syncing, verify what war is used
> Result:
> The war that's created locally and then synced to the pod is "hello.war" even though the profile specifies "ROOT.war"



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jbosstools-issues mailing list