geomesa / geomesa-gdelt

Deprecated - moved to https://github.com/geomesa/geomesa-tutorials
2 stars 1 forks source link

Missing dependencies on `mvn clean install` #2

Open mikeatlas opened 9 years ago

mikeatlas commented 9 years ago

Seems like the pom.xml file is not quite right?

➜  geomesa-gdelt git:(master) ✗ mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GeoMesa GDELT 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for geomesa:geomesa-core-accumulo1.5:jar:1.0.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.geotools:gt-opengis:jar:11.0 is missing, no dependency information available
[WARNING] The POM for org.geotools:gt-data:jar:11.0 is missing, no dependency information available
[WARNING] The POM for org.geotools:gt-epsg-hsql:jar:11.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.709s
[INFO] Finished at: Tue Jan 13 20:46:49 UTC 2015
[INFO] Final Memory: 8M/143M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project geomesa-gdelt-accumulo1.5: Could not resolve dependencies for project geomesa-gdelt:geomesa-gdelt-accumulo1.5:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: geomesa:geomesa-core-accumulo1.5:jar:1.0.0-SNAPSHOT, org.geotools:gt-opengis:jar:11.0, org.geotools:gt-data:jar:11.0, org.geotools:gt-epsg-hsql:jar:11.0: Could not find artifact geomesa:geomesa-core-accumulo1.5:jar:1.0.0-SNAPSHOT -> [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/DependencyResolutionException

I have some of those components built in the parallel directory:

➜  geomesa-gdelt git:(master) ✗ ls ../geomesa/geomesa-core/target/
classes                        geomesa-core-accumulo1.5-1.0.0-rc.2-SNAPSHOT.jar        maven-archiver  surefire-reports  test-classes.550637640.timestamp
classes.-1883815576.timestamp  geomesa-core-accumulo1.5-1.0.0-rc.2-SNAPSHOT-tests.jar  specs2-reports  test-classes      unit-tests.log

I was able to get around the missing geomesa-core dependency by updating pom.xml with:

<dependency>
            <groupId>geomesa</groupId>
            <artifactId>geomesa-core-accumulo1.5</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${basedir}/../geomesa/geomesa-core/target/geomesa-core-accumulo1.5-1.0.0-rc.2-SNAPSHOT.jar</systemPath>
        </dependency>

I was also able to download GeoTools 11.4 and add those paths:

 <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-opengis</artifactId>
            <version>11.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/../geotools-11.4/gt-opengis-11.4.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-data</artifactId>
            <version>11.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/../geotools-11.4/gt-data-11.4.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-epsg-hsql</artifactId>
            <version>11.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/../geotools-11.4/gt-epsg-hsql-11.4.jar</systemPath>
        </dependency>

after that, though, I got error messages saying (use -source 5 or higher to enable generics), which I resolved:

 <properties>
        <accumulo.version>1.5.0</accumulo.version>
        <hadoop.version>2.2.0</hadoop.version>
         <maven.compiler.target>1.6</maven.compiler.target>
         <maven.compiler.source>1.6</maven.compiler.source>
    </properties>

Still not enough though: at this point, I'm stuck at:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project geomesa-gdelt-accumulo1.5: Compilation failure: Compilation failure:
[ERROR] /home/ubuntu/geomesa-gdelt/src/main/java/geomesa/gdelt/GDELTIngest.java:[5,25] error: package geomesa.core.index does not exist
[ERROR]
[ERROR] /home/ubuntu/geomesa-gdelt/src/main/java/geomesa/gdelt/GDELTIngest.java:[169,38] error: cannot find symbol
[ERROR] -> [Help 1]

I realize all the above changes to pom.xml are hacks, but perhaps I missed something from the guide about how to build the geomesa-gdelt project?

mikeatlas commented 9 years ago

I should add that I'm not building any of these projects in an IDE right now - just a remote CLI-only machine, so maybe there are some cross-project awareness settings, class paths, or other things missing in the guide? I'm not from the Java world either, so this is mostly just intuitive stabs at compiling and getting all the dependencies lined up... any help is appreciated.