Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run cobertura #1235

Closed
wants to merge 10 commits into from
Closed

run cobertura #1235

wants to merge 10 commits into from

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Jan 15, 2017

No description provided.

@briandealwis
Copy link
Member

I think this build error is happening because you're not explicitly specifying configuring the version of the cobertura:cobertura plugin, and Travis's settings.xml references a now-disappeared Maven snapshot repository.

@elharo
Copy link
Contributor Author

elharo commented Jan 16, 2017

seems possible, but the pom.xml does specify version 2.7 of the plugin, so I'm not clear on why it's trying to load a snapshot in the first place.

script: mvn -Ptravis --fail-at-end verify ${ECLIPSE_TARGET:+-Declipse.target=${ECLIPSE_TARGET}}
script:
- mvn -Ptravis --fail-at-end verify ${ECLIPSE_TARGET:+-Declipse.target=${ECLIPSE_TARGET}}
- mvn cobertura:cobertura
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! The problem is that verify doesn't install the built results. Since you have cobertura:cobertura call in a separate step, it doesn't have the previously-built artifacts in its reactor and so cobertura attempts to resolve the artifacts.

We could have Travis do a mvn install rather than a mvn verify, but then our built artifacts will be cached by Travis, which is not a good thing.

But combining these into one line should work.

@elharo
Copy link
Contributor Author

elharo commented Jan 16, 2017

[INFO] gcp-eclipse-mars ................................... SUCCESS [ 0.012 s]
[INFO] ide-target-platform.repo ........................... SUCCESS [ 31.410 s]
[INFO] Installation Testing for GCP ....................... FAILURE [01:05 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:10 min
[INFO] Finished at: 2017-01-16T21:48:27+00:00
[INFO] Final Memory: 149M/482M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (default) on project verify-feature-completeness: Execution default of goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce failed: org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: Could not resolve following dependencies: [com.google.cloud.tools.eclipse:ide-target-platform.repo:zip:0.1.0-SNAPSHOT (compile), com.google.cloud.tools.eclipse:google-cloud-plugin-eclipse.repo:zip:0.1.0-SNAPSHOT (compile)]: Could not resolve dependencies for project com.google.cloud.tools.eclipse:verify-feature-completeness:pom:0.1.0-SNAPSHOT: The following artifacts could not be resolved: com.google.cloud.tools.eclipse:ide-target-platform.repo:zip:0.1.0-SNAPSHOT, com.google.cloud.tools.eclipse:google-cloud-plugin-eclipse.repo:zip:0.1.0-SNAPSHOT: Could not find artifact com.google.cloud.tools.eclipse:ide-target-platform.repo:zip:0.1.0-SNAPSHOT in sonatype-snapshots (https://oss.sonatype.org/content/repositories/snapshots/) -> [Help 1]

@briandealwis
Copy link
Member

That's happening because we're running verify, which doesn't package. I think you can set the cobertura.skip property to gcp-repo/pom.xml.

@elharo
Copy link
Contributor Author

elharo commented Jan 20, 2017

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (default) on project verify-feature-completeness: Execution default of goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce failed: org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: Could not resolve following dependencies: [com.google.cloud.tools.eclipse:ide-target-platform.repo:zip:0.1.0-SNAPSHOT (compile), com.google.cloud.tools.eclipse:google-cloud-plugin-eclipse.repo:zip:0.1.0-SNAPSHOT (compile)]: Could not resolve dependencies for project com.google.cloud.tools.eclipse:verify-feature-completeness:pom:0.1.0-SNAPSHOT: The following artifacts could not be resolved: com.google.cloud.tools.eclipse:ide-target-platform.repo:zip:0.1.0-SNAPSHOT, com.google.cloud.tools.eclipse:google-cloud-plugin-eclipse.repo:zip:0.1.0-SNAPSHOT: Failure to find com.google.cloud.tools.eclipse:ide-target-platform.repo:zip:0.1.0-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-snapshots has elapsed or updates are forced -> [Help 1]

@briandealwis
Copy link
Member

Hmm, that looks like it's because of the <dependencies> I added to ensure Maven sorted this project last.

@briandealwis
Copy link
Member

Ah, eclipse/ide-target-platform needs to skip cobertura too: it seems that cobertura:cobertura in a project of type eclipse-repository cleans the project and then tries to run some tests. And so the ide-target-platform repository is tossed and can't be found in our build/verify-feature-completeness job.

@briandealwis
Copy link
Member

briandealwis commented Jan 20, 2017

Hmm nope, that's not it: <cobertura.skip>true</cobertura.skip> is in both repos. But one is different from the other.

Update: My mistake: both eclipse-repository projects are cleaned (gcp-repo, ide-target-platform).

@briandealwis
Copy link
Member

I'm not sure Tycho really supports using Cobertura. I found a blog post by David Carver describing his efforts (which looks grotty), and a follow-on comment where he suggests using JaCoCo instead.

@briandealwis
Copy link
Member

Closing as we're using JaCoCo instead.

@chanseokoh chanseokoh deleted the elharo-patch-3 branch April 3, 2017 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants