vmassol 2003/11/13 14:11:55 Modified: src/java/org/apache/maven DefaultProjectUnmarshaller.java DefaultProjectMarshaller.java src/java/org/apache/maven/project Project.java xdocs changes.xml Log: Added new mandatory <type> element Revision Changes Path 1.10 +5 -1 maven/src/java/org/apache/maven/DefaultProjectUnmarshaller.java Index: DefaultProjectUnmarshaller.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/DefaultProjectUnmarshaller.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- DefaultProjectUnmarshaller.java 13 Nov 2003 20:14:37 -0000 1.9 +++ DefaultProjectUnmarshaller.java 13 Nov 2003 22:11:55 -0000 1.10 @@ -113,6 +113,10 @@ { project.setGroupId( parser.nextText() ); } + else if ( parser.getName().equals( "type" ) ) + { + project.setType( parser.nextText() ); + } else if ( parser.getName().equals( "artifactId" ) ) { project.setArtifactId( parser.nextText() ); 1.10 +2 -1 maven/src/java/org/apache/maven/DefaultProjectMarshaller.java Index: DefaultProjectMarshaller.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/DefaultProjectMarshaller.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- DefaultProjectMarshaller.java 13 Nov 2003 20:14:37 -0000 1.9 +++ DefaultProjectMarshaller.java 13 Nov 2003 22:11:55 -0000 1.10 @@ -140,6 +140,7 @@ marshallRequiredString( project.getName(), "name" ); marshallString( project.getGroupId(), "groupId" ); + marshallString( project.getGroupId(), "type" ); marshallString( project.getArtifactId(), "artifactId" ); marshallRequiredString( project.getVersion(), "version" ); 1.93 +26 -1 maven/src/java/org/apache/maven/project/Project.java Index: Project.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Project.java,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- Project.java 13 Nov 2003 20:14:37 -0000 1.92 +++ Project.java 13 Nov 2003 22:11:55 -0000 1.93 @@ -201,6 +201,12 @@ /** Project group id. */ private String groupId; + /** + * Project type. Valid values are the same used for dependency types. + * Default type is "jar". + */ + private String type = "jar"; + /** File that this POM object was derived from. */ private File file; @@ -337,6 +343,25 @@ return groupId; } + /** + * Set the project type. + * + * @param type Project type. Valid project types are the same as those used + * for dependency types. + */ + public void setType( String type ) + { + this.type = StringTool.trim(type); + } + + /** + * @return the project type + */ + public String getType() + { + return this.type; + } + /** * Add a plugin context to the list of project's plugin contexts. * 1.16 +11 -3 maven/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven/xdocs/changes.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- changes.xml 13 Nov 2003 20:14:37 -0000 1.15 +++ changes.xml 13 Nov 2003 22:11:55 -0000 1.16 @@ -9,9 +9,17 @@ <release version="1.0RC2" date="in CVS"> <action dev="vmassol" type="add"> - Deprecated <currentVersion> element. It is now replaced by the - <version> element. Created new version 4 of the POM and added - support for several POM versions. + Added new mandatory <code><type></code> element in POM version 4. + </action> + <action dev="vmassol" type="remove"> + Removed <code><versions></code>/<code><version></code> + element from POM version 4. It was conflicting with new + <code><version></code> element. + </action> + <action dev="vmassol" type="add"> + Deprecated <code><currentVersion></code> element. It is now + replaced by the <code><version></code> element. Created new + version 4 of the POM and added support for several POM versions. </action> </release>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]