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"
[JBT]Fails to import jbossews apps to the workspace with error "couldn't impo...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-21 07:50 EDT by joycezhang
Modified: 2015-05-14 19:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-11 00:07:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBIDE-14546 Critical Closed Could not import maven project when creating jbossews apps (WATCHER ISSUE) 2016-06-14 21:57 EDT

  None (edit)
Description joycezhang 2013-05-21 07:50:48 EDT
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 07:56:26 EDT
Created attachment 751077 [details]
couldn't import maven project error
Comment 2 Xiaoli Tian 2013-05-21 10:33:16 EDT
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 13:40:21 EDT
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-28 23:02:16 EDT
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-28 23:49:47 EDT
https://github.com/openshift/origin-server/pull/2669
Comment 7 joycezhang 2013-05-29 06:58:04 EDT
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.