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

Can't compile from fresh clone #19

Closed
pcj opened this issue Sep 21, 2015 · 3 comments
Closed

Can't compile from fresh clone #19

pcj opened this issue Sep 21, 2015 · 3 comments

Comments

@pcj
Copy link
Contributor

pcj commented Sep 21, 2015

Not sure if this is some interaction with something on my machine, but prevents me from compiling the source. I even deleted my ~/.m2 directory and pulled down dependencies from scratch. I had previously been able to build this. Any ideas?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce 
  (ban-milestones-and-release-candidates) on project commonmark-ext-autolink: 
   Execution ban-milestones-and-release-candidates of goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce failed: 
org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: Could not resolve dependencies for project com.atlassian.commonmark:commonmark-ext-autolink:jar:0.2.1-SNAPSHOT: 
Could not find artifact com.atlassian.commonmark:commonmark:jar:tests:0.2.1-SNAPSHOT -> [Help 1]
mvn compile
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 6 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 6 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] commonmark-java parent
[INFO] commonmark-java core
[INFO] commonmark-java extension for autolinking
[INFO] commonmark-java extension for strikethrough
[INFO] commonmark-java extension for tables
[INFO] commonmark-java integration tests
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building commonmark-java parent 0.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-build-environment) @ commonmark-parent ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ban-milestones-and-release-candidates) @ commonmark-parent ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-license) @ commonmark-parent ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building commonmark-java core 0.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-build-environment) @ commonmark ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ban-milestones-and-release-candidates) @ commonmark ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-license) @ commonmark ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ commonmark ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ commonmark ---
[INFO] Compiling 5 source files to /Users/pcj/pow/opt/commonmark-java/commonmark/target/classes
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building commonmark-java extension for autolinking 0.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-build-environment) @ commonmark-ext-autolink ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ban-milestones-and-release-candidates) @ commonmark-ext-autolink ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] commonmark-java parent ............................ SUCCESS [  0.663 s]
[INFO] commonmark-java core .............................. SUCCESS [  0.588 s]
[INFO] commonmark-java extension for autolinking ......... FAILURE [  0.026 s]
[INFO] commonmark-java extension for strikethrough ....... SKIPPED
[INFO] commonmark-java extension for tables .............. SKIPPED
[INFO] commonmark-java integration tests ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.321 s
[INFO] Finished at: 2015-09-21T09:09:55-07:00
[INFO] Final Memory: 18M/222M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (ban-milestones-and-release-candidates) on project commonmark-ext-autolink: Execution ban-milestones-and-release-candidates of goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce failed: org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: Could not resolve dependencies for project com.atlassian.commonmark:commonmark-ext-autolink:jar:0.2.1-SNAPSHOT: Could not find artifact com.atlassian.commonmark:commonmark:jar:tests:0.2.1-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/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :commonmark-ext-autolink
@robinst
Copy link
Collaborator

robinst commented Sep 22, 2015

Hm, I can reproduce the problem when running mvn compile (with a cleaned ~/.m2). mvn clean install works though. Could you use that until I've figured out how to solve this?

Looks like the problem is the dependency of type test-jar here: https://github.com/atlassian/commonmark-java/blob/master/commonmark-ext-autolink/pom.xml#L33

robinst added a commit that referenced this issue Sep 22, 2015
By moving out the test utilities to a separate module, `mvn compile`
works. It used to fail because other modules had dependencies of type
test-jar on the base module, which is resolved from the repository.

The way it is now is apparently the preferred way according to this:

https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
@robinst
Copy link
Collaborator

robinst commented Sep 22, 2015

Ok, should be fixed now. Please pull and try again with mvn compile.

@robinst robinst closed this as completed Sep 22, 2015
@pcj
Copy link
Contributor Author

pcj commented Sep 22, 2015

Looks good, that fixed it.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] commonmark-java parent ............................ SUCCESS [  0.704 s]
[INFO] commonmark-java test utilities .................... SUCCESS [  0.711 s]
[INFO] commonmark-java core .............................. SUCCESS [  0.759 s]
[INFO] commonmark-java extension for autolinking ......... SUCCESS [  0.079 s]
[INFO] commonmark-java extension for strikethrough ....... SUCCESS [  0.052 s]
[INFO] commonmark-java extension for tables .............. SUCCESS [  0.100 s]
[INFO] commonmark-java integration tests ................. SUCCESS [  0.495 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.816 s
[INFO] Finished at: 2015-09-22T08:40:29-07:00
[INFO] Final Memory: 23M/222M
[INFO] ------------------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants