jQAssistant / extended-objects

eXtended Objects - Lightweight and flexible datastore mapping of Java domain objects
Apache License 2.0
22 stars 7 forks source link

Build not working on clean system #80

Closed RickRainerLudwig closed 10 years ago

RickRainerLudwig commented 10 years ago

cdo-neo4j was cloned into a clean system without any jqassistant and cdo-neo4j contact before.

The build aborts with error: [ERROR] Failed to execute goal com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2:scan (scan) on project cdo.parent: Execution scan of goal com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2:scan failed: Plugin com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2 or one of its dependencies could not be resolved: Failure to find org.neo4j:neo4j-rest-graphdb:jar:2.0.0-M06 in http://repo/plugins-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

If I remove the jqassistant-maven-plugin from parent pom.xml the build starts just fine. The issue comes from the dependency resolution of jqassistant as it seems. jqassistant needs dependencies which cannot be found, but the complete mechanism is not clear for me, yet.

Complete Maven output:

ludwig@roadlinux:~/git/cdo-neo4j$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Composite Data Objects
[INFO] Composite Data Objects - API
[INFO] Composite Data Objects - SPI
[INFO] Composite Data Objects - Implementation
[INFO] Composite Data Objects - Neo4j Binding
[INFO] Composite Data Objects - JSON File Store Binding
[INFO] Composite Data Objects - Documentation
[INFO] Composite Data Objects - Guice Injection
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Composite Data Objects 0.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cdo.parent ---
[INFO] Deleting /home/ludwig/git/cdo-neo4j/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ cdo.parent ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.8:parse-version (set-osgi-version) @ cdo.parent ---
[INFO] 
[INFO] --- maven-bundle-plugin:2.4.0:manifest (bundle-manifest) @ cdo.parent ---
[WARNING] Ignoring project type pom - supportedProjectTypes = [jar, bundle]
[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (default) @ cdo.parent ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/ludwig/git/cdo-neo4j/target/cdo.parent-0.2.0-SNAPSHOT-tests.jar
[INFO] 
[INFO] --- jqassistant-maven-plugin:1.0.0-M2:scan (scan) @ cdo.parent ---
[WARNING] The POM for org.neo4j:neo4j-rest-graphdb:jar:2.0.0-M06 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Composite Data Objects ............................ FAILURE [11.669s]
[INFO] Composite Data Objects - API ...................... SKIPPED
[INFO] Composite Data Objects - SPI ...................... SKIPPED
[INFO] Composite Data Objects - Implementation ........... SKIPPED
[INFO] Composite Data Objects - Neo4j Binding ............ SKIPPED
[INFO] Composite Data Objects - JSON File Store Binding .. SKIPPED
[INFO] Composite Data Objects - Documentation ............ SKIPPED
[INFO] Composite Data Objects - Guice Injection .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.411s
[INFO] Finished at: Fri Mar 14 21:19:33 CET 2014
[INFO] Final Memory: 11M/63M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2:scan (scan) on project cdo.parent: Execution scan of goal com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2:scan failed: Plugin com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2 or one of its dependencies could not be resolved: Failure to find org.neo4j:neo4j-rest-graphdb:jar:2.0.0-M06 in http://repo/plugins-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/PluginResolutionException
ludwig@roadlinux:~/git/cdo-neo4j$
CrystalMethod commented 10 years ago

After a brief look at your stacktrace I would say that you have somehow misconfigured your Maven settings.xml. Can you please have a look at the repository settings, usually located in .m2/ in your user home:

http://repo/plugins-release
RickRainerLudwig commented 10 years ago

I have a local Artifactory here. My repository settings looks like:

...
            <repositories>
              <repository>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>libs-release</name>
                <url>http://repo/libs-release</url>
              </repository>
              <repository>
                <snapshots />
                <id>snapshots</id>
                <name>libs-snapshot</name>
                <url>http://repo/libs-snapshot</url>
              </repository>
            </repositories>
            <pluginRepositories>
              <pluginRepository>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>plugins-release</name>
                <url>http://repo/plugins-release</url>
              </pluginRepository>
              <pluginRepository>
                <snapshots />
                <id>snapshots</id>
                <name>plugins-snapshot</name>
                <url>http://repo/plugins-snapshot</url>
              </pluginRepository>
            </pluginRepositories>
...

Due to the additional repository setting in pom.xml in neo4j folder, the neo4j dependencies are downloaded directly from http://m2.neo4j.org/... during the build, but I have to disable the jqassistant-maven-plugin first. This is causing the issue.

Additionally, when I add http://m2.neo4j.org/content/repositories/releases to Artifactory as new repo, I get an 'Connection failed: Error 401: Unauthorized', but a wget on the same machine to the same URL is working. May the nexus block Artifactory? But, I don't think, it is the primary problem...

RickRainerLudwig commented 10 years ago

I had some time and switched off all my settings for my local Artifactory. It is still not working. The output is:

...
[INFO] --- jqassistant-maven-plugin:1.0.0-M2:scan (scan) @ cdo.parent ---
Downloading: http://repo1.maven.org/maven2/org/neo4j/neo4j-rest-graphdb/2.0.0-M06/neo4j-rest-graphdb-2.0.0-M06.pom
[WARNING] The POM for org.neo4j:neo4j-rest-graphdb:jar:2.0.0-M06 is missing, no dependency information available
Downloading: http://repo1.maven.org/maven2/org/neo4j/neo4j-rest-graphdb/2.0.0-M06/neo4j-rest-graphdb-2.0.0-M06.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Composite Data Objects ............................ FAILURE [1.985s]
[INFO] Composite Data Objects - API ...................... SKIPPED
[INFO] Composite Data Objects - SPI ...................... SKIPPED
[INFO] Composite Data Objects - Implementation ........... SKIPPED
[INFO] Composite Data Objects - Neo4j Binding ............ SKIPPED
[INFO] Composite Data Objects - JSON File Store Binding .. SKIPPED
[INFO] Composite Data Objects - Documentation ............ SKIPPED
[INFO] Composite Data Objects - Guice Injection .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.241s
[INFO] Finished at: Sun Mar 16 17:59:31 CET 2014
[INFO] Final Memory: 11M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2:scan (scan) on project cdo.parent: Execution scan of goal com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2:scan failed: Plugin com.buschmais.jqassistant.maven:jqassistant-maven-plugin:1.0.0-M2 or one of its dependencies could not be resolved: Could not find artifact org.neo4j:neo4j-rest-graphdb:jar:2.0.0-M06 in central (http://repo1.maven.org/maven2) -> [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/PluginResolutionException
$

I am still puzzled, what the issue is. The plugin jqassistant-maven-plugin is found, but its dependencies cannot be resolved correctly.

Can someone please perform a test(?):

1) Manual deletion of artifact org.neo4j:neo4j-rest-graphdb:jar:2.0.0-M06 in local repository. 2) Build cdo-neo4j

If the artifact is not present locally, yet, does Maven resolve the dependencies of the plugin!? It does not seem so...

CrystalMethod commented 10 years ago

I will try to check this asap. In the past I always built neo4j-rest-graphdb locally so the artifact was always present.

Regardless of this problem I propose to introduce a new Maven profile to execute things like JQAssistant which is off by default.

DirkMahler commented 10 years ago

The build still works for me after removing the whole group org.neo4j group from my local maven repository. Even using different versions of maven (3.0.4, 3.1.0, 3.2.1) did not show any problems.

RickRainerLudwig commented 10 years ago

OK. Problem found, but not completely understood. Several thing happened in combination:

1) The Artifactory settings in settings.xml override repository settings in pom.xml. 2) The fact from 1) leads into the error shown above. 3) The removal of Artifactory settings in settings.xml do not(!) lead into a new resolution (even with -U), but into the same error.

A complete(!) removal of local repository and the settings.xml leads into a clean build. The partial resolved artifact seems to confuse Maven somehow.

The issue should be closed, because there is no issue with cdo-neo4j.