Bug 965591 - [JBT]Fails to import jbossews apps to the workspace with error "couldn't import maven project null " shown caused by the imported name "jbossews-example"
Summary: [JBT]Fails to import jbossews apps to the workspace with error "couldn't impo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-21 11:50 UTC by joycezhang
Modified: 2015-05-14 23:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:07:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
couldn't import maven project error (88.21 KB, image/png)
2013-05-21 11:56 UTC, joycezhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBIDE-14546 0 Critical Closed Could not import maven project when creating jbossews apps (WATCHER ISSUE) 2016-06-15 01:57:40 UTC

Description joycezhang 2013-05-21 11:50:48 UTC
Description of problem:
If trying to create jbossews-1.0/2.0 apps and import to workspace, it would be failed if there was a jbossews app imported to the workspace already. Please refer to following error:
org.jboss.tools.openshift.express.internal.ui.ImportFailedException: Could not import project null. One of the possible reasons is that theres already a project in your workspace that matches the openshift application/maven name of the OpenShift application. Please rename your workspace project in that case and start over again.

Version-Release number of selected component (if applicable):
INT(devenv_3250)
JBDS 6.0 GA with JBoss OpenShift Tools	2.4.0.Final-v20121205-2147-B97	

How reproducible:
always

Steps to Reproduce:
1.Launch JBDS and create a new jbossews-1.0/jbossews-2.0 (cartridge/type) app on OpenShift
2.Create another jbossews-1.0/jbossews-2.0 app


Actual results:
It would be failed as it imported as "jbossews-example" in the workspace instead of app name.

Expected results:
It should be successful.

Additional info:
For jbossas app, it can be created successfully always as it imported with the appname which is identical.

Comment 1 joycezhang 2013-05-21 11:56:26 UTC
Created attachment 751077 [details]
couldn't import maven project error

Comment 2 Xiaoli Tian 2013-05-21 14:33:16 UTC
Copied one comment from https://issues.jboss.org/browse/JBIDE-14546:

If you create a jbossas-7 application you get a project with an artifactId (in the pom.xml) which matches the OpenShift application name:
Create a jbossas-7 application called as76 and get:
<groupId>as76</groupId>
<artifactId>as76</artifactId>

If you create a jbossews-2.0 application you get a constant artifactId that does NOT match the OpenShift application name:

Create a jbossews-2.0 application called ews123123 and get:
<groupId>com.openshift.example.jbossews</groupId>
<artifactId>jbossews-example</artifactId>
Thus a user wont be able to create and import 2 different jbossews applications.

Comment 3 Andre Dietisheim 2013-05-28 17:40:21 UTC
It looks like as if this was fixed. I cannot reproduce it any more when creating jbossews-1 and jbossews-2 applications. In both cases the artifact id in the maven pom is not constant any more, it's set to match the application name.

Comment 4 joycezhang 2013-05-29 03:02:16 UTC
This bug is not fixed on INT(devenv_3281), the artifiactID is still "jbossews-example" as below

# cat pom.xml 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.openshift.example.jbossews</groupId>
	<artifactId>jbossews-example</artifactId>
	<packaging>war</packaging>
	<version>1.0</version>
	<name>jbossews-example</name>
	<repositories>
		<repository>
			<id>eap</id>
			<url>http://maven.repository.redhat.com/techpreview/all</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

Comment 5 Dan McPherson 2013-05-29 03:49:47 UTC
https://github.com/openshift/origin-server/pull/2669

Comment 7 joycezhang 2013-05-29 10:58:04 UTC
Verified this bug on devenv_3283, the artifiactID is changed as app name for jbossews-1.0/2.0 app as below:

# cat pom.xml 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>ews2</groupId>
	<artifactId>ews2</artifactId>
	<packaging>war</packaging>
	<version>1.0</version>
	<name>ews2</name>
	<repositories>
		<repository>
			<id>eap</id>
			<url>http://maven.repository.redhat.com/techpreview/all</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>


Note You need to log in before you can comment on or make changes to this bug.