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

alfresco-maven-plugin compiling 2.0.1-SNAPSHOT, noclass velocity #266

Closed
dhartford opened this issue Mar 9, 2015 · 3 comments
Closed

alfresco-maven-plugin compiling 2.0.1-SNAPSHOT, noclass velocity #266

dhartford opened this issue Mar 9, 2015 · 3 comments
Assignees

Comments

@dhartford
Copy link

When compiling 2.0.1-SNAPSHOT (as of 3/9/2015 from github), w/ mvn 3.0.5 getting:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project alfresco-maven-plugin: The API of the mojo scanner is not compatible with this plugin version. Please check the plugin dependencies configured in the POM and ensure the versions match. org/apache/velocity/context/Context: org.apache.velocity.context.Context -> [Help 1]

-X, this comes up: java.lang.NoClassDefFoundError: org/apache/velocity/context/Context

@dhartford
Copy link
Author

workaround: comment out the version of the maven-plugin-plugin (was: 3.2), as of mvn 3.0.5, defaults to maven-plugin-plugin 2.9, which gets past the above issue. The same error above happens with mvn 3.2.1 as well.

However, this may or may not lead to:
Cannot find setter, adder nor field in org.alfresco.maven.plugin.InstallMojo for 'maven.alfresco.ampLocation'

Final workaround: specify maven-plugin-plugin 3.0 instead of 3.2 when using mvn 3.0.5 seems to be the combination. Verified with normal alfresco-mmt LIST feature.

@gravitonian
Copy link
Contributor

Hi,

I downloaded Maven 3.0.5 and tested with it, you should get a Maven version error:

martin@gravitonian:~/apps/apache-maven-3.0.5/bin$ export M2_HOME=~/apps/apache-maven-3.0.5
martin@gravitonian:~/apps/apache-maven-3.0.5/bin$ ./mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 13:51:28+0000)
Maven home: /home/martin/apps/apache-maven-3.0.5
Java version: 1.7.0_76, vendor: Oracle Corporation
martin@gravitonian:~/src/alfresco-sdk$ ~/apps/apache-maven-3.0.5/bin/mvn clean install -Dmaven.test.skip=true
...
[INFO] Building Maven Alfresco SDK - Parent POM 2.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ alfresco-sdk-parent ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-sdk-requirements) @ alfresco-sdk-parent ---
[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Detected Maven Version: 3.0.5 is not in the allowed range 3.2.2.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Alfresco SDK ...................................... SUCCESS [0.241s]
[INFO] Rapid Application Development Support ............. SUCCESS [2.549s]
[INFO] Maven Alfresco Plugin ............................. SUCCESS [7.060s]
[INFO] Maven Alfresco SDK - Parent POM ................... FAILURE [0.109s]
[INFO] Maven Alfresco SDK - Repository AMP Archetype ..... SKIPPED
[INFO] Maven Alfresco SDK - Share AMP Archetype .......... SKIPPED
[INFO] Maven Alfresco SDK - All-in-One Archetype ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

@gravitonian gravitonian self-assigned this Apr 8, 2015
@noushadkabeer
Copy link

@dhartford
Final workaround: specify maven-plugin-plugin 3.0 instead of 3.2 when using mvn 3.0.5 seems to be the combination. Verified with normal alfresco-mmt LIST feature.

Where to do this change? pom.xml? can you please specify??

Thanks in advance,
Noushad

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

3 participants