Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pom.xml is not created when converting an EAR project that uses root …

…as content directory

- I wrote 100% of the code;
- I have the right to contribute the code to Eclipse;
- The file header contains the appropriate License header.
  • Loading branch information...
commit 7fd0172edad7b4ebd16f406ac9eb89b506ced6b0 1 parent 396a7ff
@RobertoSanchezHerrera RobertoSanchezHerrera authored fbricon committed
View
23 org.eclipse.m2e.wtp.tests/projects/conversion/EARNoContent/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>EARNoContent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ </natures>
+</projectDescription>
View
5 ...m2e.wtp.tests/projects/conversion/EARNoContent/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="EARNoContent">
+ <wb-resource deploy-path="/" source-path="/" tag="defaultRootSource"/>
+ </wb-module>
+</project-modules>
View
5 .../projects/conversion/EARNoContent/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.ear"/>
+ <installed facet="jst.ear" version="6.0"/>
+</faceted-project>
View
18 org.eclipse.m2e.wtp.tests/projects/conversion/EARNoContent/expectedPom.xml
@@ -0,0 +1,18 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>EARNoContent</groupId>
+ <artifactId>EARNoContent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>ear</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <version>6</version>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
23 org.eclipse.m2e.wtp.tests/projects/conversion/EARNoContentNoTag/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>EARNoContentNoTag</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ </natures>
+</projectDescription>
View
5 ...tp.tests/projects/conversion/EARNoContentNoTag/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="EARNoContentNoTag">
+ <wb-resource deploy-path="/" source-path="/"/>
+ </wb-module>
+</project-modules>
View
5 ...ects/conversion/EARNoContentNoTag/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.ear"/>
+ <installed facet="jst.ear" version="6.0"/>
+</faceted-project>
View
18 org.eclipse.m2e.wtp.tests/projects/conversion/EARNoContentNoTag/expectedPom.xml
@@ -0,0 +1,18 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>EARNoContentNoTag</groupId>
+ <artifactId>EARNoContentNoTag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>ear</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <version>6</version>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
11 ...ipse.m2e.wtp.tests/src/org/eclipse/m2e/wtp/tests/conversion/EarProjectConversionTest.java
@@ -48,6 +48,17 @@ public void testNoCustomizationNeededProjectConversion() throws Exception {
testProjectConversion("ear13");
}
+ public void testEarWithoutContentFolder() throws Exception {
+ //Checks an EAR without a content folder can be converted and the pom.xml is created.
+ testProjectConversion("EARNoContent");
+ }
+
+ public void testEarWithoutContentFolderWithoutDefaultRootSourceTag() throws Exception {
+ // Checks an EAR without a content folder, and without the attribute tag="defaultRootSource
+ // in .settings/org.eclipse.wst.common.component can be converted and the pom.xml is created.
+ testProjectConversion("EARNoContentNoTag");
+ }
+
protected void checkForErrors(IProject project) throws CoreException {
List<IMarker> markers = findErrorMarkers(project);
Iterator<IMarker> ite = markers.iterator();
Please sign in to comment.
Something went wrong with that request. Please try again.