Skip to content

Commit

Permalink
[maven-release-plugin] copy for tag appassembler-1.8.1
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/tags/appassembler-1.8.1@19877 52ab4f32-60fc-0310-b215-8acea882cd1b
  • Loading branch information
khmarbaise committed Jul 13, 2014
2 parents 369bc42 + a13a52d commit 5b8666b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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!',
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ public void createBinScript( String platformName, Daemon daemon, File outputDire
FileWriter out = null;
File binFile;


try
{
in = getScriptTemplate( platformName, daemon );
Expand Down Expand Up @@ -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() )
{
// give up
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 );
}
Expand All @@ -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 );
}
}
}
Expand Down

0 comments on commit 5b8666b

Please sign in to comment.