Fix javadoc errors

- Fix the javadoc error raised by the javadoc-maven-plugin.
- Configure the javadoc-maven-plugin to accept custom javadoc annotations
from maven mojo development.
This commit is contained in:
Jose Luis Osorno
2019-01-28 12:30:05 +01:00
parent b366ae3ddd
commit 766847585e
17 changed files with 129 additions and 44 deletions

View File

@@ -51,7 +51,7 @@ public class SpringContextHolder implements ApplicationContextAware {
/** /**
* Return the singleton instance * Return the singleton instance
* *
* @return * @return the singleton instance
*/ */
public static SpringContextHolder Instance() { public static SpringContextHolder Instance() {
return springContextHolderInstance; return springContextHolderInstance;

View File

@@ -46,6 +46,7 @@ import javax.xml.parsers.ParserConfigurationException;
import java.io.*; import java.io.*;
/** /**
* <p>
* This is a JUnit test runner that is designed to work with an Alfresco repository. * This is a JUnit test runner that is designed to work with an Alfresco repository.
* It detects if it's executing a test inside of a running Alfresco instance. If that * It detects if it's executing a test inside of a running Alfresco instance. If that
* is the case the tests are all run normally. If however the test is being run from * is the case the tests are all run normally. If however the test is being run from
@@ -54,14 +55,15 @@ import java.io.*;
* test an HTTP request is made to a Web Script in a running Alfresco instance. This * test an HTTP request is made to a Web Script in a running Alfresco instance. This
* Web Script runs the test and returns enough information to this class so we can * Web Script runs the test and returns enough information to this class so we can
* emulate having run the test locally. * emulate having run the test locally.
* <p/> * </p>
* <p>
* By doing this, we are able to create Integration Tests (IT) using standard JUnit * By doing this, we are able to create Integration Tests (IT) using standard JUnit
* capabilities. These can then be run from our IDEs with the associated visualizations, * capabilities. These can then be run from our IDEs with the associated visualizations,
* support for re-running failed tests, etc. * support for re-running failed tests, etc.
* <p/> * </p>
* Integration testing framework donated by Zia Consulting * Integration testing framework donated by Zia Consulting
* *
* @author Bindu Wavell <bindu@ziaconsulting.com> * @author Bindu Wavell (bindu@ziaconsulting.com)
* @author martin.bergljung@alfresco.com (some editing) * @author martin.bergljung@alfresco.com (some editing)
* @since 3.0 * @since 3.0
*/ */
@@ -104,8 +106,8 @@ public class AlfrescoTestRunner extends BlockJUnit4ClassRunner {
* Call a remote Alfresco server and have the test run there. * Call a remote Alfresco server and have the test run there.
* *
* @param method the test method to run * @param method the test method to run
* @param notifier * @param notifier given @{@link RunNotifier} to notify the result of the test
* @param desc * @param desc given @{@link Description} of the test to run
*/ */
protected void callProxiedChild(FrameworkMethod method, RunNotifier notifier, Description desc) { protected void callProxiedChild(FrameworkMethod method, RunNotifier notifier, Description desc) {
notifier.fireTestStarted(desc); notifier.fireTestStarted(desc);
@@ -232,8 +234,8 @@ public class AlfrescoTestRunner extends BlockJUnit4ClassRunner {
* Check the @Remote config on the test class to see where the * Check the @Remote config on the test class to see where the
* Alfresco Repo is running * Alfresco Repo is running
* *
* @param method * @param method given @{@link FrameworkMethod} to be executed
* @return * @return the ACS endpoint
*/ */
protected String getContextRoot(FrameworkMethod method) { protected String getContextRoot(FrameworkMethod method) {
Class<?> declaringClass = method.getMethod().getDeclaringClass(); Class<?> declaringClass = method.getMethod().getDeclaringClass();

View File

@@ -24,14 +24,15 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* <p>
* By default the ${@link AlfrescoTestRunner} will attempt to find a * By default the ${@link AlfrescoTestRunner} will attempt to find a
* running Alfresco instance at http://localhost:8080/alfresco * running Alfresco instance at http://localhost:8080/alfresco
* This annotation can be applied to a test class to have the * This annotation can be applied to a test class to have the
* proxy calls go to a different host/port. * proxy calls go to a different host/port.
* <p/> * </p>
* Integration testing framework donated by Zia Consulting. * Integration testing framework donated by Zia Consulting.
* *
* @author Bindu Wavell <bindu@ziaconsulting.com> * @author Bindu Wavell (bindu@ziaconsulting.com)
* @since 3.0 * @since 3.0
*/ */
@Target(ElementType.TYPE) @Target(ElementType.TYPE)

View File

@@ -35,14 +35,15 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* <p>
* This Web Script works in consort with the ${@link AlfrescoTestRunner}. When a test is run from an IDE or * This Web Script works in consort with the ${@link AlfrescoTestRunner}. When a test is run from an IDE or
* command line, the Alfresco test runner sends a proxied request to perform the test to this script. This runs * command line, the Alfresco test runner sends a proxied request to perform the test to this script. This runs
* the test and wraps the results up so that the test initiator can be fooled into thinking they are * the test and wraps the results up so that the test initiator can be fooled into thinking they are
* running the tests locally. * running the tests locally.
* <p/> * </p>
* Integration testing framework donated by Zia Consulting. * Integration testing framework donated by Zia Consulting.
* *
* @author Bindu Wavell <bindu@ziaconsulting.com> * @author Bindu Wavell (bindu@ziaconsulting.com)
* @author martin.bergljung@alfresco.com (some editing) * @author martin.bergljung@alfresco.com (some editing)
* @since 3.0 * @since 3.0
*/ */

View File

@@ -164,6 +164,8 @@ public abstract class AbstractRefreshWebappMojo extends AbstractMojo {
/** /**
* Perform a Refresh of Web Scripts container in webapp. * Perform a Refresh of Web Scripts container in webapp.
* Called by specific refresh mojo implementation. * Called by specific refresh mojo implementation.
*
* @param url the relative path to refresh webscripts
*/ */
protected void refreshWebScripts(String url) { protected void refreshWebScripts(String url) {
// Create the Refresh URL for the Alfresco Tomcat server // Create the Refresh URL for the Alfresco Tomcat server
@@ -184,6 +186,8 @@ public abstract class AbstractRefreshWebappMojo extends AbstractMojo {
/** /**
* Perform a Clear Dependency Caches call on Share webapp. * Perform a Clear Dependency Caches call on Share webapp.
* Called by specific refresh mojo implementation, currently only applicable to Share webapp. * Called by specific refresh mojo implementation, currently only applicable to Share webapp.
*
* @param url the relative path to clear cache
*/ */
protected void clearDependencyCaches(String url) { protected void clearDependencyCaches(String url) {
// Create the Clear Cache URL for the Alfresco Tomcat server // Create the Clear Cache URL for the Alfresco Tomcat server

View File

@@ -427,6 +427,8 @@ public abstract class AbstractRunMojo extends AbstractMojo {
/** /**
* Get the Tomcat port. By default the port is changed by using the maven.alfresco.tomcat.port property * Get the Tomcat port. By default the port is changed by using the maven.alfresco.tomcat.port property
* but for legacy and external configuration purposes maven.tomcat.port will override if defined * but for legacy and external configuration purposes maven.tomcat.port will override if defined
*
* @return the Tomcat port
*/ */
protected String getPort() { protected String getPort() {
String port = tomcatPort; String port = tomcatPort;
@@ -439,7 +441,9 @@ public abstract class AbstractRunMojo extends AbstractMojo {
} }
/** /**
* Check if Tomcat is already running.
* *
* @return <code>true</code> if Tomcat is already running, <code>false</code> otherwise
*/ */
protected boolean tomcatIsRunning() { protected boolean tomcatIsRunning() {
@@ -464,7 +468,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Download and unpack the Solr 4 configuration as we don't have it in the project. * Download and unpack the Solr 4 configuration as we don't have it in the project.
* It will reside under /alf_data_dev/solr * It will reside under /alf_data_dev/solr
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears unpacking the Solr configuration
*/ */
protected void unpackSolrConfig() throws MojoExecutionException { protected void unpackSolrConfig() throws MojoExecutionException {
getLog().info("Unpacking Solr config"); getLog().info("Unpacking Solr config");
@@ -497,7 +501,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* For windows paths, convert single \ to / for the ${alfresco.solr.data.dir} path, * For windows paths, convert single \ to / for the ${alfresco.solr.data.dir} path,
* by default it will be c:\bla\, we need forward slash or double backslash. * by default it will be c:\bla\, we need forward slash or double backslash.
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears fixing the Solr home path
*/ */
protected void fixSolrHomePath() throws MojoExecutionException { protected void fixSolrHomePath() throws MojoExecutionException {
getLog().info("Fix Solr Home Path to work in Windows"); getLog().info("Fix Solr Home Path to work in Windows");
@@ -524,7 +528,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Copy custom solr configuration files over, so a * Copy custom solr configuration files over, so a
* developer can overwrite any files needed * developer can overwrite any files needed
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears copying the Solr custom configuration
*/ */
protected void copySolrCustomConfig() throws MojoExecutionException { protected void copySolrCustomConfig() throws MojoExecutionException {
getLog().info("Copying custom Solr config"); getLog().info("Copying custom Solr config");
@@ -553,7 +557,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Replace property placeholders in configuration files for the cores, so the * Replace property placeholders in configuration files for the cores, so the
* index files can be found for each core when Solr starts up. * index files can be found for each core when Solr starts up.
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears replacing the Solr configuration properties
*/ */
protected void replaceSolrConfigProperties() throws MojoExecutionException { protected void replaceSolrConfigProperties() throws MojoExecutionException {
getLog().info("Replacing Solr config properties"); getLog().info("Replacing Solr config properties");
@@ -601,7 +605,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* If we are in Alfresco version 4.2 or younger the Solr 1.0 WAR is not available as Maven artifact, just * If we are in Alfresco version 4.2 or younger the Solr 1.0 WAR is not available as Maven artifact, just
* as part of a ZIP file, so install it locally so we can deploy from embedded tomcat * as part of a ZIP file, so install it locally so we can deploy from embedded tomcat
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears installing Solr10 in the local repository
*/ */
protected void installSolr10InLocalRepo() throws MojoExecutionException { protected void installSolr10InLocalRepo() throws MojoExecutionException {
if (isPlatformVersionLtOrEqTo42()) { if (isPlatformVersionLtOrEqTo42()) {
@@ -715,12 +719,13 @@ public abstract class AbstractRunMojo extends AbstractMojo {
} }
/** /**
* <p>
* Replaces web.xml where applicable in platform webapp (alfresco.war), * Replaces web.xml where applicable in platform webapp (alfresco.war),
* commenting out the security-constraints. * commenting out the security-constraints.
* <p/> * </p>
* This is only needed for 4.2, 5.0 (5.1 handles it automatically when turning off ssl via props) * This is only needed for 4.2, 5.0 (5.1 handles it automatically when turning off ssl via props)
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears commenting out the security configuration
*/ */
protected void commentOutSecureCommsInPlatformWebXml() throws MojoExecutionException { protected void commentOutSecureCommsInPlatformWebXml() throws MojoExecutionException {
if (isPlatformVersionGtOrEqTo51()) { if (isPlatformVersionGtOrEqTo51()) {
@@ -764,7 +769,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* enterprise db config) that will be used when running Alfresco. It contains database connection parameters and * enterprise db config) that will be used when running Alfresco. It contains database connection parameters and
* other general configuration for Alfresco Repository (alfresco.war) * other general configuration for Alfresco Repository (alfresco.war)
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears copying the Alfresco global properties file
*/ */
protected void copyAlfrescoGlobalProperties() throws MojoExecutionException { protected void copyAlfrescoGlobalProperties() throws MojoExecutionException {
getLog().info("Copying and filtering alfresco-global-*.properties files to target/test-classes"); getLog().info("Copying and filtering alfresco-global-*.properties files to target/test-classes");
@@ -856,7 +861,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Rename the configured database specific alfresco-global-*.properties file to * Rename the configured database specific alfresco-global-*.properties file to
* alfresco-global.properties so it will be used during Tomcat run. * alfresco-global.properties so it will be used during Tomcat run.
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears renaming the alfresco global properties
*/ */
protected void renameAlfrescoGlobalProperties() throws MojoExecutionException { protected void renameAlfrescoGlobalProperties() throws MojoExecutionException {
String alfrescoGlobalFilePath = project.getBuild().getTestOutputDirectory() + "/alfresco-global-"; String alfrescoGlobalFilePath = project.getBuild().getTestOutputDirectory() + "/alfresco-global-";
@@ -904,7 +909,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists. * Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists.
* It is not enough to have it on the test classpath, then it will start up as Trial license... * It is not enough to have it on the test classpath, then it will start up as Trial license...
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears copying the Alfresco license
*/ */
protected void copyAlfrescoLicense() throws MojoExecutionException { protected void copyAlfrescoLicense() throws MojoExecutionException {
if (alfrescoEdition.equals(ALFRESCO_COMMUNITY_EDITION)) { if (alfrescoEdition.equals(ALFRESCO_COMMUNITY_EDITION)) {
@@ -943,7 +948,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
/** /**
* Copy the Activiti Log4J Dev config into the activitiApp-war/WEB-INF/classes dir. * Copy the Activiti Log4J Dev config into the activitiApp-war/WEB-INF/classes dir.
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears copying the activity Log4J dev configuration
*/ */
protected void copyActivitiLog4JDevConfig() throws MojoExecutionException { protected void copyActivitiLog4JDevConfig() throws MojoExecutionException {
final String warOutputDir = getWarOutputDir(ACTIVITI_APP_WAR_PREFIX_NAME); final String warOutputDir = getWarOutputDir(ACTIVITI_APP_WAR_PREFIX_NAME);
@@ -978,7 +983,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
/** /**
* Copy Share Config Custom in order to have global overrides for development and dynamic port * Copy Share Config Custom in order to have global overrides for development and dynamic port
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears copying share config custom file
*/ */
protected void copyShareConfigCustom() throws MojoExecutionException { protected void copyShareConfigCustom() throws MojoExecutionException {
final String warOutputDir = getWarOutputDir(SHARE_WAR_PREFIX_NAME); final String warOutputDir = getWarOutputDir(SHARE_WAR_PREFIX_NAME);
@@ -1019,7 +1024,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* There is no custom classpath resolve mechanism for Share log4j, * There is no custom classpath resolve mechanism for Share log4j,
* to log custom stuff overriding standard log4j.properties is needed. * to log custom stuff overriding standard log4j.properties is needed.
* *
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears copying the share log4j configuration
*/ */
protected void copyShareLog4jConfig() throws MojoExecutionException { protected void copyShareLog4jConfig() throws MojoExecutionException {
if (!useCustomShareLog4jConfig) { if (!useCustomShareLog4jConfig) {
@@ -1059,7 +1064,9 @@ public abstract class AbstractRunMojo extends AbstractMojo {
/** /**
* Copy and Build hotswap-agent.properties * Copy and Build hotswap-agent.properties
* *
* @throws MojoExecutionException * @param warPrefix path to the war root directory
*
* @throws MojoExecutionException when any problem appears copying hotswap agent properties
*/ */
protected void copyHotswapAgentProperties(String warPrefix) throws MojoExecutionException { protected void copyHotswapAgentProperties(String warPrefix) throws MojoExecutionException {
if ( copyHotswapAgentConfig == false ) { if ( copyHotswapAgentConfig == false ) {
@@ -1093,6 +1100,8 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Build the customized Platform webapp (i.e. the Repository, alfresco.war) * Build the customized Platform webapp (i.e. the Repository, alfresco.war)
* that should be deployed by Tomcat by applying all AMPs and JARs from * that should be deployed by Tomcat by applying all AMPs and JARs from
* the {@code <platformModules> } configuration. * the {@code <platformModules> } configuration.
*
* @throws MojoExecutionException when any problem appears building the platform war
*/ */
protected void buildPlatformWar() throws MojoExecutionException { protected void buildPlatformWar() throws MojoExecutionException {
buildCustomWarInDir(PLATFORM_WAR_PREFIX_NAME, platformModules, buildCustomWarInDir(PLATFORM_WAR_PREFIX_NAME, platformModules,
@@ -1114,6 +1123,8 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Build the customized Share webapp (i.e. the share.war) * Build the customized Share webapp (i.e. the share.war)
* that should be deployed by Tomcat by applying all AMPs and JARs from * that should be deployed by Tomcat by applying all AMPs and JARs from
* the {@code <shareModules> } configuration. * the {@code <shareModules> } configuration.
*
* @throws MojoExecutionException when any problem appears building the share war
*/ */
protected void buildShareWar() throws MojoExecutionException { protected void buildShareWar() throws MojoExecutionException {
buildCustomWarInDir(SHARE_WAR_PREFIX_NAME, shareModules, buildCustomWarInDir(SHARE_WAR_PREFIX_NAME, shareModules,
@@ -1136,6 +1147,8 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* Build the customized Activiti App webapp (i.e. the activiti-app.war) * Build the customized Activiti App webapp (i.e. the activiti-app.war)
* that should be deployed by Tomcat by applying all JARs from * that should be deployed by Tomcat by applying all JARs from
* the {@code <activitiModules> } configuration. * the {@code <activitiModules> } configuration.
*
* @throws MojoExecutionException when any problem appears building the activity war
*/ */
protected void buildActivitiAppWar() throws MojoExecutionException { protected void buildActivitiAppWar() throws MojoExecutionException {
buildCustomWarInDir(ACTIVITI_APP_WAR_PREFIX_NAME, activitiModules, buildCustomWarInDir(ACTIVITI_APP_WAR_PREFIX_NAME, activitiModules,
@@ -1160,7 +1173,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* @param originalWarGroupId the Maven groupId for the original war file that should be customized * @param originalWarGroupId the Maven groupId for the original war file that should be customized
* @param originalWarArtifactId the Maven artifactId for the original war file that should be customized * @param originalWarArtifactId the Maven artifactId for the original war file that should be customized
* @param originalWarVersion the Maven version for the original war file that should be customized * @param originalWarVersion the Maven version for the original war file that should be customized
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears building the custom war
*/ */
protected void buildCustomWarInDir(String warName, protected void buildCustomWarInDir(String warName,
List<ModuleDependency> modules, List<ModuleDependency> modules,
@@ -1283,7 +1296,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* *
* @param warName the name of the custom war * @param warName the name of the custom war
* @return the customized war file artifactId, to be used by the tomcat7 plugin * @return the customized war file artifactId, to be used by the tomcat7 plugin
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears packaging or installing the custom war
*/ */
protected String packageAndInstallCustomWar(String warName) throws MojoExecutionException { protected String packageAndInstallCustomWar(String warName) throws MojoExecutionException {
final String warArtifactId = "${project.artifactId}-" + warName; final String warArtifactId = "${project.artifactId}-" + warName;
@@ -1318,6 +1331,8 @@ public abstract class AbstractRunMojo extends AbstractMojo {
/** /**
* Check that a database configuration has been supplied correctly * Check that a database configuration has been supplied correctly
*
* @throws MojoExecutionException when any problem appears checking the database configuration
*/ */
protected void checkDatabaseConfig() throws MojoExecutionException { protected void checkDatabaseConfig() throws MojoExecutionException {
// Only do this check if we are running alfresco.war or activiti-app.war that needs a database. // Only do this check if we are running alfresco.war or activiti-app.war that needs a database.
@@ -1348,7 +1363,7 @@ public abstract class AbstractRunMojo extends AbstractMojo {
* configured in the SDK project. * configured in the SDK project.
* *
* @param fork true if tomcat process should be forked * @param fork true if tomcat process should be forked
* @throws MojoExecutionException * @throws MojoExecutionException when any problem appears starting tomcat
*/ */
protected void startTomcat(boolean fork) throws MojoExecutionException { protected void startTomcat(boolean fork) throws MojoExecutionException {
getLog().info("Starting Tomcat, fork = " + fork); getLog().info("Starting Tomcat, fork = " + fork);

View File

@@ -26,9 +26,10 @@ import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.MojoFailureException;
/** /**
* <p>
* Performs a AMP to WAR overlay invoking the Alfresco Repository ModuleManagementTool. * Performs a AMP to WAR overlay invoking the Alfresco Repository ModuleManagementTool.
* It therefore wraps and emulates the same WAR overlay performed by Alfresco MMT. * It therefore wraps and emulates the same WAR overlay performed by Alfresco MMT.
* <p/> * </p>
* This goal will install the AMP file(s) found in ${ampLocation} onto the WAR (or exploded WAR) found in ${warLocation} * This goal will install the AMP file(s) found in ${ampLocation} onto the WAR (or exploded WAR) found in ${warLocation}
* *
* @version $Id:$ * @version $Id:$

View File

@@ -35,12 +35,13 @@ import java.util.Properties;
import static org.twdata.maven.mojoexecutor.MojoExecutor.*; import static org.twdata.maven.mojoexecutor.MojoExecutor.*;
/** /**
* <p>
* Alfresco Plugin mojo that are used when you want to run Integration Tests. * Alfresco Plugin mojo that are used when you want to run Integration Tests.
* It will package up all the Integration Test classes and execute contained * It will package up all the Integration Test classes and execute contained
* tests with the Maven Failsafe plugin. The test classes will be added * tests with the Maven Failsafe plugin. The test classes will be added
* to the platform war so they can be executed remotely via * to the platform war so they can be executed remotely via
* the ${@link org.alfresco.rad.test.AlfrescoTestRunner} * the AlfrescoTestRunner.
* <p/> * </p>
* The Alfresco RAD module is also added to the Platform WAR so * The Alfresco RAD module is also added to the Platform WAR so
* the Alfresco Test runner classes are available. * the Alfresco Test runner classes are available.
* *

View File

@@ -21,11 +21,12 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Mojo;
/** /**
* <p>
* Refresh Alfresco Repo and Share Mojo. * Refresh Alfresco Repo and Share Mojo.
* Will refresh the Web Script container so new and changed * Will refresh the Web Script container so new and changed
* Spring Surf Web Scripts are detected. * Spring Surf Web Scripts are detected.
* Will also clear the dependency caches for web resources (CSS, JS, etc). * Will also clear the dependency caches for web resources (CSS, JS, etc).
* <p/> * </p>
* It is important to execute the refresh calls in the compile phase, * It is important to execute the refresh calls in the compile phase,
* otherwise the files will be copied after this and the refresh calls * otherwise the files will be copied after this and the refresh calls
* will not be recognized. * will not be recognized.

View File

@@ -21,10 +21,11 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Mojo;
/** /**
* <p>
* Refresh Alfresco Repository (alfresco.war) Mojo. * Refresh Alfresco Repository (alfresco.war) Mojo.
* Will refresh the Web Script container so new and changed * Will refresh the Web Script container so new and changed
* Web Scripts are detected. * Web Scripts are detected.
* <p/> * </p>
* It is important to execute the refresh calls in the compile phase, * It is important to execute the refresh calls in the compile phase,
* otherwise the files will be copied after this and the refresh calls * otherwise the files will be copied after this and the refresh calls
* will not be recognized. * will not be recognized.

View File

@@ -21,11 +21,12 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Mojo;
/** /**
* <p>
* Refresh Alfresco Share (share.war) Mojo. * Refresh Alfresco Share (share.war) Mojo.
* Will refresh the Web Script container so new and changed * Will refresh the Web Script container so new and changed
* Spring Surf Web Scripts are detected. * Spring Surf Web Scripts are detected.
* Will also clear the dependency caches for web resources (CSS, JS, etc). * Will also clear the dependency caches for web resources (CSS, JS, etc).
* <p/> * </p>
* It is important to execute the refresh calls in the compile phase, * It is important to execute the refresh calls in the compile phase,
* otherwise the files will be copied after this and the refresh calls * otherwise the files will be copied after this and the refresh calls
* will not be recognized. * will not be recognized.

View File

@@ -28,8 +28,7 @@ import org.apache.maven.project.MavenProject;
/** /**
* Removes -SNAPSHOT suffix from the version number (if present), optionally replacing it with a timestamp. * Removes -SNAPSHOT suffix from the version number (if present), optionally replacing it with a timestamp.
* The result is provided in the Maven property ${noSnapshotVersion} (name can be changed using * The result is provided in the Maven property ${noSnapshotVersion}.
* <propertyName>myCustomVersion</>).
* This feature is mostly needed to avoid Alfresco failing when installing AMP modules with non-numeric * This feature is mostly needed to avoid Alfresco failing when installing AMP modules with non-numeric
* versions. * versions.
* *
@@ -67,7 +66,7 @@ public class VersionMojo extends AbstractMojo {
/** /**
* Allows to append a custom (numeric) value to the current artifact's version, * Allows to append a custom (numeric) value to the current artifact's version,
* i.e. appending the SCM build number can be accomplished defining * i.e. appending the SCM build number can be accomplished defining
* <customVersionSuffix>${buildnumber}</customVersionSuffix> in the plugin * &lt;customVersionSuffix&gt;${buildnumber}&lt;/customVersionSuffix&gt; in the plugin
* configuration. * configuration.
* *
* @parameter property="maven.alfresco.customVersionSuffix" * @parameter property="maven.alfresco.customVersionSuffix"

View File

@@ -14,7 +14,7 @@ import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.Xpp3Dom;
/** /**
* This class provides AMP unpacking support for projects depending on AMPs * This class provides AMP unpacking support for projects depending on AMPs
* This allows for example AMPs to be specified as <overlay> in the maven-war-plugin * This allows for example AMPs to be specified as &lt;overlay&gt; in the maven-war-plugin
* @author mindthegab * @author mindthegab
* *
*/ */

View File

@@ -21,15 +21,18 @@ package org.alfresco.maven.plugin.config;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
/** /**
* <p>
* Defines an Alfresco extension module dependency (JAR or AMP) to be * Defines an Alfresco extension module dependency (JAR or AMP) to be
* overlayed on an Alfresco webapp file. * overlayed on an Alfresco webapp file.
* <p/> * </p>
* <p>
* This is so we can skip the WAR projects in the AIO project, * This is so we can skip the WAR projects in the AIO project,
* and so we can include the Share Services AMP when running * and so we can include the Share Services AMP when running
* with a simple platform JAR. * with a simple platform JAR.
* <p/> * </p>
* <p>
* This class is used by the RunMojo class. * This class is used by the RunMojo class.
* <p/> * </p>
* Alfresco Maven Plugin config looks something like this: * Alfresco Maven Plugin config looks something like this:
* <pre> * <pre>
* {@code * {@code

View File

@@ -19,8 +19,9 @@
package org.alfresco.maven.plugin.config; package org.alfresco.maven.plugin.config;
/** /**
* <p>
* Tomcat Dependency used in Embedded Tomcat Maven plugin configuration. * Tomcat Dependency used in Embedded Tomcat Maven plugin configuration.
* <p/> * </p>
* Alfresco Maven Plugin config looks something like this: * Alfresco Maven Plugin config looks something like this:
* <pre> * <pre>
* {@code * {@code

View File

@@ -18,11 +18,12 @@
package org.alfresco.maven.plugin.config; package org.alfresco.maven.plugin.config;
/** /**
* <p>
* Tomcat Webapp used in Embedded Tomcat Maven plugin configuration. * Tomcat Webapp used in Embedded Tomcat Maven plugin configuration.
* These are custom webapps that you would want to include for some reason * These are custom webapps that you would want to include for some reason
* (The {webapp artifact}.war need to be available in a Maven Repo). * (The {webapp artifact}.war need to be available in a Maven Repo).
* Note. the standard webapps are included with plugin properties such as enablePlatform and enableShare. * Note. the standard webapps are included with plugin properties such as enablePlatform and enableShare.
* <p/> * </p>
* Alfresco Maven Plugin config looks something like this: * Alfresco Maven Plugin config looks something like this:
* <pre> * <pre>
* {@code * {@code

53
pom.xml
View File

@@ -152,6 +152,59 @@
<skip>${skipTests}</skip> <skip>${skipTests}</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<tags>
<tag>
<name>goal</name>
<placement>a</placement>
<head>Goal:</head>
</tag>
<tag>
<name>requiresDependencyResolution</name>
<placement>a</placement>
<head>Requires Dependency Resolution:</head>
</tag>
<tag>
<name>description</name>
<placement>a</placement>
<head>Description:</head>
</tag>
<tag>
<name>phase</name>
<placement>a</placement>
<head>Phase:</head>
</tag>
<tag>
<name>requiresProject</name>
<placement>a</placement>
<head>Requires Project:</head>
</tag>
<tag>
<name>threadSafe</name>
<placement>a</placement>
<head>Thread-Safe:</head>
</tag>
<tag>
<name>required</name>
<placement>a</placement>
<head>Required:</head>
</tag>
<tag>
<name>readonly</name>
<placement>a</placement>
<head>Read only:</head>
</tag>
<tag>
<name>parameter</name>
<placement>a</placement>
<head>Parameter:</head>
</tag>
</tags>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<extensions> <extensions>