-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a8eb67
commit 369cde8
Showing
8 changed files
with
692 additions
and
692 deletions.
There are no files selected for viewing
402 changes: 201 additions & 201 deletions
402
src/main/java/org/apache/maven/plugin/eclipse/WorkspaceDependencyResolveMojo.java
Large diffs are not rendered by default.
Oops, something went wrong.
120 changes: 60 additions & 60 deletions
120
src/test/java/org/apache/maven/plugin/eclipse/LinkedResourceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.apache.maven.plugin.eclipse; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.codehaus.plexus.util.xml.Xpp3Dom; | ||
import org.junit.Test; | ||
|
||
public class LinkedResourceTest | ||
{ | ||
@Test | ||
public void nodeWithOnlyLocationIsAccepted() | ||
{ | ||
Xpp3Dom node = new Xpp3Dom("test"); | ||
node.addChild(new Xpp3Dom("name")); | ||
node.addChild(new Xpp3Dom("type")); | ||
|
||
Xpp3Dom location = new Xpp3Dom("location"); | ||
location.setValue("the-location"); | ||
|
||
node.addChild(location); | ||
|
||
LinkedResource lr = new LinkedResource(node); | ||
assertEquals("the-location", lr.getLocation()); | ||
} | ||
|
||
@Test | ||
public void nodeWithOnlyLocationUriIsAccepted() | ||
{ | ||
Xpp3Dom node = new Xpp3Dom("test"); | ||
node.addChild(new Xpp3Dom("name")); | ||
node.addChild(new Xpp3Dom("type")); | ||
|
||
Xpp3Dom location = new Xpp3Dom("locationURI"); | ||
location.setValue("the-location-uri"); | ||
|
||
node.addChild(location); | ||
|
||
LinkedResource lr = new LinkedResource(node); | ||
assertEquals("the-location-uri", lr.getLocationURI()); | ||
} | ||
} | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.apache.maven.plugin.eclipse; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.codehaus.plexus.util.xml.Xpp3Dom; | ||
import org.junit.Test; | ||
|
||
public class LinkedResourceTest | ||
{ | ||
@Test | ||
public void nodeWithOnlyLocationIsAccepted() | ||
{ | ||
Xpp3Dom node = new Xpp3Dom("test"); | ||
node.addChild(new Xpp3Dom("name")); | ||
node.addChild(new Xpp3Dom("type")); | ||
|
||
Xpp3Dom location = new Xpp3Dom("location"); | ||
location.setValue("the-location"); | ||
|
||
node.addChild(location); | ||
|
||
LinkedResource lr = new LinkedResource(node); | ||
assertEquals("the-location", lr.getLocation()); | ||
} | ||
|
||
@Test | ||
public void nodeWithOnlyLocationUriIsAccepted() | ||
{ | ||
Xpp3Dom node = new Xpp3Dom("test"); | ||
node.addChild(new Xpp3Dom("name")); | ||
node.addChild(new Xpp3Dom("type")); | ||
|
||
Xpp3Dom location = new Xpp3Dom("locationURI"); | ||
location.setValue("the-location-uri"); | ||
|
||
node.addChild(location); | ||
|
||
LinkedResource lr = new LinkedResource(node); | ||
assertEquals("the-location-uri", lr.getLocationURI()); | ||
} | ||
} |
114 changes: 57 additions & 57 deletions
114
src/test/java/org/apache/maven/plugin/eclipse/WorkspaceConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +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 | ||
} | ||
} | ||
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 | ||
} | ||
} |
Oops, something went wrong.