Skip to content

Instantly share code, notes, and snippets.

@danbev
Created October 3, 2012 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danbev/3826704 to your computer and use it in GitHub Desktop.
Save danbev/3826704 to your computer and use it in GitHub Desktop.
building aerogear-android-todo

When building aerogear-android-todo I get the following error:

[INFO] --- maven-compiler-plugin:2.0.2.SP1:compile (default-compile) @ android-todos ---
[INFO] Compiling 96 source files to /Users/danbev/work/jboss/aerogear/aerogear-android-todo/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.405s
[INFO] Finished at: Wed Oct 03 14:01:54 CEST 2012
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2.SP1:compile (default-compile) on project android-todos: Compilation failure: Compilation failure:
[ERROR] /Users/danbev/work/jboss/aerogear/aerogear-android-todo/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntEvaluator.java:[22,50] generics are not supported in -source 1.3
[ERROR] (use -source 5 or higher to enable generics)
[ERROR] public class IntEvaluator implements TypeEvaluator<Integer> {

Adding explicit source of 1.6 to the maven-compile-plugin "fixed" this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.5.1</version>
        <configuration>
            <source>1.6</source>
            <target>1.6</target>
        </configuration>
</plugin>

Building after the above change produces the following error:

[INFO] --- maven-surefire-plugin:2.4.3-JBOSS:test (default-test) @ android-todos ---
Downloading: https://repository.jboss.org/nexus/content/groups/public-jboss/org/apache/maven/surefire/surefire-junit4/2.4.3-JBOSS/surefire-junit4-2.4.3-JBOSS.pom
[WARNING] Missing POM for org.apache.maven.surefire:surefire-junit4:jar:2.4.3-JBOSS
Downloading: https://repository.jboss.org/nexus/content/groups/public-jboss/org/apache/maven/surefire/surefire-junit4/2.4.3-JBOSS/surefire-junit4-2.4.3-JBOSS.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.858s
[INFO] Finished at: Wed Oct 03 13:55:43 CEST 2012
[INFO] Final Memory: 17M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3-JBOSS:test (default-test) on project android-todos: Error to resolving surefire provider dependency: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.maven.surefire:surefire-junit4:jar:2.4.3-JBOSS
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit4 -Dversion=2.4.3-JBOSS -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit4 -Dversion=2.4.3-JBOSS -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] Path to dependency:
[ERROR] 1) dummy:dummy:jar:1.0
[ERROR] 2) org.apache.maven.surefire:surefire-junit4:jar:2.4.3-JBOSS
[ERROR] 
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] 
[ERROR] for artifact:
[ERROR] dummy:dummy:jar:1.0
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public-jboss/, releases=true, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[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/MojoExecutionException

Maven version: Apache Maven 3.0.4
Java version: 1.6.0_35
My settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/settings/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <pluginGroups>
    <pluginGroup>org.jboss.maven.plugins</pluginGroup>
  </pluginGroups>
  <profiles>
    <profile>
      <id>jboss-public-repository</id>
      <repositories>
        <repository>
          <id>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
    <profile>
      <id>jboss-deprecated-repository</id>
      <repositories>
        <repository>
          <id>jboss-deprecated-repository</id>
          <name>JBoss Deprecated Maven Repository</name>
          <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>jboss-public-repository</activeProfile>
  </activeProfiles>

</settings>

This settings.xml is simply a stripped down version of settings-users.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment