LendingClub / gradle-maven-plugin

maven plugin to invoke gradle
73 stars 36 forks source link

"A required class was missing": NewMojoLogger on Maven 3.3.3 #23

Closed whaley closed 9 years ago

whaley commented 9 years ago

This appears to be a recreation of #15 but with Maven 3.3.3.

My pom.xml is in the same directory as build.gradle. My pom looks like the following:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.sample</groupId>
  <version>1.0-SNAPSHOT</version>
  <artifactId>sample</artifactId>
  <packaging>pom</packaging>
  <name>Sample</name>

  <build>
    <plugins>
      <plugin>
        <groupId>org.fortasoft</groupId>
        <artifactId>gradle-maven-plugin</artifactId>
        <version>1.0.5</version>
        <configuration>
          <tasks>
            <!-- this would effectively call "gradle doSomething" -->
            <task>build</task>
          </tasks>
        </configuration>
        <executions>
          <execution>
            <!-- You can bind this to any phase you like -->
            <phase>compile</phase>
            <goals>
              <!-- goal must be "invoke" -->
              <goal>invoke</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Output from running mvn compile and mvn -version:

» mvn compile  
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sample 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- gradle-maven-plugin:1.0.5:invoke (default) @ android-sample ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.303 s
[INFO] Finished at: 2015-07-08T10:06:15-04:00
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.5:invoke (default) on project android-sample: Execution default of goal org.fortasoft:gradle-maven-plugin:1.0.5:invoke failed: A required class was missing while executing org.fortasoft:gradle-maven-plugin:1.0.5:invoke: org/slf4j/impl/NewMojoLogger
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.fortasoft:gradle-maven-plugin:1.0.5
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/whaley/.m2/repository/org/fortasoft/gradle-maven-plugin/1.0.5/gradle-maven-plugin-1.0.5.jar
[ERROR] urls[1] = file:/Users/whaley/.m2/repository/org/gradle/gradle-tooling-api/1.6/gradle-tooling-api-1.6.jar
[ERROR] urls[2] = file:/Users/whaley/.m2/repository/org/codehaus/groovy/groovy-all/2.0.6/groovy-all-2.0.6.jar
[ERROR] urls[3] = file:/Users/whaley/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/PluginContainerException

» mvn --version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:37-04:00)
Maven home: /usr/local/Cellar/maven/3.3.3/libexec
Java version: 1.8.0_31, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.4", arch: "x86_64", family: "mac"
if6was9 commented 9 years ago

Can you try 1.0.7 which is released on jcenter?

whaley commented 9 years ago

I've confirmed 1.0.7 from jcenter works. Thanks.