question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run "share-amp-archetype" project

See original GitHub issue

Issue Description

Since few days I can not run any “share-amp-archetype” project with alfresco-sdk 3.0.0-beta-4 version. The issue is due to this error: Invalid database configuration, use enableH2, enableMySQL, enablePostgreSQL, or enabaleEnterpriseDb

### `[INFO] Using 'UTF-8' encoding to copy filtered resources.
[DEBUG] resource with targetPath null
directory src/test/properties/${env}
excludes []
includes [**]
[INFO] skip non existing resourceDirectory C:\Users\Alessandro\git\alfsol-dharma\dharma-email-viewer-share\src\test\properties\${env}
[DEBUG] no use filter components
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.151 s
[INFO] Finished at: 2016-09-29T20:10:35+02:00
[INFO] Final Memory: 42M/1202M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.alfresco.maven.plugin:alfresco-maven-plugin:3.0.0-beta-4:run (default-cli) on project dharma-email-viewer-share: Invalid database configuration, use enableH2, enableMySQL, enablePostgreSQL, or enabaleEnterpriseDb -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.alfresco.maven.plugin:alfresco-maven-plugin:3.0.0-beta-4:run (default-cli) on project dharma-email-viewer-share: Invalid database configuration, use enableH2, enableMySQL, enablePostgreSQL, or enabaleEnterpriseDb
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Invalid database configuration, use enableH2, enableMySQL, enablePostgreSQL, or enabaleEnterpriseDb
    at org.alfresco.maven.plugin.RunMojo.renameAlfrescoGlobalProperties(RunMojo.java:507)
    at org.alfresco.maven.plugin.RunMojo.execute(RunMojo.java:270)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 22 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
badluck1024commented, Sep 30, 2016

The issue is due to RunMojo class into the renameAlfrescoGlobalProperties method. It seems that the method does not bother to manage startup of share with the property enableH2 setted to false. A possible workaround to this issue is to set the property enableTestProperties to false into the configuration section of the alfresco-maven-plugin into “share-amp-archetype” project pom.

            <configuration>

                <alfrescoEdition>community</alfrescoEdition>

                <!-- We assume that the platform/repository is already running on localhost:8080 -->
                <enableH2>false</enableH2>
                <enablePlatform>false</enablePlatform>
                <enableSolr>false</enableSolr>

                <enableTestProperties>false</enableTestProperties>
                <!-- Enable the Share webapp, which is what we customize with Share JAR modules -->
                <enableShare>true</enableShare>

                <!--
                   JARs and AMPs that should be overlayed/applied to the Share WAR
                   (i.e. share.war)
               -->
                <shareModules>
                    <moduleDependency>
                        <!-- Bring in a newer version of Aikau, can coexist with older versions in the
                             WAR distribution, newest version is picked. -->
                        <groupId>${alfresco.groupId}</groupId>
                        <artifactId>aikau</artifactId>
                        <version>${aikau.version}</version>
                    </moduleDependency>
                    <!-- Bring in this JAR project, need to be included here, otherwise share-config-custom.xml
                         will not be picked up. It will not be read from target/classes/META-INF -->
                    <moduleDependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>${project.artifactId}</artifactId>
                        <version>${project.version}</version>
                    </moduleDependency>
                </shareModules>
            </configuration>
0reactions
ohejcommented, Mar 24, 2017

I’ve just verified that this issue is fixed: The Share JAR Archetype works out of the box now

Read more comments on GitHub >

github_iconTop Results From Across the Web

maven - alfreco share amp archetype project vs alfresco amp ...
1 Answer 1 ... The alfresco amp project archetype is for generating projects that create a "repo tier" AMP file. The resulting AMP...
Read more >
Problem when creating an all-in-one project in Eclipse
I I try to run the porject, I did not change anything I get the ... org.alfresco.maven.archetype:share-amp-archetype (Share project with ...
Read more >
Maven Configuration Issue error | Selenium Forum
Hi Ashish, I tried in Eclipse Luna for the Live Project. ... [ERROR] To see the full stack trace of the errors, re-run...
Read more >
Getting Started with the Alfresco Maven SDK | ECM Architect
To create the new project, change directories to $TUTORIAL_HOME, then run this command: ... 6: remote -> org.alfresco.maven.archetype:share-amp-archetype.
Read more >
Maven Basics and working with Maven Archetype for Alfresco
If you need to perform a set of actions for your project which are not covered ... Share AMP archetype: Share project with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found