11-03-2016 12:46 PM
Hello,
I have generated maven alfresco amp project and I have folder web with css,scrips and so on.
In order to import some css file in webscript html, what exactly the path to this directory should be?
I tried with some variants but ...nothing is found.
And is this content public how can I reach it in the browser?
Thank you in advance.
11-03-2016 05:42 PM
Hi,
Just create an AIO maven project.
The alfresco amp is created with a demoamp.css file.
I manage to access it using that URL : http://localhost:8080/alfresco/css/demoamp.css
11-15-2016 03:39 AM
This is just a part of the output from alfresco-mmt.
I didn't uninstall the older version just (re-)apply the AMP over the war.
Yann
11-15-2016 04:37 AM
Ok, I don't understand why it doesn't recognize the file-mapping.properties file.
Even I generated a completely new alfresco- amp project and again when installing it, it doesn't add any of /web/ folder content.
Do I have to register it somewhere or ?
11-15-2016 04:42 AM
That's strange.
Wich version of the SDK, Alfresco are you using ?
Wich alfresco-mmt.jar are you using ? The one provided with your Alfresco installation ?
For my tests I use the latest alfresco-mmt.jar available from Index of /repositories/public/org/alfresco/alfresco-mmt/5.2.b-EA and 2.2.0 SDK.
Yann
11-15-2016 05:06 AM
The one provided with Alfresco installation.
I now downloaded the 5.2.b-EA and tried to installed the amp with this version of mmt and again don't see any new files added concerning the /web/ folder.
Can't understand what I am missing.
11-15-2016 05:23 AM
Open your AMP file (it's just a zip) can you find your file-mapping.properties in ?
11-15-2016 06:52 AM
It is there.
INFO: Checking the war version using /WEB-INF/classes/alfresco/version.properties
Adding files relating to version '1.0-SNAPSHOT' of module 'test-css'
- File '/WEB-INF/lib/test-css-1.0-SNAPSHOT.jar' added to war from amp
- File '/WEB-INF/classes/alfresco/extension/templates/webscripts/helloworld.get.html.ftl' added to war from amp
- File '/WEB-INF/classes/alfresco/extension/templates/webscripts/helloworld.get.desc.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/extension/templates/webscripts/helloworld.get.js' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test-css/context/bootstrap-context.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test-css/context/service-context.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test-css/context/webscript-context.xml' added to war from amp
- Directory '/WEB-INF/classes/alfresco/module/test-css/context' added to war
- File '/WEB-INF/classes/alfresco/module/test-css/model/content-model.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test-css/model/workflow-model.xml' added to war from amp
- Directory '/WEB-INF/classes/alfresco/module/test-css/model' added to war
- File '/WEB-INF/classes/alfresco/module/test-css/module-context.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test-css/alfresco-global.properties' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test-css/log4j.properties' added to war from amp
C:\alfresco-community\bin>
11-15-2016 09:36 AM
Ok this is the output of alfresco-mmt, no information about your web content.
Can you unzip the AMP file and list the file in it ?
Did you rebuild your AMP ? Could you try with mvn clean install (or mvn clean package) ?
Yann
11-16-2016 04:28 AM
Yes, the above is the output of alfresco-mmt and as you can see the web content doesn't appear there, although I see that the file-mapping.properties file is in the amp.
Yes, of course I rebuilt it with mvn clean install -Pamp-to-war.
Here it is the list of the files in the amp.
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\extension
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\extension\templates
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\extension\templates\webscripts
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\extension\templates\webscripts\helloworld.get.desc.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\extension\templates\webscripts\helloworld.get.html.ftl
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\extension\templates\webscripts\helloworld.get.js
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\alfresco-global.properties
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\context
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\context\bootstrap-context.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\context\service-context.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\context\webscript-context.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\log4j.properties
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\model
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\model\content-model.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\model\workflow-model.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\config\alfresco\module\test-css\module-context.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\file-mapping.properties
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\lib
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\lib\test-css-1.0-SNAPSHOT.jar
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF\MANIFEST.MF
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF\maven
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF\maven\testing-css
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF\maven\testing-css\test-css
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF\maven\testing-css\test-css\pom.properties
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\META-INF\maven\testing-css\test-css\pom.xml
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\test-css-1.0-SNAPSHOT\module.properties
11-16-2016 04:36 AM
Hi,
Thanks for your answer.
According that file list, there is no web folder in your AMP.
Can you list your project file ? (from the root directory).
Maybe the folder in not in the right place.
It should be in src/main/amp
Yann
11-16-2016 07:59 AM
Hm, It was automatically generated from MAVEN. I aslo havent moved it.
I listed the whole project files but the list is long, so I won't spam with the whole list.
The web folder is there:
....
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\file-mapping.properties
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\lib
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\lib\test-css-1.0-SNAPSHOT.jar
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\module.properties
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\css
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\css\demoamp.css
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\jsp
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\jsp\demoamp.jsp
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\licenses
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\licenses\README-licenses.txt
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\scripts
C:\Users\maria\Documents\workspace-sts-3.8.1.RELEASE\test-css\target\amp\web\scripts\demoamp.js
......
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.