]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - maven/maven-argeo-osgi-plugin/src/main/java/org/argeo/slc/maven/plugins/osgi/AbstractBundlesPackagerMojo.java
Prepare releasing
[gpl/argeo-slc.git] / maven / maven-argeo-osgi-plugin / src / main / java / org / argeo / slc / maven / plugins / osgi / AbstractBundlesPackagerMojo.java
index 53f686099bce229a4b6b3087b90dc48964fd7062..ee3cd28a3168dd259ca02586c04a4c4ccf32b838 100644 (file)
@@ -61,6 +61,15 @@ public abstract class AbstractBundlesPackagerMojo extends AbstractOsgiMojo {
         */
        protected boolean strictManifestVersion;
 
+       /**
+        * Whether the manifest should be updated with the release version.
+        * 
+        * @parameter expression="${updateManifestWhenReleasing}"
+        *            default-value="true"
+        * @required
+        */
+       protected boolean updateManifestWhenReleasing;
+
        /**
         * Whether should fail if symbolic name does not match artifact id.
         * 
@@ -146,7 +155,7 @@ public abstract class AbstractBundlesPackagerMojo extends AbstractOsgiMojo {
                } else {
                        versionMain = project.getVersion();
                        // buildId = "R_" + sdf.format(new Date());// R for release
-                       buildId = "";
+                       buildId = "R" + sdf.format(new Date());
                }
 
                if (!versionMain.equals(versionMfMain)) {
@@ -220,20 +229,21 @@ public abstract class AbstractBundlesPackagerMojo extends AbstractOsgiMojo {
                pom.append("\t<artifactId>" + artifactId + "</artifactId>\n");
                pom.append("\t<packaging>" + packaging + "</packaging>\n");
                return pom;
-               
+
                // TODO: use the Model object e.g.: (from install plugin)
-//        Model model = new Model();
-//        model.setModelVersion( "4.0.0" );
-//        model.setGroupId( groupId );
-//        model.setArtifactId( artifactId );
-//        model.setVersion( version );
-//        model.setPackaging( packaging );
-//        model.setDescription( "POM was created from install:install-file" );
-//        fw = new FileWriter( tempFile );
-//        tempFile.deleteOnExit();
-//        new MavenXpp3Writer().write( fw, model );
-//        ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, tempFile );
-//        artifact.addMetadata( metadata );
+               // Model model = new Model();
+               // model.setModelVersion( "4.0.0" );
+               // model.setGroupId( groupId );
+               // model.setArtifactId( artifactId );
+               // model.setVersion( version );
+               // model.setPackaging( packaging );
+               // model.setDescription( "POM was created from install:install-file" );
+               // fw = new FileWriter( tempFile );
+               // tempFile.deleteOnExit();
+               // new MavenXpp3Writer().write( fw, model );
+               // ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact,
+               // tempFile );
+               // artifact.addMetadata( metadata );
 
        }