mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-10-01 14:41:57 +00:00
[maven-release-plugin] copy for tag maven-alfresco-lifecycle-3.9.0
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/tags/maven-alfresco-lifecycle-3.9.0@351 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
@@ -1,18 +1,14 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.alfresco.maven.plugin</groupId>
|
<groupId>org.alfresco.maven.plugin</groupId>
|
||||||
<artifactId>maven-amp-plugin</artifactId>
|
<artifactId>maven-amp-plugin</artifactId>
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
<name>Alfresco AMP Plugin</name>
|
<name>Alfresco AMP Plugin</name>
|
||||||
<version>3.0.3-SNAPSHOT</version>
|
<version>3.0.3</version>
|
||||||
<prerequisites>
|
|
||||||
<maven>3.0.3</maven>
|
|
||||||
</prerequisites>
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>maven-alfresco-lifecycle</artifactId>
|
<artifactId>maven-alfresco-lifecycle</artifactId>
|
||||||
<version>1.1.1-SNAPSHOT</version>
|
<version>3.9.0</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<description>
|
<description>
|
||||||
@@ -39,14 +35,14 @@
|
|||||||
<id>columbro</id>
|
<id>columbro</id>
|
||||||
<name>Gabriele Columbro</name>
|
<name>Gabriele Columbro</name>
|
||||||
<email>gabriele.columbro@alfresco.com</email>
|
<email>gabriele.columbro@alfresco.com</email>
|
||||||
<roles/>
|
<roles />
|
||||||
<organization>Alfresco</organization>
|
<organization>Alfresco</organization>
|
||||||
<organizationUrl>http://www.alfresco.com</organizationUrl>
|
<organizationUrl>http://www.alfresco.com</organizationUrl>
|
||||||
</developer>
|
</developer>
|
||||||
<developer>
|
<developer>
|
||||||
<id>rdanner</id>
|
<id>rdanner</id>
|
||||||
<name>Russ Danner</name>
|
<name>Russ Danner</name>
|
||||||
<roles/>
|
<roles />
|
||||||
<organization>Rivet Logic</organization>
|
<organization>Rivet Logic</organization>
|
||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
|
@@ -11,9 +11,7 @@ import org.codehaus.plexus.util.DirectoryScanner;
|
|||||||
import org.codehaus.plexus.util.StringUtils;
|
import org.codehaus.plexus.util.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the project own resources, that is:
|
* Handles the project own resources, that is:
|
||||||
@@ -31,16 +29,11 @@ public class AmpProjectPackagingTask
|
|||||||
extends AbstractAmpPackagingTask
|
extends AbstractAmpPackagingTask
|
||||||
{
|
{
|
||||||
private static final String MODULE_PROPERTIES = "module.properties";
|
private static final String MODULE_PROPERTIES = "module.properties";
|
||||||
private static final String FILE_MAPPINGS = "file-mappings.properties";
|
|
||||||
|
|
||||||
private static final String WEB_PATH = "web/";
|
private static final String WEB_PATH = "web/";
|
||||||
|
|
||||||
private static final String CONFIG_PATH = "config/";
|
private static final String CONFIG_PATH = "config/";
|
||||||
|
|
||||||
private static final String FILE_MAPPINGS_CONTENT = "# Add mapping for /WEB-INF/, since MMT doesn't support it by default\n" +
|
|
||||||
"/web/WEB-INF=/WEB-INF\n";
|
|
||||||
|
|
||||||
|
|
||||||
private Resource[] webResources = new Resource[0];
|
private Resource[] webResources = new Resource[0];
|
||||||
|
|
||||||
private final File moduleProperties;
|
private final File moduleProperties;
|
||||||
@@ -78,8 +71,6 @@ public class AmpProjectPackagingTask
|
|||||||
|
|
||||||
handeWebAppSourceDirectory( context );
|
handeWebAppSourceDirectory( context );
|
||||||
|
|
||||||
synthesiseFileMappings(context);
|
|
||||||
|
|
||||||
|
|
||||||
// Notice: this will work only in case we are copying only this AMP or this AMP is
|
// Notice: this will work only in case we are copying only this AMP or this AMP is
|
||||||
// set as last overlay of the maven-amp-plugin
|
// set as last overlay of the maven-amp-plugin
|
||||||
@@ -154,46 +145,6 @@ public class AmpProjectPackagingTask
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Synthesizes (creates) a standard file-mappings.properties file so that resources in webapp/WEB-INF
|
|
||||||
* get written to the correct location by the MMT.
|
|
||||||
*
|
|
||||||
* @param context The packaging context
|
|
||||||
* @throws MojoExecutionException if the file could not be created
|
|
||||||
*/
|
|
||||||
protected void synthesiseFileMappings(final AmpPackagingContext context)
|
|
||||||
throws MojoExecutionException
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
File fileMappings = new File(context.getAmpDirectory(), FILE_MAPPINGS);
|
|
||||||
OutputStream out = null;
|
|
||||||
|
|
||||||
fileMappings.createNewFile(); // Note: ignore if the file already exists - we simply overwrite its existing contents
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
out = new FileOutputStream(fileMappings, false);
|
|
||||||
|
|
||||||
out.write(FILE_MAPPINGS_CONTENT.getBytes());
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (out != null)
|
|
||||||
{
|
|
||||||
out.flush();
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (final IOException ioe)
|
|
||||||
{
|
|
||||||
throw new MojoExecutionException("Could not create file-mappings.properties in [" + context.getAmpDirectory().getAbsolutePath() + "]", ioe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the webapp sources.
|
* Handles the webapp sources.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user