12-27-2016 09:41 PM
hello everybody
I am using alfresco SDK componentX - repo sample project, using MVN command prompt:
“[WARNING] The requested profile "amp-to-war" could not be activated because it does not exist.”
How do I solve?
The following is the execution
D:\alfresco-extensions\componentX-repo>mvn clean install -Pamp-to-war
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building componentX-repo Platform Jar Module - SDK 3 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ componentX-repo ---
[INFO] Deleting D:\alfresco-extensions\componentX-repo\target
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ componentX-repo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ componentX-repo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to D:\alfresco-extensions\componentX-repo\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ componentX-repo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ componentX-repo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ componentX-repo ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ componentX-repo ---
[INFO] Building jar: D:\alfresco-extensions\componentX-repo\target\componentX-repo-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-assembly-plugin:2.6:single (build-amp-file) @ componentX-repo ---
[INFO] Building amp: D:\alfresco-extensions\componentX-repo\target\componentX-repo-1.0-SNAPSHOT.amp
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ componentX-repo ---
[INFO] Installing D:\alfresco-extensions\componentX-repo\target\componentX-repo-1.0-SNAPSHOT.jar to E:\MavenRepository\repository\com\acme\componentX-repo\1.0-SNAPSHOT\componentX-repo-1.0-SNAPSHOT.jar
[INFO] Installing D:\alfresco-extensions\componentX-repo\pom.xml to E:\MavenRepository\repository\com\acme\componentX-repo\1.0-SNAPSHOT\componentX-repo-1.0-SNAPSHOT.pom
[INFO] Installing D:\alfresco-extensions\componentX-repo\target\componentX-repo-1.0-SNAPSHOT.amp to E:\MavenRepository\repository\com\acme\componentX-repo\1.0-SNAPSHOT\componentX-repo-1.0-SNAPSHOT.amp
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.353 s
[INFO] Finished at: 2016-12-28T10:31:12+08:00
[INFO] Final Memory: 47M/476M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "amp-to-war" could not be activated because it does not exist.
12-28-2016 10:22 AM
After you run mvn install
componentX-repo-1.0-SNAPSHOT.amp should be generated located at D:\alfresco-extensions\componentX-repo\target\componentX-repo-1.0-SNAPSHOT.amp
Then you can use mmt tool (modules management tool) to apply componentX-repo-1.0-SNAPSHOT.amp to alfresco.war.
It has same effect as amp-to-war parameter.
About how to use mmt tool ,please refer to http://docs.alfresco.com/4.2/concepts/dev-extensions-modules-management-tool.html.
12-28-2016 09:50 AM
amp-to-war is used to deploy the amp to alfresco/share war.
If the amp is successfully packaged.,you can use mmt(modules management tool) tool to apply the AMP file to the alfresco/share war manually.
12-28-2016 10:09 AM
I see the official document said there are two ways of operation, thank you for your answer
In addition:
Alfresco SDK 2.2 can't use right now?
I now use the alfresco SDK 3.0.4, this version perform run. bat, modify the code is also had to restart to take effect?
If so, I should how to configure to let him take effect?
12-28-2016 10:22 AM
After you run mvn install
componentX-repo-1.0-SNAPSHOT.amp should be generated located at D:\alfresco-extensions\componentX-repo\target\componentX-repo-1.0-SNAPSHOT.amp
Then you can use mmt tool (modules management tool) to apply componentX-repo-1.0-SNAPSHOT.amp to alfresco.war.
It has same effect as amp-to-war parameter.
About how to use mmt tool ,please refer to http://docs.alfresco.com/4.2/concepts/dev-extensions-modules-management-tool.html.
12-28-2016 10:34 AM
Now I have another question:
I run. Bat to run the project, modify the code to refresh the browser does not take effect, need to perform the run again. The bat. Is this how to solve?
I am in document configuration:
http://docs.alfresco.com/5.2/tasks/alfresco-sdk-rad-eclipse-hot-reloading.html
12-28-2016 10:44 AM
I'm sorry without further information I can't say what the reason is.
It might be alfresco-sdk-rad-eclipse-hot-reloading.html ,you can give it a try.
12-28-2016 10:47 AM
好的谢谢
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.