NOTE: I was using Maven 3+, see the comments.
I am trying to compile a project using Maven coupled with WAS7 but unfortunately seem to be receiving the following error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[ERROR] Error executing Maven.
[ERROR] com.google.inject.ProvisionException: Guice provision errors:
1) Error in custom provider, java.lang.TypeNotPresentException: Type javax.enterprise.inject.Typed not present
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.sonatype.plexus.components.cipher.PlexusCipher
while locating org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.sonatype.plexus.components.sec.dispatcher.SecDispatcher annotated with @com.google.inject.name.Named(value=maven)
while locating org.apache.maven.settings.crypto.DefaultSettingsDecrypter
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.settings.crypto.SettingsDecrypter
while locating org.apache.maven.repository.legacy.LegacyRepositorySystem
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.repository.RepositorySystem
while locating org.apache.maven.project.DefaultProjectBuildingHelper
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.project.ProjectBuildingHelper
while locating org.apache.maven.project.DefaultProjectBuilder
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.project.ProjectBuilder
while locating org.apache.maven.DefaultMaven
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.Maven
1 error
role: org.apache.maven.Maven
roleHint:
[ERROR] Caused by: Guice provision errors:
1) Error in custom provider, java.lang.TypeNotPresentException: Type javax.enterprise.inject.Typed not present
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.sonatype.plexus.components.cipher.PlexusCipher
while locating org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.sonatype.plexus.components.sec.dispatcher.SecDispatcher annotated with @com.google.inject.name.Named(value=maven)
while locating org.apache.maven.settings.crypto.DefaultSettingsDecrypter
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.settings.crypto.SettingsDecrypter
while locating org.apache.maven.repository.legacy.LegacyRepositorySystem
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.repository.RepositorySystem
while locating org.apache.maven.project.DefaultProjectBuildingHelper
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.project.ProjectBuildingHelper
while locating org.apache.maven.project.DefaultProjectBuilder
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.project.ProjectBuilder
while locating org.apache.maven.DefaultMaven
at ClassRealm[plexus.core, parent: null]
at ClassRealm[plexus.core, parent: null]
while locating org.apache.maven.Maven
1 error
[ERROR] Caused by: Type javax.enterprise.inject.Typed not present
[ERROR] Caused by: javax.enterprise.inject.Typed
I have confirmed that the JRE System Library is WAS 7 by checking that it is JavaSE-1.6 which in my case points to WAS7.
I have tried looking for javax.enterprise.inject.Typed and it doesn't seem to appear anywhere, but it is a part of JavaEE6, which is what (I think) WAS 7 is built off of.
So essentially what happened is I was using an embedded version of Maven packaged with myeclipse.
This version of maven is v3.0.4 which uses guice as opposed to plexus in order to inject dependencies. Guice uses components of JavaEE6 which do not exist in JavaEE5 which is extended by WAS7.
So essentially to resolve this issue point to