diff --git a/docs/public/alizer-spec.md b/docs/public/alizer-spec.md
index a74a8048..50e3dffb 100644
--- a/docs/public/alizer-spec.md
+++ b/docs/public/alizer-spec.md
@@ -42,6 +42,10 @@ frameworks. Currently, it recognizes:
- Quarkus
- SpringBoot
- Vertx
+- WildFly
+- JBoss EAP
+- WebSphere
+- WebLogic
```
{
diff --git a/pkg/apis/enricher/framework/java/weblogic_detector.go b/pkg/apis/enricher/framework/java/weblogic_detector.go
new file mode 100644
index 00000000..4ffb9129
--- /dev/null
+++ b/pkg/apis/enricher/framework/java/weblogic_detector.go
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v2.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v20.html
+ *
+ * Contributors:
+ * Red Hat, Inc.
+ ******************************************************************************/
+
+package enricher
+
+import (
+ "context"
+
+ "github.com/devfile/alizer/pkg/apis/model"
+)
+
+type WebLogicDetector struct{}
+
+func (o WebLogicDetector) GetSupportedFrameworks() []string {
+ return []string{"WebLogic"}
+}
+
+// DoFrameworkDetection uses the groupId and artifactId to check for the framework name
+func (o WebLogicDetector) DoFrameworkDetection(language *model.Language, config string) {
+ if hasFwk, _ := hasFramework(config, "com.oracle.weblogic", ""); hasFwk {
+ language.Frameworks = append(language.Frameworks, "WebLogic")
+ }
+}
+
+func (o WebLogicDetector) DoPortsDetection(component *model.Component, ctx *context.Context) {
+}
diff --git a/pkg/apis/enricher/framework/java/websphere_detector.go b/pkg/apis/enricher/framework/java/websphere_detector.go
new file mode 100644
index 00000000..c3f83c36
--- /dev/null
+++ b/pkg/apis/enricher/framework/java/websphere_detector.go
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v2.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v20.html
+ *
+ * Contributors:
+ * Red Hat, Inc.
+ ******************************************************************************/
+
+package enricher
+
+import (
+ "context"
+
+ "github.com/devfile/alizer/pkg/apis/model"
+)
+
+type WebSphereDetector struct{}
+
+func (o WebSphereDetector) GetSupportedFrameworks() []string {
+ return []string{"WebSphere"}
+}
+
+// DoFrameworkDetection uses the groupId and artifactId to check for the framework name
+func (o WebSphereDetector) DoFrameworkDetection(language *model.Language, config string) {
+ hasWebSphereFwk, _ := hasFramework(config, "com.ibm.websphere.appserver", "")
+ hasOpenLibertyFwk, _ := hasFramework(config, "io.openliberty", "")
+ if hasWebSphereFwk && !hasOpenLibertyFwk {
+ language.Frameworks = append(language.Frameworks, "WebSphere")
+ }
+}
+
+func (o WebSphereDetector) DoPortsDetection(component *model.Component, ctx *context.Context) {
+}
diff --git a/pkg/apis/enricher/java_enricher.go b/pkg/apis/enricher/java_enricher.go
index fdbef64f..23922e50 100644
--- a/pkg/apis/enricher/java_enricher.go
+++ b/pkg/apis/enricher/java_enricher.go
@@ -34,6 +34,8 @@ func getJavaFrameworkDetectors() []FrameworkDetectorWithConfigFile {
&framework.VertxDetector{},
&framework.WildFlyDetector{},
&framework.JBossEAPDetector{},
+ &framework.WebSphereDetector{},
+ &framework.WebLogicDetector{},
}
}
diff --git a/resources/projects/weblogic-app/pom.xml b/resources/projects/weblogic-app/pom.xml
new file mode 100644
index 00000000..342347fe
--- /dev/null
+++ b/resources/projects/weblogic-app/pom.xml
@@ -0,0 +1,52 @@
+
+ 4.0.0
+
+ com.example
+ weblogic-app
+ 1.0.0
+ war
+
+
+ 8
+ 8
+ 10.3.6.0
+
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+ provided
+
+
+
+
+
+
+ maven-war-plugin
+ 3.4.0
+
+ false
+
+
+
+ com.oracle.weblogic
+ weblogic-maven-plugin
+ ${weblogic.plugin.version}
+
+ t3://localhost:7001
+ weblogic
+ Welcome1
+ ${project.build.directory}/${project.build.finalName}.war
+ AdminServer
+ ${project.artifactId}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/projects/websphere-app/pom.xml b/resources/projects/websphere-app/pom.xml
new file mode 100644
index 00000000..e365f127
--- /dev/null
+++ b/resources/projects/websphere-app/pom.xml
@@ -0,0 +1,44 @@
+
+ 4.0.0
+
+ com.example
+ websphere-app
+ 1.0.0
+ war
+
+
+ 8
+ 8
+ 1.1.108
+
+
+
+
+ com.ibm.websphere.appserver.api
+ com.ibm.websphere.appserver.api.servlet
+ ${websphere.api.version}
+ provided
+
+
+ javax.servlet
+ javax.servlet-api
+ 4.0.1
+ provided
+
+
+
+
+
+
+ maven-war-plugin
+ 3.4.0
+
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/test/apis/component_recognizer_test.go b/test/apis/component_recognizer_test.go
index 0fc24d75..f49a4b56 100644
--- a/test/apis/component_recognizer_test.go
+++ b/test/apis/component_recognizer_test.go
@@ -104,6 +104,14 @@ func TestComponentDetectionOnOpenLiberty(t *testing.T) {
isComponentsInProject(t, "open-liberty", 1, "java", "openliberty")
}
+func TestComponentDetectionOnWebSphere(t *testing.T) {
+ isComponentsInProject(t, "websphere-app", 1, "java", "websphere-app")
+}
+
+func TestComponentDetectionOnWebLogic(t *testing.T) {
+ isComponentsInProject(t, "weblogic-app", 1, "java", "weblogic-app")
+}
+
func TestComponentDetectionOnQuarkus(t *testing.T) {
isComponentsInProject(t, "quarkus", 1, "java", "code-with-quarkus-maven")
}
@@ -423,7 +431,7 @@ func TestComponentDetectionWithGitIgnoreRule(t *testing.T) {
func TestComponentDetectionMultiProjects(t *testing.T) {
components := getComponentsFromTestProject(t, "")
- nComps := 71
+ nComps := 73
if len(components) != nComps {
t.Errorf("Expected %v components but found %v", strconv.Itoa(nComps), strconv.Itoa(len(components)))
}