Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 beta 4 share-amp archetype run.bat not provided (Windows) #271

Closed
SteveCOS opened this issue Apr 1, 2015 · 5 comments
Closed

v2 beta 4 share-amp archetype run.bat not provided (Windows) #271

SteveCOS opened this issue Apr 1, 2015 · 5 comments
Assignees
Milestone

Comments

@SteveCOS
Copy link

SteveCOS commented Apr 1, 2015

I am trying to create a development environment for a Community v5.0.d installation to work with Aikau. I first ran: mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:share-amp-archetype which created the folder structure for the project. The instructions at https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-sdk-aggregator/latest/archetypes/share-amp-archetype/index.html say to then execute run.sh. I am in a Windows environment and there is no run.bat in the folder. Is Windows supported?

I then tried to run "install mvn -Pamp-to-war" against the project and it fails and it never completes. I am not able to reach Share at http:localhost:8081/share afterwards.

Error messages:
2015-04-01_16-55-42
2015-04-01_16-56-04

Edited:
I manually executed the steps from the run.sh from the Windows command line and set the MAVEN_OPTS. The validate step run successfully and I can see springloaded in the maven repository, but the integration-test -Pamp-to-war step fails when it starts Tomcat.

SEVERE: The web application [/share] appears to have started a thread named [Fil
eSystemWatcher: files=#7 cl=WebappClassLoader
context: /share
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
ClassRealm[tomcat, parent: null]
] but has failed to stop it. This is very likely to create a memory leak.
Apr 01, 2015 7:28:02 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]

@gravitonian
Copy link
Contributor

Hi,

Here are the steps that I use to work with a Share AMP:

  1. Download package installer for 5.0.d and install and start (test access to localhost:8080/alfresco)
  2. Make sure JAVA_HOME is set to version 7:
    JAVA_HOME=/usr/lib/jvm/java-7-oracle
  3. Check Maven version:
    $ mvn -version Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00) Maven home: /usr/local/apache-maven-3.2.5 Java version: 1.7.0_76, vendor: Oracle Corporation
  4. Make sure the MAVEN_OPTS is setup correctly (I have previously downloaded Spring Loaded JAR):
    MAVEN_OPTS=-Xms256m -Xmx1G -XX:PermSize=500m -javaagent:/home/martin/libs/springloaded-1.2.3.RELEASE.jar -noverify
  5. Generate the Share AMP code:
    $ mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:share-amp-archetype
  6. Change the Alfresco version in pom.xml:
    <alfresco.version>5.0.d</alfresco.version>
  7. Start up the embedded Tomcat with Share WAR and AMP
    share-amp20$ mvn install -Pamp-to-war
  8. That's all that's needed (and some stuff you just do once for all projects), now access via:
    http://localhost:8081/share

@mindthegab
Copy link
Contributor

Agree with @gravitonian. Just a clarification:
you don't really need

  1. Download package installer for 5.0.d and install and start (test access to localhost:8080/alfresco)

You can use a repo AMP archetype in another tab.

In fact the SDK's purpose is no need for manual downloads.

@binduwavell
Copy link

Some big advantages (and a few disadvantages of using the installer).

Advantages:

  • You get a packaged tested runtime environment, including java, imagemagick, etc.
  • Can easily test that your amps place assets in intended location via apply_amps scrip or MMT.
  • Full SOLR with standard https config.
  • Can configure Alfresco to start on boot up, which can be nice if you are only working on share extensions.
  • Easier to apply 3rd party AMPs to the repo if you need to test with other extensions in play.
  • Out of the box share on 8080 for comparing before and after effects

Disadvantages:

  • Pretty much all of the advantages can be disadvantages, depending on your situation.
  • Can end up with un tracked changes in installed instance if not diligent.
  • Can complicate things if you have to manage installer version versus archetype versions of Alfresco and Share.

If you are developing share and repo customizations, consider using the all in one archetype...

I'm sure I've missed stuff, but figured I'd get this list started

@gravitonian
Copy link
Contributor

Thanks Bindu, this is something that may be useful for the documentation.

@gravitonian gravitonian self-assigned this Apr 8, 2015
@gravitonian gravitonian added this to the 2.0.1 milestone Apr 8, 2015
@mindthegab mindthegab modified the milestones: 2.1.0, 2.0.1 May 19, 2015
@mindthegab
Copy link
Contributor

run.bat is now provided as of 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants