<< Back to previous view

[CLJ-681] Build Clojure with Maven 2 Created: 26/Nov/10  Updated: 01/Mar/13  Resolved: 05/Jan/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Backlog
Fix Version/s: Release 1.3

Type: Enhancement Priority: Major
Reporter: Stuart Sierra Assignee: Stuart Sierra
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File 0681-patch-10.patch     Text File 0681-patch-11.patch     GZip Archive maven-build-1.diff.gz     GZip Archive maven-build-2.diff.gz     GZip Archive maven-build-3.diff.gz     GZip Archive maven-build-4.diff.gz     GZip Archive maven-build-5.diff.gz     GZip Archive maven-build-6.diff.gz     GZip Archive maven-build-7.diff.gz     GZip Archive maven-build-8.diff.gz     GZip Archive maven-build-9.diff.gz    
Patch: Code and Test
Approval: Ok
Waiting On: Stuart Halloway

 Description   

See Common Contrib Build wiki page and the lengthy clojure-dev discussion

For examples of the CI/release process under Hudson, see clojure-testbuild



 Comments   
Comment by Stuart Sierra [ 26/Nov/10 2:09 PM ]

Replaces previous patch.

  • fixed SCM URLs in pom.xml
Comment by Stuart Halloway [ 29/Nov/10 6:48 AM ]

Maven is capable of using the directory structure we already have. It seems this patch is doing two things: getting us onto maven, and reorganizing the project. Is there any reason these can't be considered separately?

Comment by Stuart Sierra [ 29/Nov/10 6:28 PM ]

Updated patch replaces previous patches.

This does minimal file/directory renaming while preserving the same functionality as the previous patches.

But an older problem has resurfaced: the nondeterministic load-order sometimes causes compilation to fail. For example, on Hudson

Comment by Stuart Sierra [ 01/Dec/10 8:05 AM ]

Patch maven-build-4.diff.gz replaces previous patches.

This works around compilation-order issues by using a bootstrap script to compile namespaces in the correct order.

Comment by Stuart Sierra [ 01/Dec/10 8:59 AM ]

Patch maven-build-5.diff.gz replaces previous patches.

This fixes a few more testing issues.

Comment by Stuart Sierra [ 01/Dec/10 9:02 AM ]

Finally got a successful staging release

Unfortunately, the JAR file is misnamed. This is a clojure-maven-plugin bug that will be fixed in the next release.

Comment by Stuart Sierra [ 03/Dec/10 9:39 AM ]

Patch maven-build-6.diff.gz replaces previous patches.

This updates to clojure-maven-plugin version 1.3.7; README updates.

Comment by Stuart Sierra [ 03/Dec/10 4:13 PM ]

Patch maven-build-7.diff.gz replaces previous patches.

This patch adds back in a simplified build.xml for local development using Ant only.

The Ant build.xml script reads the project version number from pom.xml, so pom.xml remains the definitive project description.

Comment by Stuart Sierra [ 09/Dec/10 5:14 PM ]

Patch maven-build-8.diff.gz replaces previous patches.

This version uses a hybrid Maven + Ant build process. For local development, only Ant is needed. The POM does not depend on anything outside of the standard Maven toolchain and the Sonatype open-source deployment configuration.

Comment by Stuart Sierra [ 15/Dec/10 12:01 PM ]

Patch "maven-build-8" answers those questions by postponing them.

This patch is ready to test and apply.

Comment by Stuart Sierra [ 15/Dec/10 12:04 PM ]

To elaborate: patch "maven-build-8" avoids both clojure-maven-plugin and bootstrap load order by using maven-ant-plugin and Ant to drive the Clojure steps in the build.

We still need to address these issues, but that may take a long time, and we want to move forward with releases to public repositories.

Comment by Stuart Halloway [ 17/Dec/10 2:05 PM ]

Can you please run down two small issues:

(1) I get a warning on the maven build:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.clojure:clojure:jar:1.3.0-testbuild10-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 52, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 181, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]

(2) The version is set to 1.3.0-testbuild10-SNAPSHOT. Am I supposed to change this by hand-editing the pom?

Comment by Stuart Sierra [ 17/Dec/10 4:10 PM ]

Patch maven-build-9.diff.gz replaces previous patches.

Differences from previous patches:

  • Adds plugin coordinates to fix the warnings reported by Stu Halloway
  • Avoids compiling the test sources twice
  • Correctly sets POM version to 1.3.0-master-SNAPSHOT
Comment by Stuart Sierra [ 17/Dec/10 4:11 PM ]

Reported issues should be fixed, although I cannot reproduce the warning messages.

What version of Maven produced those warnings?

Comment by Stuart Halloway [ 04/Jan/11 4:03 PM ]

Patch 10 merely updates patch 9 to apply to current master. (A test namespace had changed. The list of test files has always been hard-coded and fragile, but that's a patch for another day.)

I tested all the Ant and Maven commands documented in the reademe, and everything looks sensible.

Comment by Stuart Halloway [ 04/Jan/11 9:03 PM ]

Patch 10 is bad. The pom file from patch 9 was lost, and my local environment didn't notice somehow. Will test and resubmit a patch 11 that is basically patch 10 with the correct pom.xml from patch 9.

Grumble.

Comment by Stuart Halloway [ 05/Jan/11 7:18 AM ]

Patch 11 is basically patch 10 + the correct pom.xml from patch 9.

Generated at Sat Apr 19 12:03:17 CDT 2014 using JIRA 4.4#649-r158309.