You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2011/07/27 00:46:09 UTC
svn commit: r1151283 - in /maven/plugins/trunk/maven-eclipse-plugin/src:
main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java
test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java
Author: rfscholte
Date: Tue Jul 26 22:46:08 2011
New Revision: 1151283
URL: http://svn.apache.org/viewvc?rev=1151283&view=rev
Log:
Fix MECLIPSE-691: Add Websphere 7 runtime support
Added:
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java?rev=1151283&r1=1151282&r2=1151283&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/WorkspaceConfiguration.java Tue Jul 26 22:46:08 2011
@@ -1,5 +1,24 @@
package org.apache.maven.plugin.eclipse;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import java.io.File;
import java.net.URL;
@@ -111,6 +130,10 @@ public class WorkspaceConfiguration
{
if ( getDefaultDeployServerId() != null && getDefaultDeployServerId().startsWith( "was." ) )
{
+ if ( getDefaultDeployServerId().indexOf( "v7" ) >= 0 )
+ {
+ return "7.0";
+ }
if ( getDefaultDeployServerId().indexOf( "v61" ) >= 0 )
{
return "6.1";
Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java?rev=1151283&view=auto
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java (added)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java Tue Jul 26 22:46:08 2011
@@ -0,0 +1,57 @@
+package org.apache.maven.plugin.eclipse;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+public class WorkspaceConfigurationTest
+ extends TestCase
+{
+
+ public void testGetWebsphereVersion()
+ {
+ WorkspaceConfiguration wc = new WorkspaceConfiguration();
+ // Websphere Application Servers
+ final String was_express_v51 = "was.express.v51";
+ wc.setDefaultDeployServerId( was_express_v51 );
+ assertEquals( "5.1", wc.getWebsphereVersion() );
+
+ final String was_base_v51 = "was.base.v51";
+ wc.setDefaultDeployServerId( was_base_v51 );
+ assertEquals( "5.1", wc.getWebsphereVersion() );
+
+ final String was_base_v6 = "was.base.v6";
+ wc.setDefaultDeployServerId( was_base_v6 );
+ assertEquals( "6.0", wc.getWebsphereVersion() );
+
+ final String was_base_v61 = "was.base.v61";
+ wc.setDefaultDeployServerId( was_base_v61 );
+ assertEquals( "6.1", wc.getWebsphereVersion() );
+
+ final String was_base_v7 = "was.base.v7";
+ wc.setDefaultDeployServerId( was_base_v7 );
+ assertEquals( "7.0", wc.getWebsphereVersion() );
+
+ // Websphere Portals
+ //wps.base.v51
+ //wps.base.v60
+ //wps.base.v61
+ }
+}