From a6a4189ac5a9528420f84972fcbf7ff808e1ae6f Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sat, 12 Jul 2014 20:13:16 +0000 Subject: [PATCH 1/6] [maven-release-plugin] prepare for next development iteration git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/appassembler@19869 52ab4f32-60fc-0310-b215-8acea882cd1b --- appassembler-booter/pom.xml | 2 +- appassembler-maven-plugin/pom.xml | 2 +- appassembler-model/pom.xml | 2 +- pom.xml | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/appassembler-booter/pom.xml b/appassembler-booter/pom.xml index 709eb228..789b2b01 100644 --- a/appassembler-booter/pom.xml +++ b/appassembler-booter/pom.xml @@ -29,7 +29,7 @@ appassembler org.codehaus.mojo.appassembler - 1.8.1 + 1.8.2-SNAPSHOT appassembler-booter diff --git a/appassembler-maven-plugin/pom.xml b/appassembler-maven-plugin/pom.xml index f7d5dd53..9d58b79c 100644 --- a/appassembler-maven-plugin/pom.xml +++ b/appassembler-maven-plugin/pom.xml @@ -16,7 +16,7 @@ appassembler org.codehaus.mojo.appassembler - 1.8.1 + 1.8.2-SNAPSHOT org.codehaus.mojo diff --git a/appassembler-model/pom.xml b/appassembler-model/pom.xml index b2bb199b..712ff8e4 100644 --- a/appassembler-model/pom.xml +++ b/appassembler-model/pom.xml @@ -28,7 +28,7 @@ appassembler org.codehaus.mojo.appassembler - 1.8.1 + 1.8.2-SNAPSHOT appassembler-model Appassembler :: Model diff --git a/pom.xml b/pom.xml index 1fab64ae..9e37afeb 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ appassembler pom org.codehaus.mojo.appassembler - 1.8.1 + 1.8.2-SNAPSHOT Appassembler 2006 @@ -125,9 +125,9 @@ appassembler-maven-plugin - scm:svn:http://svn.codehaus.org/mojo/tags/appassembler-1.8.1 - scm:svn:https://svn.codehaus.org/mojo/tags/appassembler-1.8.1 - http://fisheye.codehaus.org/browse/mojo/tags/appassembler-1.8.1 + scm:svn:http://svn.codehaus.org/mojo/trunk/mojo/appassembler + scm:svn:https://svn.codehaus.org/mojo/trunk/mojo/appassembler + http://fisheye.codehaus.org/browse/mojo/trunk/mojo/appassembler From b11732e5e29d7a2dabc0bfb3f05a03e58891a878 Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sun, 13 Jul 2014 14:35:11 +0000 Subject: [PATCH 2/6] [MAPPASM-234] - Fixed implementation according to permission for group/world. git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/appassembler@19871 52ab4f32-60fc-0310-b215-8acea882cd1b --- .../daemon/script/DefaultScriptGenerator.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java index fb618bd1..76cfd475 100644 --- a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java +++ b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java @@ -242,11 +242,13 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire try { // in case it already exists, make it writable. Maybe deleting would be better? - ArchiveEntryUtils.chmod( binFile, 0777, getLogger(), true ); + //NOTE: To make it writable it only needs 07XX having permission for the current user but NOT 0777... + //TODO: The permissions should be made configurable. + ArchiveEntryUtils.chmod( binFile, 0755, getLogger(), true ); } catch ( ArchiverException ae ) { - // give up + throw new DaemonGeneratorException( "Failed to change permission for bin file.", ae ); } } @@ -275,11 +277,12 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire { try { - ArchiveEntryUtils.chmod( binFile, 0555, getLogger(), true ); + //TODO: The permissions should be made configurable. + ArchiveEntryUtils.chmod( binFile, 0755, getLogger(), true ); } catch ( ArchiverException ae ) { - // give up. + throw new DaemonGeneratorException( "Failed to change permission for bin file.", ae ); } } } From 4cab98ec04be52f4d88f1307ccf45529ddac3fbb Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sun, 13 Jul 2014 14:58:36 +0000 Subject: [PATCH 3/6] [MAPPASM-234] - Follow up cause my assumption was wrong. git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/appassembler@19872 52ab4f32-60fc-0310-b215-8acea882cd1b --- .../appassembler/daemon/script/DefaultScriptGenerator.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java index 76cfd475..5bd656ab 100644 --- a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java +++ b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java @@ -242,9 +242,7 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire try { // in case it already exists, make it writable. Maybe deleting would be better? - //NOTE: To make it writable it only needs 07XX having permission for the current user but NOT 0777... - //TODO: The permissions should be made configurable. - ArchiveEntryUtils.chmod( binFile, 0755, getLogger(), true ); + ArchiveEntryUtils.chmod( binFile, 0777, getLogger(), true ); } catch ( ArchiverException ae ) { From 43968d13438c2cc39e5aadaf78a28ec37acba0de Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sun, 13 Jul 2014 15:29:45 +0000 Subject: [PATCH 4/6] - Make integration tests more robust. git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/appassembler@19873 52ab4f32-60fc-0310-b215-8acea882cd1b --- .../src/it/programNameDuplicateTest/verify.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appassembler-maven-plugin/src/it/programNameDuplicateTest/verify.groovy b/appassembler-maven-plugin/src/it/programNameDuplicateTest/verify.groovy index 37e888ee..b10fdb27 100644 --- a/appassembler-maven-plugin/src/it/programNameDuplicateTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/programNameDuplicateTest/verify.groovy @@ -53,11 +53,13 @@ println "ProjectVersion:" + projectVersion def buildLogFile = new File( basedir, "build.log"); -if (mavenVersion.equals("3.0.4") || mavenVersion.equals("3.0.5") || mavenVersion.equals( "3.1.0" ) || mavenVersion.equals( "3.1.1" ) || mavenVersion.equals( "3.2.1" ) || mavenVersion.equals( "3.2.2" )) { +//All Maven 3.X versions +if (mavenVersion.startsWith("3.")) { t.checkExistenceAndContentOfAFile(buildLogFile, [ '[ERROR] Failed to execute goal org.codehaus.mojo:appassembler-maven-plugin:' + projectVersion + ':assemble (default) on project programNameDuplicate-test: The program id: program-01-test exists more than once! -> [Help 1]', ]); } else { + //Maven 2.X output looks different... t.checkExistenceAndContentOfAFile(buildLogFile, [ 'org.apache.maven.BuildFailureException: The program id: program-01-test exists more than once!', ]); From a1942ad24db29e3bf6326fd0e357693e03e531fb Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sun, 13 Jul 2014 17:10:43 +0000 Subject: [PATCH 5/6] - Make integration tests more robust. git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/appassembler@19874 52ab4f32-60fc-0310-b215-8acea882cd1b --- .../daemon/script/DefaultScriptGenerator.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java index 5bd656ab..7f4a6e12 100644 --- a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java +++ b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/script/DefaultScriptGenerator.java @@ -165,7 +165,6 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire FileWriter out = null; File binFile; - try { in = getScriptTemplate( platformName, daemon ); @@ -239,21 +238,24 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire binFile = new File( binDir, programName + platform.getBinFileExtension() ); if ( Platform.UNIX_NAME.equals( platformName ) ) { - try - { - // in case it already exists, make it writable. Maybe deleting would be better? - ArchiveEntryUtils.chmod( binFile, 0777, getLogger(), true ); - } - catch ( ArchiverException ae ) + // Only in case of an existing file it does make sense + if ( binFile.exists() ) { - throw new DaemonGeneratorException( "Failed to change permission for bin file.", ae ); + try + { + // in case it already exists, make it writable. Maybe deleting would be better? + ArchiveEntryUtils.chmod( binFile, 0777, getLogger(), true ); + } + catch ( ArchiverException ae ) + { + throw new DaemonGeneratorException( "Failed to change permission for bin file.", ae ); + } } } - out = new FileWriter( binFile ); - getLogger().debug( - "Writing shell file for platform '" + platform.getName() + "' to '" + binFile.getAbsolutePath() + "'." ); + getLogger().debug( "Writing shell file for platform '" + platform.getName() + "' to '" + + binFile.getAbsolutePath() + "'." ); IOUtil.copy( interpolationFilterReader, out ); } @@ -275,7 +277,7 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire { try { - //TODO: The permissions should be made configurable. + // TODO: The permissions should be made configurable. ArchiveEntryUtils.chmod( binFile, 0755, getLogger(), true ); } catch ( ArchiverException ae ) From a13a52d1b1adbd7f2a382ad2152455f14a73b824 Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sun, 13 Jul 2014 17:58:16 +0000 Subject: [PATCH 6/6] [maven-release-plugin] prepare release appassembler-1.8.1 git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/appassembler@19876 52ab4f32-60fc-0310-b215-8acea882cd1b --- appassembler-booter/pom.xml | 2 +- appassembler-maven-plugin/pom.xml | 2 +- appassembler-model/pom.xml | 2 +- pom.xml | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/appassembler-booter/pom.xml b/appassembler-booter/pom.xml index 789b2b01..709eb228 100644 --- a/appassembler-booter/pom.xml +++ b/appassembler-booter/pom.xml @@ -29,7 +29,7 @@ appassembler org.codehaus.mojo.appassembler - 1.8.2-SNAPSHOT + 1.8.1 appassembler-booter diff --git a/appassembler-maven-plugin/pom.xml b/appassembler-maven-plugin/pom.xml index 9d58b79c..f7d5dd53 100644 --- a/appassembler-maven-plugin/pom.xml +++ b/appassembler-maven-plugin/pom.xml @@ -16,7 +16,7 @@ appassembler org.codehaus.mojo.appassembler - 1.8.2-SNAPSHOT + 1.8.1 org.codehaus.mojo diff --git a/appassembler-model/pom.xml b/appassembler-model/pom.xml index 712ff8e4..b2bb199b 100644 --- a/appassembler-model/pom.xml +++ b/appassembler-model/pom.xml @@ -28,7 +28,7 @@ appassembler org.codehaus.mojo.appassembler - 1.8.2-SNAPSHOT + 1.8.1 appassembler-model Appassembler :: Model diff --git a/pom.xml b/pom.xml index 9e37afeb..1fab64ae 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ appassembler pom org.codehaus.mojo.appassembler - 1.8.2-SNAPSHOT + 1.8.1 Appassembler 2006 @@ -125,9 +125,9 @@ appassembler-maven-plugin - scm:svn:http://svn.codehaus.org/mojo/trunk/mojo/appassembler - scm:svn:https://svn.codehaus.org/mojo/trunk/mojo/appassembler - http://fisheye.codehaus.org/browse/mojo/trunk/mojo/appassembler + scm:svn:http://svn.codehaus.org/mojo/tags/appassembler-1.8.1 + scm:svn:https://svn.codehaus.org/mojo/tags/appassembler-1.8.1 + http://fisheye.codehaus.org/browse/mojo/tags/appassembler-1.8.1