AnsweredAssumed Answered

Unable to build project with maven on MacOS 10.8

Question asked by logxjb on Mar 25, 2014
Latest reply on Mar 31, 2014 by logxjb

While writing the case, I ultimately tested something which solved my problem …

I had to run "mvn install" as root user with "sudo" and everything worked fine.

I still put the message on this forum if someone run in the same problems


Original problem:

I've followed this tutorial:

I'm running MacOS X 10.8.5

I've installed the JDK 1.7 from Oracle (Java version: 1.7.0_51, vendor: Oracle Corporation)

For maven, I've installed it from Homebrew (Apache Maven 3.2.1)

I edited my $HOME/.mavenrc to ensure that it take the 1.7 JDK in account:


Everything gone well until I've gone to the "Let's run it" chapter

I've tried "mvn install" from the project directory.

First got this:

[ERROR]   The project ch.projectname:content-tutorial-repo:1.0-SNAPSHOT (/project/path/content-tutorial-repo/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.alfresco.maven.plugin:alfresco-maven-plugin:1.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.alfresco.maven.plugin:alfresco-maven-plugin:jar:1.1.1: Could not find artifact org.alfresco.maven:alfresco-lifecycle-aggregator:pom:1.1.1 in alfresco-plugin-public-snapshots ( -> [Help 2]
[ERROR]     Unknown packaging: amp @ line 9, column 16

However, since it was downloading some stuff and the server may have a timeout or anything, I've tried to run a new time the "mvn install" command.

Then, I've gone a new error from Unit Test:

Running org.alfresco.demoamp.test.DemoComponentTest
2014-03-25 02:03:49,133  WARN  [alfresco.util.RuntimeSystemPropertiesSetter] [main] Could not find alfresco-jmxrmi.password on classpath
2014-03-25 02:03:50,078  INFO  [alfresco.repo.admin] [main] Using database URL 'jdbc:h2:./alf_data_dev/h2_data/alf_dev;MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE' with user 'alfresco'.
2014-03-25 02:03:50,540  ERROR [test.context.TestContextManager] [main] Caught exception while allowing TestExecutionListener [] to prepare test instance [org.alfresco.demoamp.test.DemoComponentTest@2c0c7e73]
java.lang.IllegalStateException: Failed to load ApplicationContext

This is the top of the stacktrace, I have kilometers of stacktrace behind this one I could give if needed to help me.