diff --git a/Changelog.txt b/Changelog.txt index 54c68c4..c1bdbc3 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -16,6 +16,7 @@ cmvn-0.1.2: module/directory * Added new build option --build-from-root to start Maven always from root project with the complete reactor (alowing to use -am and -amd options) +* Added support for finalName and targetDir in build-block cmvn-0.1.1: * Generated files now have correct default XML namespace set diff --git a/cmvncommon.conf b/cmvncommon.conf index c8314dd..c09165a 100644 --- a/cmvncommon.conf +++ b/cmvncommon.conf @@ -1,4 +1,4 @@ --val: CMVN_VERSION=0.1.2-SNAPSHOT +-val: CMVN_VERSION=0.1.2 property: maven.compiler.source=1.6 property: maven.compiler.target=1.6 diff --git a/de.tototec.tools.cmvn-executable/cmvn.conf b/de.tototec.tools.cmvn-executable/cmvn.conf index 357cd11..df3db0b 100644 --- a/de.tototec.tools.cmvn-executable/cmvn.conf +++ b/de.tototec.tools.cmvn-executable/cmvn.conf @@ -7,6 +7,7 @@ compile: org.apache.xmlbeans:xmlbeans:2.4.0;optional;exclude=net.sf.saxon:saxon runtime: org.apache.servicemix.bundles:org.apache.servicemix.bundles.saxon:9.1.0.1_1;optional runtime: org.apache.xmlbeans:xmlbeans-xpath:2.4.0;optional;exclude=net.sf.saxon:saxon +# requires released version 0.1.2 #build: finalName=cmvn-executable-${project.version} # Use the bundle-plugin because of bnd's feature of Conditional-Package diff --git a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/CmvnConfigKey.java b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/CmvnConfigKey.java index a985d21..5301455 100644 --- a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/CmvnConfigKey.java +++ b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/CmvnConfigKey.java @@ -199,6 +199,10 @@ public void read(final CmvnProjectConfig projectConfig, final KeyValue keyValue) final String oVal = option.getValue(); if (oKey.equals("sources")) { build.setSources(oVal); + } else if (oKey.equals("finalName")) { + build.setFinalName(oVal); + } else if (oKey.equals("targetDir")) { + build.setFinalName(oVal); } else { throw new RuntimeException("Unsupported build option: " + option); } diff --git a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/Config.java b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/Config.java index f122cf1..e61322c 100644 --- a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/Config.java +++ b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/Config.java @@ -1,10 +1,10 @@ package de.tototec.tools.cmvn; -// Class generated by cmvn-0.1.1 +// Class generated by cmvn-0.1.2 public abstract class Config { public static String cmvnVersion() { - return "0.1.2-SNAPSHOT"; + return "0.1.2"; } } diff --git a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/MavenPomGenerator.java b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/MavenPomGenerator.java index f662ccc..6c68b2f 100644 --- a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/MavenPomGenerator.java +++ b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/MavenPomGenerator.java @@ -152,6 +152,13 @@ private void generateBuild(final Model mvn) { if (build.getSources() != null) { mvnBuild.setSourceDirectory(build.getSources()); } + if(build.getFinalName() != null) { + mvnBuild.setFinalName(build.getFinalName()); + } + if(build.getTargetDir() != null) { + mvnBuild.setDirectory(build.getTargetDir()); + } + } protected void generatePlugins(final Model mvn, final boolean forceSystemScope) { diff --git a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/model/Build.java b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/model/Build.java index c3b525d..dda2be4 100644 --- a/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/model/Build.java +++ b/de.tototec.tools.cmvn/src/main/java/de/tototec/tools/cmvn/model/Build.java @@ -5,4 +5,6 @@ @Data public class Build { private String sources; + private String finalName; + private String targetDir; }