Here is an implementation of groupId attribute.
I've detected 3 plugins that must be updated to use this attribute:
deploy, java and war (this updates are parts of the patch).
These plugins are the only ones that defines some kinds of install or
deploy goals at present.
A little correction: there is site plugin that defines deploy goal, but
I think it is better to install one site per project, not per project
group.
Another suggestion: may be dependencies specification should be changed
too to use id and groupId attributes
instead of sophisticated naming convention with + and : symbols? Do you
like this idea?
bash-2.04$ cvs -q diff -Rbu
Index: src/java/org/apache/maven/project/Project.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/java/org/apache/maven/project/
Project.java,v
retrieving revision 1.39
diff -b -u -r1.39 Project.java
--- src/java/org/apache/maven/project/Project.java 22 Aug 2002
19:40:44 -0000 1.39
+++ src/java/org/apache/maven/project/Project.java 20 Sep 2002
06:41:13 -0000
@@ -211,6 +211,11 @@
private String shortDescription;
/**
+ * Project group id.
+ */
+ private String groupId;
+
+ /**
* File that this POM object was derived from.
*/
private File file;
@@ -308,6 +313,22 @@
public String getShortDescription()
{
return shortDescription;
+ }
+
+ /**
+ * Set the project group id.
+ */
+ public void setGroupId(String groupId)
+ {
+ this.groupId = groupId;
+ }
+
+ /**
+ * Get the project group id.
+ */
+ public String getGroupId()
+ {
+ return groupId;
}
/**
Index: src/plugins-build/deploy/plugin.jelly
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/plugins-build/deploy/plugin.je
lly,v
retrieving revision 1.8
diff -b -u -r1.8 plugin.jelly
--- src/plugins-build/deploy/plugin.jelly 20 Aug 2002 01:52:25
-0000 1.8
+++ src/plugins-build/deploy/plugin.jelly 20 Sep 2002 06:41:14
-0000
@@ -57,13 +57,13 @@
<j:when test="${typeX != 'X'}">
<property
name="resolvedDirectory"
- value="${siteDirectory}/${pom.id}/${type}"
+ value="${siteDirectory}/${pom.groupId}/${type}"
/>
</j:when>
<j:otherwise>
<property
name="resolvedDirectory"
- value="${siteDirectory}/${pom.id}"
+ value="${siteDirectory}/${pom.groupId}"
/>
</j:otherwise>
</j:choose>
Index: src/plugins-build/java/plugin.jelly
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/plugins-build/java/plugin.jell
y,v
retrieving revision 1.17
diff -b -u -r1.17 plugin.jelly
--- src/plugins-build/java/plugin.jelly 20 Sep 2002 03:34:40 -0000
1.17
+++ src/plugins-build/java/plugin.jelly 20 Sep 2002 06:41:15 -0000
@@ -166,7 +166,7 @@
<m:user-check user="${maven.username}"/>
<attainGoal name="jar:snapshot"/>
<property name="maven.jar.to.deploy"
value="${maven.final.name}.jar"/>
- <property name="dir"
value="${maven.repo.central.directory}/${pom.id}/jars"/>
+ <property name="dir"
value="${maven.repo.central.directory}/${pom.groupId}/jars"/>
<deploy:artifact
artifact="${maven.build.dir}/${maven.jar.to.deploy}"
@@ -204,7 +204,7 @@
<goal name="jar:install" prereqs="java:jar"
description="Install the jar in the local repository">
- <property name="jardir__"
value="${maven.repo.local}/${pom.id}/jars"/>
+ <property name="jardir__"
value="${maven.repo.local}/${pom.groupId}/jars"/>
<mkdir dir="${jardir__}"/>
<copy
file="${maven.build.dir}/${maven.final.name}.jar"
Index: src/plugins-build/war/plugin.jelly
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/plugins-build/war/plugin.jelly
,v
retrieving revision 1.11
diff -b -u -r1.11 plugin.jelly
--- src/plugins-build/war/plugin.jelly 12 Sep 2002 01:50:27 -0000
1.11
+++ src/plugins-build/war/plugin.jelly 20 Sep 2002 06:41:16 -0000
@@ -119,7 +119,7 @@
description="Install the war in the local repository">
<property name="maven.war.install.dir"
- value="${maven.repo.local}/${pom.id}/wars"/>
+ value="${maven.repo.local}/${pom.groupId}/wars"/>
<mkdir dir="${maven.war.install.dir}"/>
<copy file="${maven.war.build.dir}/${pom.id}.war"
tofile="${maven.war.install.dir}/${maven.war.final.name}"/>
Index: src/xsd/maven-project.xsd
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/xsd/maven-project.xsd,v
retrieving revision 1.9
diff -b -u -r1.9 maven-project.xsd
--- src/xsd/maven-project.xsd 16 Sep 2002 08:31:04 -0000 1.9
+++ src/xsd/maven-project.xsd 20 Sep 2002 06:41:16 -0000
@@ -7,6 +7,7 @@
<xs:element ref="pomVersion"/>
<xs:element ref="id"/>
<xs:element ref="name"/>
+ <xs:element ref="groupId" minOccurs="0"/>
<xs:element ref="currentVersion"/>
<xs:element ref="organization"/>
<xs:element ref="inceptionYear"/>
@@ -38,6 +39,7 @@
<xs:element name="description" type='xs:string'/>
<xs:element name="distributionDirectory" type='xs:string'/>
<xs:element name="name" type='xs:string'/>
+ <xs:element name="groupId" type='xs:string'/>
<xs:element name="gumpRepositoryId" type='xs:string'/>
<xs:element name="id" type='xs:string'/>
<xs:element name="inceptionYear" type='xs:string'/>
--
Alexei Barantsev, ISP RAS
E-mail: [EMAIL PROTECTED]
ICQ : 3959207
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>