Author: fbricon
Date: 2012-03-01 06:08:03 -0500 (Thu, 01 Mar 2012)
New Revision: 39222
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java
Log:
JBIDE-11123 : remove groupId and version of maven modules. Also bumped up required maven
version to 3.0
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2012-03-01 08:58:15
UTC (rev 39221)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2012-03-01 11:08:03
UTC (rev 39222)
@@ -34,7 +34,7 @@
</properties>
<prerequisites>
- <maven>2.0.9</maven>
+ <maven>3.0</maven>
</prerequisites>
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2012-03-01
08:58:15 UTC (rev 39221)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2012-03-01
11:08:03 UTC (rev 39222)
@@ -32,7 +32,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
@@ -62,8 +61,6 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.maven.core.IJBossMavenConstants;
import org.jboss.tools.maven.core.MavenCoreActivator;
import org.jboss.tools.maven.core.ProjectUtil;
@@ -178,11 +175,7 @@
if (!pom.exists()) {
Model model = new Model();
model.setModelVersion(IJBossMavenConstants.MAVEN_MODEL_VERSION);
- model.setGroupId(m2FacetModel
- .getStringProperty(IJBossMavenConstants.GROUP_ID));
model.setArtifactId(testArtifactId);
- model.setVersion(m2FacetModel
- .getStringProperty(IJBossMavenConstants.VERSION));
model.setName(m2FacetModel.getStringProperty(IJBossMavenConstants.NAME) + " -
test"); //$NON-NLS-1$
model.setPackaging("jar"); //$NON-NLS-1$
model.setDescription(m2FacetModel
@@ -333,11 +326,7 @@
if (!pom.exists()) {
Model model = new Model();
model.setModelVersion(IJBossMavenConstants.MAVEN_MODEL_VERSION);
- model.setGroupId(m2FacetModel
- .getStringProperty(IJBossMavenConstants.GROUP_ID));
model.setArtifactId(earArtifactId);
- model.setVersion(m2FacetModel
- .getStringProperty(IJBossMavenConstants.VERSION));
model.setName(m2FacetModel.getStringProperty(IJBossMavenConstants.NAME) + " -
EAR"); //$NON-NLS-1$
model.setPackaging("ear"); //$NON-NLS-1$
model.setDescription(m2FacetModel
@@ -466,12 +455,6 @@
}
}
- private void removeRuntime(IProject project) throws CoreException {
- IFacetedProject facetedProject = ProjectFacetsManager.create( project );
- facetedProject.setRuntime(null, null);
-
- }
-
private void configureEjbProject(IDataModel m2FacetModel,
IDataModel seamFacetModel) {
IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject(ejbProjectName);
@@ -480,11 +463,7 @@
if (!pom.exists()) {
Model model = new Model();
model.setModelVersion(IJBossMavenConstants.MAVEN_MODEL_VERSION);
- model.setGroupId(m2FacetModel
- .getStringProperty(IJBossMavenConstants.GROUP_ID));
model.setArtifactId(ejbArtifactId);
- model.setVersion(m2FacetModel
- .getStringProperty(IJBossMavenConstants.VERSION));
model.setName(m2FacetModel.getStringProperty(IJBossMavenConstants.NAME) + " -
EJB"); //$NON-NLS-1$
model.setPackaging("ejb"); //$NON-NLS-1$
model.setDescription(m2FacetModel
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java 2012-03-01
08:58:15 UTC (rev 39221)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java 2012-03-01
11:08:03 UTC (rev 39222)
@@ -47,5 +47,12 @@
}
model.setParent(parent);
}
+ //Since we add the parent, we remove the version / groupId
+ if (groupId != null && groupId.equals(model.getGroupId())) {
+ model.setGroupId(null);
+ }
+ if (version != null && version.equals(model.getVersion())) {
+ model.setVersion(null);
+ }
}
}
\ No newline at end of file
Show replies by date