Wednesday, November 5, 2014

Where to put an enterprise license file for alfresco-maven-sdk

I've been using the alfresco-maven-sdk version 1.1.1 with community alfresco for quite some time.  Recently, I started using it for enterprise version 4.1.4, and tried several ways to install the license file.  My findings are below.

The following did not recognize and install the enterprise license file
  1. Using the tomcat shared extension location:  The alfresco-maven-sdk has embedded tomcat setup, where only the tomcat context.xml file exists under the tomcat folder.  Creating tomcat/shared/classes/extension/license, and saving the license there didn't work.  For example:
  2. ./alfresco-amp
    ./alfresco-amp/pom.xml
    ./alfresco-amp/src
    ./alfresco-amp/tomcat
    ./alfresco-amp/tomcat/context.xml
    ./alfresco-amp/tomcat/shared/classes/extension/lic/<licenseName>.lic



  3. Using the alfresco extension location inside the amp folder structure:  I figure this didn't work because the amp structure gets overlayed during the deployment process and doesn't "stick around" like a regular external tomcat deployment setup.  For example:

  4. D:\workspaces\cherryshoe\alfresco-amp\src\main\amp\config\alfresco\extension\license



  5. alfresco-global.properties dir.license.external with an relative path to the license file:

    • dir.license.external=tomcat
    • dir.license.external=./tomcat
    • dir.license.external=${alfresco.data.location} (this is pointing to alfresco-amp/alf_data_dev as specified in the pom file)
Solution - recognized and installed the license file (renamed license file to .installed and can see in log file)
  1. alfresco-global.properties dir.license.external with explicit path:  For example, putting the license file under the root of the alfresco-amp module.  
    • I had hoped I would find a solution where an explicit path to the license folder location could be avoided.  If I have multiple people on my software team, then each person would need to change this value.

    dir.license.external=D:\workspaces\cherryshoe\alfresco-amp

  2. alfresco-global.properties dir.license.external with explicit path via property replacement:  For example, putting the license file under the root of the alfresco-amp module.  Then adding a new custom property, we'll call it alfresco.license.location in the pom properties, then using property replacement in the alfresco-global.properties file.  
    • This solution is a little better than the one above, since the pom.xml file *will probably* change less than the alfresco-global.properties.

    pom.xml
    <!-- custom to pick up alfresco enterprise license location -->
    <alfresco.license.location>D:\workspaces\cherryshoe-team\alfresco\alfresco-extensions</alfresco.license.location>

    alfresco-global.properties
    # enterprise license location
    dir.license.external=${alfresco.license.location} 

Possible Solutions that I wasn't able to verify
  1. You should also be able to load the license via Share.  Login as administrator, More -> More -> License Descriptor -> Edit -> Click 'Load License' button.
    1. This didn't work for me with Chrome Version 38.0.2125.111 m, Internet Explorer 11.0.9600.17280, or Firefox 33.0.2 (Look at Alfresco 4.1.x supported browsers - http://www.alfresco.com/services/subscription/supported-platforms)
  2. With 4.2 or higher, you should also be able to use the Alfresco Administration Console to upload a license.
Please let me know if you found another way that makes the maven alfresco sdk recognize an enterprise license file.  What questions do you have about this post? Let me know in the comments section below, and I will answer each one.

11 comments:

  1. Hi Judy,

    What happens if you have a property reference with a full path? I don't see that combination.

    Also, can the property come from the alfresco-global.properties, or some properties you control at runtime? Instead of at build time?

    ReplyDelete
  2. Hi Dave,

    Thank you for your suggestion on pulling a property reference with a full path out, that work. I updated the blog with "Solution number 2", which I like better!

    Also, alfresco.war/WEB-INF/classes/alfresco/repository.properties file has the following license properties, which could also work for license placement.

    #Directory to find external license
    dir.license.external=.
    # Spring resource location of external license files
    location.license.external=file://${dir.license.external}/*.lic
    # Spring resource location of embedded license files
    location.license.embedded=/WEB-INF/alfresco/license/*.lic
    # Spring resource location of license files on shared classpath
    location.license.shared=classpath*:/alfresco/extension/license/*.lic

    Thanks,
    Judy

    ReplyDelete
  3. They formed an alliance called Trade Partners Alliance to explore ways to be transparent with quick, reliable, actionable, in-depth product information for the consumer. liedetectors.co.uk

    ReplyDelete
  4. There are two methods of setting up a small business, home office network. The first method is to have one main computer as the share point for files and printers file sharing

    ReplyDelete
  5. The increasing importance of technology in every industry continues to drive the need for a diverse group of qualified professionals to manage the implementation and changes in technology. Best Motherboard of 2018

    ReplyDelete
  6. Thank you for some other informative website. The place else may just I get that kind of information written in such a perfect method? I have a venture that I am simply now running on, and I’ve been at the glance out for such info. www.thestyleshoes.com

    ReplyDelete
  7. A debt of gratitude is in order for your understanding for your phenomenal posting. I'm happy I have set aside an ideal opportunity to see t Easy Traffic School Online California for Traffic Tickets

    ReplyDelete
  8. Up-to-date bloggers and social media influencers make brands regarded thru their superb reviews, often sharing those stories over the mobile network.Managed Services

    ReplyDelete
  9. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks Small Business IT Support Toronto

    ReplyDelete
  10. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. נעלי אצבע

    ReplyDelete

I appreciate your time in leaving a comment!