pax_global_header00006660000000000000000000000064125401515330014511gustar00rootroot0000000000000052 comment=a9ec5f9c00260d486d2803c927d4858697be1239 clojure-maven-plugin-clojure-maven-plugin-1.7.1/000077500000000000000000000000001254015153300216235ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/.gitignore000066400000000000000000000003751254015153300236200ustar00rootroot00000000000000 .* *~ .DS_Store target clojure-maven-plugin.iml clojure-maven-plugin.ipr clojure-maven-plugin.iws src/it/basic-usage-test/build.log src/it/packaging-test/build.log src/it/temporaryoutputpath/build.log src/it/selectivenamespacecompilation/build.logclojure-maven-plugin-clojure-maven-plugin-1.7.1/README.markdown000066400000000000000000000421411254015153300243260ustar00rootroot00000000000000Welcome to the clojure-maven-plugin plugin for Apache Maven 2. This plugin has been designed to make working with clojure as easy as possible, when working in a mixed language, enterprise project. ## Available goals * clojure:add-source * clojure:add-test-source * clojure:compile * clojure:test * clojure:test-with-junit * clojure:run * clojure:repl * clojure:nrepl * clojure:swank * clojure:nailgun * clojure:gendoc * clojure:autodoc * clojure:marginalia ## Getting started with Clojure and Maven To use this plugin and start working with clojure, start with a blank maven project and declare the plugin and add a dependency on clojure: clojure .... com.theoryinpractise clojure-maven-plugin 1.3.23 true .... org.clojure clojure 1.6.0 By changing your projects type to clojure, the plugin will automatically bind itself to the compile, test-compile, and test maven phases. Without any additional configuration, the clojure-maven-plugin will compile any namespaces in ./src/main/clojure/*.clj (or .cljc) and ./src/test/clojure/*.clj (or .cljc). ### Adding additional source directories To change, or add additional source directories you can add the following configuration: src/main/clojure src/test/clojure NOTE: The plugin will prepend the project's ${basedir} before each source/testSource directory specified. ### Temporary Compile Paths If you wish to take advantage of the compilers syntax checking, but wish to prevent any AOT classes from appearing in the maven generated JAR file, you can tell the plugin to compile to a temporary directory: true ### Namespace configuration If you wish to limit or filter out namespaces during your compile/test, simply add a `` or `` configuration section: com.foo net.* !testing.* The namespace declaration is actually a regex match against discovered namespaces, and can also be prepended with an ! to filter the matching namespace. If you wish to further limit test/compile usage to only the namespaces you define, you can enable this with the configuration block: true true ## Interactive Coding The plugin supports several goals intended to make it easier for developers to run interactive clojure shells in the context of maven projects. This means that all dependencies in a project's runtime and test scopes will be automatically added to the classpath and available for experimentation. By default these goals will use the test classpath, if you wish to only use the compile classpath/dependencies, you can disable this with: false or by running maven with: -Dclojure.runwith.test=false ### Goals
Property Variable Default Description
clojure:repl — Starts an interactive clojure REPL right on the command line.
replScript An initialization script can be specified in the pom using the replScript configuration element.
windowsRepl cmd /c start Allows to configure the command line that will be executed in Windows.
clojure:swank — Starts a Swank server that accepts connections.
replScript The clojure script to run before starting the repl
port clojure.swank.port 4005 The swank server port
protocolVersion clojure.swank.protocolVersion 2009-09-14 The swank protocol version
encoding clojure.swank.encoding iso-8859-1 The swank encoding to use
swankHost clojure.swank.host localhost The host to bind the swank server to/td>
clojure:nailgun — Starts a nailgun server.
replScript The clojure script to run before starting the repl
port clojure.nailgun.port 2113 The nailgun server port
clojure:run — Runs a clojure script.
script clojure.script The clojure script to run
scripts A list of clojure scripts to run
mainClass clojure.mainClass A java class to run
args clojure.args Arguments to the clojure script(s)
clojure:add-source — Includes clojure source directory in -sources.jar.
clojure:add-testsource — Includes clojure test source directory in -testsources.jar.
clojure:nrepl — Starts a nREPL server that accepts connections.
replScript The clojure script to run before starting the repl
port clojure.nrepl.port 4005 The nREPL server port
nreplHost clojure.nrepl.host localhost The host to bind the nREPL server to/td>
## Testing Clojure Code Whilst you could easily launch your tests from the clojure:run goal, the plugin provides two goals targeted specifically to testing: clojure:test and clojure:test-with-junit Without any additional configuration the plugin will run a temporary clojure "test launcher" script: The script runs all discovered *test* namespaces, and fails the build when any FAIL or ERROR cases are found. If you require different test behavior, you can provide your own test script with the following configuration: src/test/clojure/com/jobsheet/test.clj The first argument to the script is the name of a properties file that has in it a config for the user selected. These configs can be parsed out using the following code ``` (def props (Properties.)) (.load props (FileInputStream. (first *command-line-args*))) ;;namespaces to run tests for (def namespaces (into [] (for [[key val] props :when (.startsWith key "ns.")] (symbol val)))) ;; should there be junit compatible output or not (def junit (Boolean/valueOf (.get props "junit"))) ;; what is the output directory that results should be written to (def output-dir (.get props "outputDir")) ;; should we xml-escape *out* while the tests are running (def xml-escape (Boolean/valueOf (.get props "xmlEscape"))) ``` We reserve the right to add new configs in the future, and possibly new command line arguments as well. ## Configuring your clojure session If you want to provide additional arguments to all spawned java/clojure processes, the plugin provides several configuration properties:
Property Variable Default Description
vmargs clojure.vmargs JVM Arguments
clojureOptions Additional JVM Options such as system property definitions
warnOnReflection false Enable reflection warnings
prependClasses A list of classnames to prepend to the command line before the mainClass
The plugin can also copy source files to the output directory, filtered using the namespace mechanism that is used to control compilation. If you want to copy all compiled source files to the output: true If you want to copy only a subset: com.foo !com.foo.private.* true If you want to do no compilation at all, but copy all source files: true !.* true Note that it will only copy clojure source files, which must a) end in .clj or .cljc and b) contain a namespace declaration. Enjoy. ### Dependencies In order to run clojure:repl, clojure:swank or clojure:nailgun, your project needs to have a recent (1.0 or later) version of clojure as a dependency in pom.xml. In order to run clojure:autodoc, your project needs to have autodoc as a dependency in pom.xml. In order to run clojure:nrepl, your project needs to have org.clojure/tools.nrepl as a dependency in pom.xml. #### JLine/IClojure/REPL-y If JLine is detected in the classpath, it will be used to provide the clojure:repl goal with history, tab completion, etc. A simple way of enabling this is to put the following in your pom.xml: jline jline 0.9.94 If you prefer [IClojure](https://github.com/cosmin/IClojure) you can add: com.offbytwo.iclojure iclojure 1.1.0 Or [REPL-y](https://github.com/trptcolin/reply/): reply reply 0.1.0-beta9 #### Swank The clojure:swank goal requires swank-clojure as a projet dependency. Unfortunatly, this library is currently not available in the central maven repository, but is available from clojars by first declaring the repository: clojars http://clojars.org/repo/ and then declaring the dependency itself: swank-clojure swank-clojure 1.3.0-SNAPSHOT By default the swank process will run against the local loopback device, if you wish to change the host your swank server runs against, you can configure it via: localhost or by defining the clojure.swank.host system property. #### nREPL The clojure:nrepl goal requires org.clojure/tools.nrepl as a projet dependency as: org.clojure tools.nrepl 0.2.0-beta9 By default the nREPL process will run against the local loopback device on port 4005, if you wish to change the host your nREPL server runs against or the port, you can configure it via: localhost 9001 or by defining the clojure.nrepl.host and clojure.nrepl.port system property. #### Nailgun for Vimclojure < 2.2.0 The clojure:nailgun goal requires a recent version of vimclojure as a dependency. Unfortunately, this library is currently not available in the central maven repository, and has to be downloaded and installed manually: 1. Download vimclojure source code from `http://cloud.github.com/downloads/jochu/swank-clojure/swank-clojure-1.0-SNAPSHOT-distribution.zip`. 2. Follow the README to compile and install vimclojure. 3. Locate vimclojure.jar and run the following command to install it to your local repository (replace X.X.X with your version of vimclojure): mvn install:install-file -DgroupId=de.kotka -DartifactId=vimclojure -Dversion=X.X.X -Dpackaging=jar -Dfile=/path/to/jarfile 4. Put the following in your pom.xml (replace X.X.X with your version of vimclojure) de.kotka vimclojure X.X.X 5. You will need to run `mvn clojure:nailgun -Dclojure.nailgun.server=com.martiansoftware.nailgun.NGServer` in order to work with the old version (pre 2.2.0) of vimclojure. #### Nailgun for Vimclojure >= 2.2.0 To use `clojure 1.2.0` comfortably, you will need to upgrade to `Vimclojure 2.2.0` which isn't backwards compatible with previous vimclojure versions. Now you will need a dependency on the `vimclojure:server:2.2.0` which contains the modified Nailgun server. vimclojure server 2.2.0 The jar can be found in [clojars](http://clojars.org/) maven repo (you'll have to add it to the `repositories` section) clojars Clojars http://clojars.org/repo/ The installation process for vimclojure remains the same (except for the `vimclojure.jar` which you don't need to install anymore). Just get the vimclojure package from http://kotka.de/projects/clojure/vimclojure.html and follow the README. Notes for migration from the previous version of vimclojure: * `clj_highlight_builtins` was deprecated in favor of `vimclojure#HighlightBuiltins` * `clj_highlight_contrib` was removed * `g:clj_paren_rainbow` was deprecated in favor of `vimclojure#ParenRainbow` * `g:clj_want_gorilla` was deprecated in favor of `vimclojure#WantNailgun` #### Windows configuration As the default Windows console doesn't allow to easily copy and paste code, you can use the `windowsConsole` configuration option to specify which console command to run in Windows. For example if you are using http://code.google.com/p/conemu-maximus5/, you can configure the plugin with: `"C:\\Program Files\\ConEmu\\ConEmu64.exe" /cmd` which will give you a sane Windows console ### Configuration The following options that can be configured as system properties:
Property Default value Description
clojure.nailgun.port 4005 Only applicable for the clojure:nailgun goal. The port number that the Nailgun server should listen to.
clojure.swank.port 4005 Only applicable for the clojure:swank goal. The port number that the Swank server should listen to.
clojure.swank.protocolVersion 2009-09-14 Only applicable for the clojure:swank goal. Specifies the version of the swank protocol.
clojure.swank.encoding iso-8859-1 Only applicable for the clojure:swank goal. Specifies the encoding used by the swank protocol.
clojure.nrepl.port 4005 Only applicable for the clojure:nrepl goal. The port number that the nREPL should listen to.
clojure.nrepl.host 4005 Only applicable for the clojure:nrepl goal. The host that the nREPL should listen to.
### Support Join the discussion mailing list at: http://groups.google.com/group/clojure-maven-plugin clojure-maven-plugin-clojure-maven-plugin-1.7.1/epl-v10.html000066400000000000000000000311651254015153300237030ustar00rootroot00000000000000 Eclipse Public License - Version 1.0

Eclipse Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and

b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

clojure-maven-plugin-clojure-maven-plugin-1.7.1/pom.xml000066400000000000000000000263561254015153300231540ustar00rootroot00000000000000 4.0.0 clojure-maven-plugin Maven Mojo com.theoryinpractise clojure-maven-plugin maven-plugin 1.7.1 Maven plugin for compiling clojure source files http://github.com/talios/clojure-maven-plugin scm:git:git@github.com:talios/clojure-maven-plugin.git scm:git:git@github.com:talios/clojure-maven-plugin.git http://github.com/talios/clojure-maven-plugin clojure-maven-plugin-1.7.1 UTF-8 talios Mark Derricutt mark@talios.com http://www.talios.com Tim Dysinger tim -on- dysinger.net Stuart Sierra mail@stuartsierra.com Scott Fleckenstein nullstyle@gmail.com Jukka Zitting jukka.zitting@gmail.com Chas Emerick cemerick@snowtide.com Cosmin Stejerean cosmin@offbytwo.com Eclipse Public License sonatype-staging oss.sonatype.org Staging Repository http://oss.sonatype.org/service/local/staging/deploy/maven2/ github-snapshots oss.sonatype.org github Release Repository Snapshot Repository http://oss.sonatype.org/content/repositories/github-snapshots/ release performRelease true org.apache.maven.plugins maven-gpg-plugin 1.5 sign-artifacts verify sign maven-compiler-plugin 3.1 1.5 1.5 org.apache.maven.plugins maven-plugin-plugin 3.2 true mojo-descriptor descriptor help-goal helpmojo maven-release-plugin 2.4.1 org.apache.maven.scm maven-scm-provider-gitexe 1.8.1 clean install deploy false true true maven-invoker-plugin 1.8 src/it ${project.build.directory}/it */pom.xml src/it/settings.xml ${project.build.directory}/local-repo verify.bsh true integration-test install run org.apache.maven.plugins maven-site-plugin 3.0-beta-2 org.apache.maven.plugins maven-javadoc-plugin 2.7 org.apache.maven.plugins maven-jxr-plugin 2.1 true org.apache.maven.plugins maven-surefire-report-plugin 2.6 org.codehaus.mojo cobertura-maven-plugin 2.4 xml html org.apache.maven.plugins maven-checkstyle-plugin 2.6 org.apache.maven.plugin-tools maven-plugin-annotations 3.2 compile org.codehaus.plexus plexus-utils 3.0.17 org.apache.maven maven-plugin-api 3.2.1 junit junit 4.11 test org.easytesting fest-assert-core 2.0M10 test org.mockito mockito-all 1.9.5 test org.apache.commons commons-exec 1.2 org.apache.commons commons-io 1.3.2 commons-lang commons-lang 2.6 org.apache.maven maven-toolchain 3.0-alpha-2 org.apache.maven maven-core 3.2.1 org.codehaus.plexus plexus-compiler-api 2.3 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/000077500000000000000000000000001254015153300224125ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/000077500000000000000000000000001254015153300230265ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/000077500000000000000000000000001254015153300251175ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/goals.txt000066400000000000000000000000271254015153300267640ustar00rootroot00000000000000clean clojure:autodoc clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/pom.xml000066400000000000000000000040161254015153300264350ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it autodoc testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true org.clojure clojure 1.1.0 org.clojure clojure-contrib 1.1.0 autodoc autodoc 0.7.1 org.clojure clojure-contrib clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/000077500000000000000000000000001254015153300257065ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/main/000077500000000000000000000000001254015153300266325ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/main/clojure/000077500000000000000000000000001254015153300302755ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/main/clojure/autodoc.clj000066400000000000000000000001461254015153300324260ustar00rootroot00000000000000(ns autodoc) (defn hello-world "A simple hello world application." [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/verify.bsh000066400000000000000000000003121254015153300271150ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/autodoc/autodoc-api.html" ); if ( !file.exists() ) { throw new FileNotFoundException( "Could not find generated autodoc file: " + file ); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/000077500000000000000000000000001254015153300305465ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/goals.txt000066400000000000000000000000271254015153300324130ustar00rootroot00000000000000clean clojure:autodoc clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/pom.xml000066400000000000000000000041601254015153300320640ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it autodoc testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true src ${project.build.directory}/autodoc2 org.clojure clojure 1.2.0 org.clojure clojure-contrib 1.2.0 autodoc autodoc 0.7.1 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/src/000077500000000000000000000000001254015153300313355ustar00rootroot00000000000000autodoc.clj000066400000000000000000000001461254015153300334070ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/src(ns autodoc) (defn hello-world "A simple hello world application." [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/verify.bsh000066400000000000000000000002571254015153300325540ustar00rootroot00000000000000File file=new File(basedir,"target/autodoc2/autodoc-api.html"); if(!file.exists()){ throw new FileNotFoundException("Could not find generated autodoc file: "+file); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/000077500000000000000000000000001254015153300251205ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/goals.txt000066400000000000000000000000271254015153300267650ustar00rootroot00000000000000clean clojure:autodoc clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/pom.xml000066400000000000000000000034261254015153300264420ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it autodoc testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true org.clojure clojure 1.2.0 org.clojure clojure-contrib 1.2.0 autodoc autodoc 0.7.1 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/000077500000000000000000000000001254015153300257075ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/main/000077500000000000000000000000001254015153300266335ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/main/clojure/000077500000000000000000000000001254015153300302765ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/main/clojure/autodoc.clj000066400000000000000000000001461254015153300324270ustar00rootroot00000000000000(ns autodoc) (defn hello-world "A simple hello world application." [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/verify.bsh000066400000000000000000000003121254015153300271160ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/autodoc/autodoc-api.html" ); if ( !file.exists() ) { throw new FileNotFoundException( "Could not find generated autodoc file: " + file ); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/000077500000000000000000000000001254015153300264075ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/goals.txt000066400000000000000000000000171254015153300302530ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/pom.xml000066400000000000000000000042631254015153300277310ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it basic-usage-test testing jar packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true compile compile compile test test-compile testCompile org.clojure clojure 1.3.0-beta1 org.clojure.contrib gen-html-docs 1.3.0-alpha4 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/000077500000000000000000000000001254015153300271765ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/main/000077500000000000000000000000001254015153300301225ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/main/clojure/000077500000000000000000000000001254015153300315655ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300341150ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/verify.bsh000066400000000000000000000010731254015153300304120ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/basic-usage-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/000077500000000000000000000000001254015153300261665ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/goals.txt000066400000000000000000000000171254015153300300320ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/pom.xml000066400000000000000000000033061254015153300275050ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it basic-usage-test testing jar packaging-test http://maven.apache.org UTF-8 com.theoryinpractise clojure-maven-plugin @project.version@ true compile compile compile test test-compile testCompile org.clojure clojure 1.1.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/000077500000000000000000000000001254015153300267555ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/main/000077500000000000000000000000001254015153300277015ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/main/clojure/000077500000000000000000000000001254015153300313445ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300336740ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/verify.bsh000066400000000000000000000010731254015153300301710ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/basic-usage-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/000077500000000000000000000000001254015153300267505ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/goals.txt000066400000000000000000000000321254015153300306110ustar00rootroot00000000000000clean clojure:marginalia clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/pom.xml000066400000000000000000000044571254015153300302770ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it marginalia testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true true org.clojure clojure 1.2.0 org.clojure clojure-contrib 1.2.0 marginalia marginalia 0.7.1 org.clojure clojure org.clojure clojure-contrib clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/000077500000000000000000000000001254015153300275375ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/main/000077500000000000000000000000001254015153300304635ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/main/clojure/000077500000000000000000000000001254015153300321265ustar00rootroot00000000000000autodoc.clj000066400000000000000000000001461254015153300342000ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/main/clojure(ns autodoc) (defn hello-world "A simple hello world application." [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/verify.bsh000066400000000000000000000003101254015153300307440ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/marginalia/toc.html" ); if ( !file.exists() ) { throw new FileNotFoundException( "Could not find generated marginalia file: " + file ); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/000077500000000000000000000000001254015153300251325ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/goals.txt000066400000000000000000000000321254015153300267730ustar00rootroot00000000000000clean clojure:marginalia clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/pom.xml000066400000000000000000000043001254015153300264440ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it marginalia testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true org.clojure clojure 1.2.0 org.clojure clojure-contrib 1.2.0 marginalia marginalia 0.7.1 org.clojure clojure org.clojure clojure-contrib clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/000077500000000000000000000000001254015153300257215ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/main/000077500000000000000000000000001254015153300266455ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/main/clojure/000077500000000000000000000000001254015153300303105ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/main/clojure/autodoc.clj000066400000000000000000000001461254015153300324410ustar00rootroot00000000000000(ns autodoc) (defn hello-world "A simple hello world application." [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/verify.bsh000066400000000000000000000003141254015153300271320ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/marginalia/uberdoc.html" ); if ( !file.exists() ) { throw new FileNotFoundException( "Could not find generated marginalia file: " + file ); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/000077500000000000000000000000001254015153300262665ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/goals.txt000066400000000000000000000000171254015153300301320ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/000077500000000000000000000000001254015153300306265ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/pom.xml000066400000000000000000000023731254015153300321500ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it multimodule testing clojure multimodule-test http://maven.apache.org UTF-8 com.theoryinpractise clojure-maven-plugin @project.version@ true src/test/clojure/runtest.clj org.clojure clojure 1.1.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/000077500000000000000000000000001254015153300314155ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/main/000077500000000000000000000000001254015153300323415ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/main/clojure/000077500000000000000000000000001254015153300340045ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300363340ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/test/000077500000000000000000000000001254015153300323745ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/test/clojure/000077500000000000000000000000001254015153300340375ustar00rootroot00000000000000runtest.clj000066400000000000000000000000431254015153300361530ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/test/clojure(println "Hello from runtest.clj") clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/pom.xml000066400000000000000000000010671254015153300276070ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it multimodule.parent multimodule.parent testing http://smxemail.com pom multimodule clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/verify.bsh000066400000000000000000000020261254015153300302700ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File buildFile = new File( basedir, "build.log"); LineNumberReader reader = new LineNumberReader(new FileReader(buildFile)); String line = reader.readLine(); boolean foundRunner = false; try { while (line != null) { if (line.contains("Hello from runtest.clj")) { foundRunner = true; } line = reader.readLine(); } } catch (Exception e) { // ignore } if (!foundRunner) { throw new RuntimeException("Did not find text from custom runner"); } File file = new File( basedir, "multimodule/target/multimodule-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/000077500000000000000000000000001254015153300263625ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/goals.txt000066400000000000000000000000171254015153300302260ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/pom.xml000066400000000000000000000025321254015153300277010ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it packaging-test testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true org.clojure clojure 1.1.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/000077500000000000000000000000001254015153300271515ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/main/000077500000000000000000000000001254015153300300755ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/main/clojure/000077500000000000000000000000001254015153300315405ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300340700ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/verify.bsh000066400000000000000000000010711254015153300303630ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/packaging-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/000077500000000000000000000000001254015153300263655ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/goals.txt000066400000000000000000000000171254015153300302310ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/pom.xml000066400000000000000000000025321254015153300277040ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it packaging-test testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true org.clojure clojure 1.4.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/000077500000000000000000000000001254015153300271545ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/main/000077500000000000000000000000001254015153300301005ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/main/clojure/000077500000000000000000000000001254015153300315435ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300340730ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/verify.bsh000066400000000000000000000010711254015153300303660ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/packaging-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/000077500000000000000000000000001254015153300263665ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/goals.txt000066400000000000000000000000171254015153300302320ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/pom.xml000066400000000000000000000025321254015153300277050ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it packaging-test testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true org.clojure clojure 1.5.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/000077500000000000000000000000001254015153300271555ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/main/000077500000000000000000000000001254015153300301015ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/main/clojure/000077500000000000000000000000001254015153300315445ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300340740ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/verify.bsh000066400000000000000000000010711254015153300303670ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/packaging-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/000077500000000000000000000000001254015153300263705ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/goals.txt000066400000000000000000000000171254015153300302340ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/pom.xml000066400000000000000000000025361254015153300277130ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it packaging-test testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true org.clojure clojure 1.7.0-RC1 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/000077500000000000000000000000001254015153300271575ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/main/000077500000000000000000000000001254015153300301035ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/main/clojure/000077500000000000000000000000001254015153300315465ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300340760ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) packagingc.cljc000066400000000000000000000001221254015153300344060ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/main/clojure(ns packagingc) (defn hello-world-cljc [] (println "Hello World from CLJC")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/verify.bsh000066400000000000000000000015621254015153300303760ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/packaging-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packagingc.cljc") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } if (jar.getJarEntry("packagingc__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/000077500000000000000000000000001254015153300257275ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/goals.txt000066400000000000000000000000171254015153300275730ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/pom.xml000066400000000000000000000025321254015153300272460ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it packaging-test testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true org.clojure clojure 1.2.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/000077500000000000000000000000001254015153300265165ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/main/000077500000000000000000000000001254015153300274425ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/main/clojure/000077500000000000000000000000001254015153300311055ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/main/clojure/packaging.clj000066400000000000000000000001021254015153300335140ustar00rootroot00000000000000(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/verify.bsh000066400000000000000000000010711254015153300277300ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/packaging-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/000077500000000000000000000000001254015153300266215ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/goals.txt000066400000000000000000000000231254015153300304620ustar00rootroot00000000000000clean clojure:run clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/pom.xml000066400000000000000000000032421254015153300301370ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it basic-usage-test testing jar packaging-test http://maven.apache.org UTF-8 com.theoryinpractise clojure-maven-plugin @project.version@ true org.clojure clojure 1.1.0 run run true clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/000077500000000000000000000000001254015153300274105ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/main/000077500000000000000000000000001254015153300303345ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/main/clojure/000077500000000000000000000000001254015153300317775ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/main/clojure/runme.clj000066400000000000000000000001211254015153300336110ustar00rootroot00000000000000(ns packaging) (defn hello-world [] (println "Hello World")) (hello-world) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/000077500000000000000000000000001254015153300311255ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/goals.txt000066400000000000000000000000171254015153300327710ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/pom.xml000066400000000000000000000031421254015153300324420ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it packaging-test testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true packaging org.clojure clojure 1.2.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/000077500000000000000000000000001254015153300317145ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/main/000077500000000000000000000000001254015153300326405ustar00rootroot00000000000000clojure/000077500000000000000000000000001254015153300342245ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/mainotherpackage.clj000066400000000000000000000001211254015153300373450ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/main/clojure(ns otherpackage) (defn hello-other-world [] (println "Hello Other World")) packaging.clj000066400000000000000000000001021254015153300366330ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/verify.bsh000066400000000000000000000013641254015153300331330ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/packaging-test-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") == null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } if (jar.getJarEntry("otherpackage__init.class") != null) { throw new FileNotFoundException("Generated JAR file should not include compiled clojure class file for 'otherpackage'"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/settings.xml000066400000000000000000000015551254015153300254160ustar00rootroot00000000000000 it-repo true local.central @localRepositoryUrl@ true true local.central @localRepositoryUrl@ true true clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/000077500000000000000000000000001254015153300272065ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/goals.txt000066400000000000000000000000171254015153300310520ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/pom.xml000066400000000000000000000027671254015153300305370ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it temporaryoutputdirectory testing clojure packaging-test http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true org.clojure clojure 1.2.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/000077500000000000000000000000001254015153300277755ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/main/000077500000000000000000000000001254015153300307215ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/main/clojure/000077500000000000000000000000001254015153300323645ustar00rootroot00000000000000packaging.clj000066400000000000000000000001021254015153300347140ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/main/clojure(ns packaging) (defn hello-world [] (println "Hello World")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/verify.bsh000066400000000000000000000011021254015153300312020ustar00rootroot00000000000000import java.io.*; import java.util.jar.JarFile; File file = new File( basedir, "target/temporaryoutputdirectory-testing.jar" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated JAR: " + file ); } JarFile jar = new JarFile(file); if (jar.getJarEntry("packaging.clj") == null) { throw new FileNotFoundException("Generated JAR file does not include clojure source file"); } if (jar.getJarEntry("packaging__init.class") != null) { throw new FileNotFoundException("Generated JAR file does not include compiled clojure class file"); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/000077500000000000000000000000001254015153300260155ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/goals.txt000066400000000000000000000000161254015153300276600ustar00rootroot00000000000000clean install clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/pom.xml000066400000000000000000000047551254015153300273450ustar00rootroot00000000000000 4.0.0 clojure h908714124 clojure-maven-plugin-demo 1.0-SNAPSHOT junit junit 4.11 test org.clojure clojure 1.5.1 org.clojure tools.logging 0.2.6 src/main/resources true ${project.build.outputDirectory} src/test/resources ${project.build.testOutputDirectory} true maven-surefire-plugin 2.14.1 default-test test test false 1 com.theoryinpractise clojure-maven-plugin @project.version@ true clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/000077500000000000000000000000001254015153300266045ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/000077500000000000000000000000001254015153300275305ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/clojure/000077500000000000000000000000001254015153300311735ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/clojure/h908714124/000077500000000000000000000000001254015153300323465ustar00rootroot00000000000000somens.clj000066400000000000000000000002001254015153300342550ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/clojure/h908714124(ns h908714124.somens (:gen-class) (:require [clojure.tools.logging :as log])) (defn -main [& args] (log/info "foobar")) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/resources/000077500000000000000000000000001254015153300315425ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/resources/main/000077500000000000000000000000001254015153300324665ustar00rootroot00000000000000build-info.properties000066400000000000000000000003441254015153300365560ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/resources/mainproject.build.testOutputDirectory = ${project.build.testOutputDirectory} project.testResources = ${project.testResources} project.build.outputDirectory = ${project.build.outputDirectory} project.resources = ${project.resources} clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/000077500000000000000000000000001254015153300275635ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/java/000077500000000000000000000000001254015153300305045ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/java/h908714124/000077500000000000000000000000001254015153300316575ustar00rootroot00000000000000ResourceTest.java000066400000000000000000000013451254015153300350750ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/java/h908714124package h908714124; import org.junit.Assert; import org.junit.Test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class ResourceTest { @Test public void okJar() throws IOException { String bip = "/test/build-info.properties"; InputStream s = getClass().getResourceAsStream(bip); Assert.assertNotNull(s); InputStreamReader sr = new InputStreamReader(s); BufferedReader bsr = new BufferedReader(sr); String line; try { while ((line = bsr.readLine()) != null) { System.out.println(line); } } finally { bsr.close(); } } } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/resources/000077500000000000000000000000001254015153300315755ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/resources/test/000077500000000000000000000000001254015153300325545ustar00rootroot00000000000000build-info.properties000066400000000000000000000003441254015153300366440ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/resources/testproject.build.testOutputDirectory = ${project.build.testOutputDirectory} project.testResources = ${project.testResources} project.build.outputDirectory = ${project.build.outputDirectory} project.resources = ${project.resources} clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/verify.bsh000066400000000000000000000003001254015153300300100ustar00rootroot00000000000000File file=new File(basedir,"target/test-classes/test/build-info.properties"); if(!file.exists()){ throw new FileNotFoundException("Could not find copied test resource file: "+file); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/000077500000000000000000000000001254015153300264045ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/goals.txt000066400000000000000000000000601254015153300302460ustar00rootroot00000000000000clean clojure:compile clojure:test-with-junit clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/pom.xml000066400000000000000000000027311254015153300277240ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it test-with-junit testing clojure test-with-junit http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true org.clojure clojure 1.3.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/000077500000000000000000000000001254015153300271735ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/test/000077500000000000000000000000001254015153300301525ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/test/clojure/000077500000000000000000000000001254015153300316155ustar00rootroot00000000000000succeeding.clj000066400000000000000000000001141254015153300343350ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/test/clojure(ns succeeding (:use clojure.test) ) (deftest atest (is true) ) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/verify.bsh000066400000000000000000000026501254015153300304110ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/test-reports/succeeding.xml" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated report: " + file ); } Reader r = new BufferedReader(new FileReader(file)); String line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 1 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 2 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 3 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 4 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 5 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 6 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 7 should be [] but was:" + line); }clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/000077500000000000000000000000001254015153300300315ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/goals.txt000066400000000000000000000000601254015153300316730ustar00rootroot00000000000000clean clojure:compile clojure:test-with-junit invoker.properties000066400000000000000000000001671254015153300335510ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3# The expected result of the build, possible values are "success" (default) and "failure" invoker.buildResult = failureclojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/pom.xml000066400000000000000000000030561254015153300313520ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it test-with-junit-failure testing clojure test-with-junit-failure http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true true org.clojure clojure 1.3.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/000077500000000000000000000000001254015153300306205ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/test/000077500000000000000000000000001254015153300315775ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/test/clojure/000077500000000000000000000000001254015153300332425ustar00rootroot00000000000000failing.clj000066400000000000000000000001171254015153300352650ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/test/clojure(ns failing (:use clojure.test) ) (deftest atest (is false "<>") ) passing.clj000066400000000000000000000001141254015153300353150ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/test/clojure(ns passing (:use clojure.test) ) (deftest atest (is (= 0 0)) ) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/verify.bsh000066400000000000000000000041071254015153300320350ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/test-reports/failing.xml" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated report: " + file ); } Reader r = new BufferedReader(new FileReader(file)); String line = r.readLine(); if (!"".equals(line)) { throw new RuntimeException("line 1 should be but was:" + line); } line = r.readLine(); if (!"".equals(line)) { throw new RuntimeException("line 2 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 3 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 4 should be [] but was:" + line); } line = r.readLine().trim(); if (!"<>".equals(line)) { throw new RuntimeException("line 5 should be [<>" + line); } line = r.readLine().trim(); if (!"expected: false".equals(line)) { throw new RuntimeException("line 6 should be [expected: false] but was:" + line); } line = r.readLine().trim(); if (!"actual: false".equals(line)) { throw new RuntimeException("line 7 should be [actual: false] but was:" + line); } line = r.readLine().trim(); if (!(line.startsWith("at:") && line.endsWith(""))) { throw new RuntimeException("line 8 should be [at: test.clj:344] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 9 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 10 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 11 should be [] but was:" + line); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/000077500000000000000000000000001254015153300275325ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/goals.txt000066400000000000000000000000601254015153300313740ustar00rootroot00000000000000clean clojure:compile clojure:test-with-junit clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/invoker.properties000066400000000000000000000001671254015153300333310ustar00rootroot00000000000000# The expected result of the build, possible values are "success" (default) and "failure" invoker.buildResult = failureclojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/pom.xml000066400000000000000000000027521254015153300310550ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it test-with-junit-failure testing clojure test-with-junit-failure http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true false org.clojure clojure 1.2.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/000077500000000000000000000000001254015153300303215ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/test/000077500000000000000000000000001254015153300313005ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/test/clojure/000077500000000000000000000000001254015153300327435ustar00rootroot00000000000000failing.clj000066400000000000000000000001171254015153300347660ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/test/clojure(ns failing (:use clojure.test) ) (deftest atest (is false "<>") ) passing.clj000066400000000000000000000001141254015153300350160ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/test/clojure(ns passing (:use clojure.test) ) (deftest atest (is (= 0 0)) ) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/verify.bsh000066400000000000000000000040621254015153300315360ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/test-reports/failing.xml" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated report: " + file ); } Reader r = new BufferedReader(new FileReader(file)); String line = r.readLine(); if (!"".equals(line)) { throw new RuntimeException("line 1 should be but was:" + line); } line = r.readLine(); if (!"".equals(line)) { throw new RuntimeException("line 2 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 3 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 4 should be [] but was:" + line); } line = r.readLine().trim(); if (!"<>".equals(line)) { throw new RuntimeException("line 5 should be [<>" + line); } line = r.readLine().trim(); if (!"expected: false".equals(line)) { throw new RuntimeException("line 6 should be [expected: false] but was:" + line); } line = r.readLine().trim(); if (!"actual: false".equals(line)) { throw new RuntimeException("line 7 should be [actual: false] but was:" + line); } line = r.readLine().trim(); if (!(line.startsWith("at:") && line.endsWith(""))) { throw new RuntimeException("line 8 should be [at: test.clj:344] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 9 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 10 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 11 should be [] but was:" + line); } clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/000077500000000000000000000000001254015153300261055ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/goals.txt000066400000000000000000000000601254015153300277470ustar00rootroot00000000000000clean clojure:compile clojure:test-with-junit clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/pom.xml000066400000000000000000000027321254015153300274260ustar00rootroot00000000000000 4.0.0 com.theoryinpractise.it test-with-junit testing clojure test-with-junit http://maven.apache.org UTF-8 clojure-releases http://build.clojure.org/releases clojars http://clojars.org/repo/ com.theoryinpractise clojure-maven-plugin @project.version@ true false org.clojure clojure 1.2.0 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/000077500000000000000000000000001254015153300266745ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/test/000077500000000000000000000000001254015153300276535ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/test/clojure/000077500000000000000000000000001254015153300313165ustar00rootroot00000000000000succeeding.clj000066400000000000000000000001141254015153300340360ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/test/clojure(ns succeeding (:use clojure.test) ) (deftest atest (is true) ) clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/verify.bsh000066400000000000000000000026501254015153300301120ustar00rootroot00000000000000import java.io.*; File file = new File( basedir, "target/test-reports/succeeding.xml" ); if ( !file.isFile() ) { throw new FileNotFoundException( "Could not find generated report: " + file ); } Reader r = new BufferedReader(new FileReader(file)); String line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 1 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 2 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 3 should be but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 4 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 5 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 6 should be [] but was:" + line); } line = r.readLine().trim(); if (!"".equals(line)) { throw new RuntimeException("line 7 should be [] but was:" + line); }clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/000077500000000000000000000000001254015153300233365ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/000077500000000000000000000000001254015153300242575ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/000077500000000000000000000000001254015153300250355ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/000077500000000000000000000000001254015153300304315ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/000077500000000000000000000000001254015153300320745ustar00rootroot00000000000000AbstractClojureCompilerMojo.java000066400000000000000000000411611254015153300402720ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Scanner; import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarOutputStream; import java.util.jar.Manifest; import java.util.regex.Pattern; import com.google.common.base.Strings; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteException; import org.apache.commons.exec.ExecuteStreamHandler; import org.apache.commons.exec.Executor; import org.apache.commons.exec.PumpStreamHandler; import org.apache.commons.exec.ShutdownHookProcessDestroyer; import org.apache.commons.lang.SystemUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.toolchain.Toolchain; import org.apache.maven.toolchain.ToolchainManager; public abstract class AbstractClojureCompilerMojo extends AbstractMojo { @Parameter(required = true, readonly = true, property = "project") protected MavenProject project; @Component private ToolchainManager toolchainManager; @Parameter(required = true, readonly = true, property = "session") private MavenSession session; @Parameter(required = true, readonly = true, property = "basedir") protected File baseDirectory; @Parameter(required = true, readonly = true, property = "project.compileClasspathElements") protected List classpathElements; @Parameter(required = true, readonly = true, property = "project.testClasspathElements") protected List testClasspathElements; @Parameter(required = true, property = "plugin.artifacts") private java.util.List pluginArtifacts; @Parameter(required = true, defaultValue = "${project.build.outputDirectory}") protected File outputDirectory; @Parameter(required = true, defaultValue = "${project.build.testOutputDirectory}") protected File testOutputDirectory; /** * Location of the source files. */ @Parameter protected String[] sourceDirectories = new String[] {"src/main/clojure"}; /** * Location of the source files. */ @Parameter protected String[] testSourceDirectories = new String[] {"src/test/clojure"}; /** * Location of the source files. */ @Parameter(required = true, defaultValue = "${project.build.testSourceDirectory}") protected File baseTestSourceDirectory; /** * Location of the generated source files. */ @Parameter(required = true, defaultValue = "${project.build.outputDirectory}/../generated-sources") protected File generatedSourceDirectory; /** * Working directory for forked java clojure process. */ @Parameter protected File workingDirectory; /** * Should we compile all namespaces or only those defined? */ @Parameter(defaultValue = "false") protected boolean compileDeclaredNamespaceOnly; /** * A list of namespaces to compile */ @Parameter protected String[] namespaces; /** * Should we test all namespaces or only those defined? */ @Parameter(defaultValue = "false") protected boolean testDeclaredNamespaceOnly; /** * A list of test namespaces to compile */ @Parameter protected String[] testNamespaces; /** * Classes to put onto the command line before the main class */ @Parameter private List prependClasses; /** * Clojure/Java command-line options */ @Parameter(property = "clojure.options") private String clojureOptions = ""; /** * Run with test-classpath or compile-classpath? */ @Parameter(property = "clojure.runwith.test", defaultValue = "true") private boolean runWithTests; /** * Include plugin dependencies in classpath? */ @Parameter(defaultValue = "false") private boolean includePluginDependencies; /** * A list of namespaces whose source files will be copied to the output. */ @Parameter protected String[] copiedNamespaces; /** * Should we copy the source of all namespaces or only those defined? */ @Parameter(defaultValue = "false") protected boolean copyDeclaredNamespaceOnly; /** * Source file encoding */ @Parameter(defaultValue = "${project.build.sourceEncoding}") protected String charset; /** * Should the source files of all compiled namespaces be copied to the output? * This overrides copiedNamespaces and copyDeclaredNamespaceOnly. */ @Parameter(defaultValue = "false") private boolean copyAllCompiledNamespaces; /** * Should reflective invocations in Clojure source emit warnings? Corresponds with * the *warn-on-reflection* var and the clojure.compile.warn-on-reflection system property. */ @Parameter(defaultValue = "false") private boolean warnOnReflection; /** * Specify additional vmargs to use when running clojure or swank. */ @Parameter(property = "clojure.vmargs") private String vmargs; /** * Spawn a new console window for interactive clojure sessions on Windows */ @Parameter(defaultValue = "true") private boolean spawnInteractiveConsoleOnWindows; /** * Which Windows command to use when starting the REPL */ @Parameter(defaultValue = "cmd /c start") private String windowsConsole; /** * Escapes the given file path so that it's safe for inclusion in a * Clojure string literal. * * @param directory directory path * @param file file name * @return escaped file path, ready for inclusion in a string literal */ protected String escapeFilePath(String directory, String file) { return escapeFilePath(new File(directory, file)); } /** * Escapes the given file path so that it's safe for inclusion in a * Clojure string literal. * * @param file * @return escaped file path, ready for inclusion in a string literal */ protected String escapeFilePath(final File file) { // TODO: Should handle also possible newlines, etc. return file.getPath().replace("\\", "\\\\"); } private String getJavaExecutable() throws MojoExecutionException { Toolchain tc = toolchainManager.getToolchainFromBuildContext("jdk", //NOI18N session); if (tc != null) { getLog().info("Toolchain in clojure-maven-plugin: " + tc); String foundExecutable = tc.findTool("java"); if (foundExecutable != null) { return foundExecutable; } else { throw new MojoExecutionException("Unable to find 'java' executable for toolchain: " + tc); } } return "java"; } protected File getWorkingDirectory() throws MojoExecutionException { if (workingDirectory != null) { if (workingDirectory.exists()) { return workingDirectory; } else { throw new MojoExecutionException("Directory specified in does not exists: " + workingDirectory.getPath()); } } else { return session.getCurrentProject().getBasedir(); } } protected File createTemporaryDirectory(String name) throws MojoExecutionException { File temp; try { temp = File.createTempFile(name, ".dir"); } catch (IOException e) { throw new MojoExecutionException("Unable to create temporary output directory: " + e.getMessage()); } temp.delete(); temp.mkdir(); return temp; } private File[] translatePaths(String[] paths) { File[] files = new File[paths.length]; for (int i = 0; i < paths.length; i++) { files[i] = new File(baseDirectory, paths[i]); } return files; } protected NamespaceInFile[] discoverNamespaces() throws MojoExecutionException { return new NamespaceDiscovery(getLog(), outputDirectory, charset, compileDeclaredNamespaceOnly, false).discoverNamespacesIn(namespaces, translatePaths(sourceDirectories)); } protected NamespaceInFile[] discoverNamespacesToCopy() throws MojoExecutionException { if (copyAllCompiledNamespaces) return discoverNamespaces(); else return new NamespaceDiscovery(getLog(), outputDirectory, charset, copyDeclaredNamespaceOnly, false).discoverNamespacesIn(copiedNamespaces, translatePaths(sourceDirectories)); } public enum SourceDirectory { COMPILE, TEST } public File[] getSourceDirectories(SourceDirectory... sourceDirectoryTypes) { List dirs = new ArrayList(); if (Arrays.asList(sourceDirectoryTypes).contains(SourceDirectory.COMPILE)) { dirs.add(generatedSourceDirectory); dirs.addAll(Arrays.asList(translatePaths(sourceDirectories))); } if (Arrays.asList(sourceDirectoryTypes).contains(SourceDirectory.TEST)) { dirs.add(baseTestSourceDirectory); dirs.addAll(Arrays.asList(translatePaths(testSourceDirectories))); } return dirs.toArray(new File[] {}); } public List getRunWithClasspathElements() { Set classPathElements = new HashSet(); if (includePluginDependencies) { for (Artifact artifact : pluginArtifacts) { classPathElements.add(artifact.getFile().getPath()); } } classPathElements.addAll(runWithTests ? testClasspathElements : classpathElements); return new ArrayList(classPathElements); } protected void copyNamespaceSourceFilesToOutput(File outputDirectory, NamespaceInFile[] discoveredNamespaces) throws MojoExecutionException { for (NamespaceInFile ns : discoveredNamespaces) { File outputFile = new File(outputDirectory, ns.getFilename()); outputFile.getParentFile().mkdirs(); try { FileInputStream is = new FileInputStream(ns.getSourceFile()); try { FileOutputStream os = new FileOutputStream(outputFile); try { int amountRead; byte[] buffer = new byte[4096]; while ((amountRead = is.read(buffer)) >= 0) { os.write(buffer, 0, amountRead); } } finally { os.close(); } } finally { is.close(); } } catch (IOException ex) { throw new MojoExecutionException("Couldn't copy the clojure source files to the output", ex); } } } protected void callClojureWith( File[] sourceDirectory, File outputDirectory, List compileClasspathElements, String mainClass, NamespaceInFile[] namespaceArgs) throws MojoExecutionException { callClojureWith(ExecutionMode.BATCH, sourceDirectory, outputDirectory, compileClasspathElements, mainClass, namespaceArgs); } protected void callClojureWith( File[] sourceDirectory, File outputDirectory, List compileClasspathElements, String mainClass, String[] clojureArgs) throws MojoExecutionException { callClojureWith(ExecutionMode.BATCH, sourceDirectory, outputDirectory, compileClasspathElements, mainClass, clojureArgs); } protected void callClojureWith( ExecutionMode executionMode, File[] sourceDirectory, File outputDirectory, List compileClasspathElements, String mainClass, NamespaceInFile[] namespaceArgs) throws MojoExecutionException { String[] stringArgs = new String[namespaceArgs.length]; for (int i = 0; i < namespaceArgs.length; i++) { stringArgs[i] = namespaceArgs[i].getName(); } callClojureWith(executionMode, sourceDirectory, outputDirectory, compileClasspathElements, mainClass, stringArgs); } protected void callClojureWith( ExecutionMode executionMode, File[] sourceDirectory, File outputDirectory, List compileClasspathElements, String mainClass, String[] clojureArgs) throws MojoExecutionException { outputDirectory.mkdirs(); String classpath = manifestClasspath(sourceDirectory, outputDirectory, compileClasspathElements); final String javaExecutable = getJavaExecutable(); getLog().debug("Java exectuable used: " + javaExecutable); getLog().debug("Clojure manifest classpath: " + classpath); CommandLine cl = null; if (ExecutionMode.INTERACTIVE == executionMode && SystemUtils.IS_OS_WINDOWS && spawnInteractiveConsoleOnWindows) { Scanner sc = new Scanner(windowsConsole); Pattern pattern = Pattern.compile("\"[^\"]*\"|'[^']*'|[\\w'/]+"); cl = new CommandLine(sc.findInLine(pattern)); String param; while ((param = sc.findInLine(pattern)) != null) { cl.addArgument(param); } cl.addArgument(javaExecutable); } else { cl = new CommandLine(javaExecutable); } if (vmargs != null) { cl.addArguments(vmargs, false); } cl.addArgument("-Dclojure.compile.path=" + escapeFilePath(outputDirectory), false); if (warnOnReflection) cl.addArgument("-Dclojure.compile.warn-on-reflection=true"); cl.addArguments(clojureOptions, false); cl.addArgument("-jar"); File jar; if (prependClasses != null && prependClasses.size() > 0) { jar = createJar(classpath, prependClasses.get(0)); cl.addArgument(jar.getAbsolutePath(), false); List allButFirst = prependClasses.subList(1, prependClasses.size()); cl.addArguments(allButFirst.toArray(new String[allButFirst.size()])); cl.addArgument(mainClass); } else { jar = createJar(classpath, mainClass); cl.addArgument(jar.getAbsolutePath(), false); } if (clojureArgs != null) { cl.addArguments(clojureArgs, false); } getLog().debug("Command line: " + cl.toString()); Executor exec = new DefaultExecutor(); Map env = new HashMap(System.getenv()); // env.put("path", ";"); // env.put("path", System.getProperty("java.home")); ExecuteStreamHandler handler = new PumpStreamHandler(System.out, System.err, System.in); exec.setStreamHandler(handler); exec.setWorkingDirectory(getWorkingDirectory()); ShutdownHookProcessDestroyer destroyer = new ShutdownHookProcessDestroyer(); exec.setProcessDestroyer(destroyer); int status; try { status = exec.execute(cl, env); } catch (ExecuteException e) { status = e.getExitValue(); } catch (IOException e) { status = 1; } if (status != 0) { throw new MojoExecutionException("Clojure failed."); } } private String manifestClasspath(final File[] sourceDirectory, final File outputDirectory, final List compileClasspathElements) { String cp = getPath(sourceDirectory); cp = cp + outputDirectory.toURI() + " "; for (String classpathElement : compileClasspathElements) { cp = cp + new File(classpathElement).toURI() + " "; } cp = cp.replaceAll("\\s+", "\\ "); return cp; } private String getPath(File[] sourceDirectory) { String cp = ""; for (File directory : sourceDirectory) { cp = cp + directory.toURI() + " "; } return cp; } private File createJar(final String cp, final String mainClass) { try { Manifest manifest = new Manifest(); manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); manifest.getMainAttributes().put(Attributes.Name.CLASS_PATH, cp); manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, mainClass); File tempFile = File.createTempFile("clojuremavenplugin", "jar"); tempFile.deleteOnExit(); JarOutputStream target = new JarOutputStream(new FileOutputStream(tempFile), manifest); target.close(); return tempFile; } catch (IOException e) { throw new RuntimeException(e); } } protected boolean isExistingTestScriptFile(String path) { if(!Strings.isNullOrEmpty(path)) { File scriptFile = new File(path); if (scriptFile.isAbsolute()) { return scriptFile.exists(); } else { return new File(baseDirectory, path).exists(); } } return false; } protected boolean isClasspathResource(String path) { return !Strings.isNullOrEmpty(path) && path.startsWith("@"); } } ClojureAddSourceMojo.java000066400000000000000000000013301254015153300366770ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojurepackage com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import java.io.File; /** * Add Clojure source directories to the POM */ @Mojo(name = "add-source", defaultPhase = LifecyclePhase.GENERATE_SOURCES) public class ClojureAddSourceMojo extends AbstractClojureCompilerMojo { public void execute() throws MojoExecutionException, MojoFailureException { for (File file : this.getSourceDirectories(SourceDirectory.COMPILE)) { this.project.addCompileSourceRoot(file.getAbsolutePath()); } } } ClojureAddTestSourceMojo.java000066400000000000000000000013541254015153300375450ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojurepackage com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import java.io.File; /** * Add Clojure test source directories to the POM */ @Mojo(name = "add-test-source", defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES) public class ClojureAddTestSourceMojo extends AbstractClojureCompilerMojo { public void execute() throws MojoExecutionException, MojoFailureException { for (File file : this.getSourceDirectories(SourceDirectory.TEST)) { this.project.addTestCompileSourceRoot(file.getAbsolutePath()); } } } ClojureAutodocMojo.java000066400000000000000000000076321254015153300364370ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; @Mojo(name = "autodoc", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.TEST) public class ClojureAutodocMojo extends AbstractClojureCompilerMojo { @Parameter(property = "project.name") private String projectName; @Parameter(property = "project.description") private String projectDescription; @Parameter(property = "project.build.directory") private String projectBuildDir; @Parameter(defaultValue = "${project.build.directory}/autodoc") private String autodocTargetDirectory; @Parameter private Map autodoc; public void execute() throws MojoExecutionException { Map effectiveProps = new HashMap(); effectiveProps.put("name", projectName); effectiveProps.put("description", projectDescription); effectiveProps.put("param-dir", "src/main/autodoc"); effectiveProps.put("root", "."); effectiveProps.put("source-path", sourceDirectories[0]); effectiveProps.put("output-path", new File(autodocTargetDirectory).getAbsolutePath()); effectiveProps.put("page-title", projectName); // Not implemented with defaults: //effectiveProps.put("web-src-dir", ""); //effectiveProps.put("external-doc-tmpdir", ""); //effectiveProps.put("load-classpath", ""); //effectiveProps.put("load-jar-dirs", ""); //effectiveProps.put("namespaces-to-document", ""); //effectiveProps.put("trim-prefix", ""); //effectiveProps.put("load-except-list", ""); //effectiveProps.put("copyright", null); if (autodoc != null) { effectiveProps.putAll(autodoc); } StringBuilder sb = new StringBuilder(); sb.append("(use 'autodoc.autodoc)\n"); sb.append("(autodoc {\n"); for (Map.Entry entry : effectiveProps.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); sb.append(" :" + key); if (value != null) { // TODO: Handle possible newlines, etc. sb.append(" \"" + value.replace("\\", "\\\\") + "\""); } else { sb.append(" nil"); } sb.append("\n"); } sb.append("})\n"); try { File autodocClj = File.createTempFile("autodoc", ".clj"); final PrintWriter pw = new PrintWriter(autodocClj); pw.print(sb.toString()); pw.close(); getLog().info("Generating docs to " + effectiveProps.get("output-path") + " with " + autodocClj.getPath()); getLog().debug(sb.toString()); callClojureWith( getSourceDirectories(SourceDirectory.COMPILE, SourceDirectory.TEST), outputDirectory, testClasspathElements, "clojure.main", new String[]{autodocClj.getPath()}); } catch (IOException e) { throw new MojoExecutionException(e.getMessage()); } } } ClojureCompilerMojo.java000066400000000000000000000034031254015153300366030ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; @Mojo(name = "compile", defaultPhase = LifecyclePhase.COMPILE, requiresDependencyResolution = ResolutionScope.COMPILE) public class ClojureCompilerMojo extends AbstractClojureCompilerMojo { /** * Should the compile phase create a temporary output directory for .class files? */ @Parameter(required = true, defaultValue = "false") protected Boolean temporaryOutputDirectory; public void execute() throws MojoExecutionException { File outputPath = (temporaryOutputDirectory) ? createTemporaryDirectory("classes") : outputDirectory; getLog().debug("Compiling clojure sources to " + outputPath.getPath()); callClojureWith( getSourceDirectories(SourceDirectory.COMPILE), outputPath, classpathElements, "clojure.lang.Compile", discoverNamespaces()); copyNamespaceSourceFilesToOutput(outputDirectory, discoverNamespacesToCopy()); } } ClojureGenDocMojo.java000066400000000000000000000064611254015153300361770ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.io.IOException; import java.io.PrintWriter; @Mojo(name = "gendoc", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.TEST) public class ClojureGenDocMojo extends AbstractClojureCompilerMojo { /** * Should we compile all namespaces or only those defined? */ @Parameter(defaultValue = "false") private boolean generateTestDocumentation; public void execute() throws MojoExecutionException { File genDocClj; File docsDir; try { genDocClj = File.createTempFile("generate-docs", ".clj"); if (!outputDirectory.getParentFile().exists()) { outputDirectory.getParentFile().mkdir(); } docsDir = new File(outputDirectory.getParentFile(), "clojure"); getLog().debug("Creating documentation directory " + docsDir.getPath()); docsDir.mkdir(); System.out.println(docsDir.getPath() + " exists " + docsDir.exists()); } catch (IOException e) { throw new MojoExecutionException(e.getMessage()); } StringBuilder sb = new StringBuilder(); sb.append("(use 'clojure.contrib.gen-html-docs)\n"); sb.append("(generate-documentation-to-file \n"); int count = 0; sb.append(" \"").append(docsDir.getPath().replace('\\', '/')).append("/index.html\"\n"); sb.append(" ["); final NamespaceInFile[] allNamespaces = new NamespaceDiscovery(getLog(), outputDirectory, charset, compileDeclaredNamespaceOnly) .discoverNamespacesIn(namespaces, getSourceDirectories(SourceDirectory.COMPILE, SourceDirectory.TEST)); for (NamespaceInFile namespace : allNamespaces) { sb.append("'").append(namespace.getName()); if (count++ < allNamespaces.length - 1) { sb.append("\n "); } } sb.append("])\n"); try { final PrintWriter pw = new PrintWriter(genDocClj); pw.print(sb.toString()); pw.close(); getLog().info("Generating docs to " + docsDir.getCanonicalPath() + " with " + genDocClj.getPath()); getLog().debug(sb.toString()); } catch (IOException e) { throw new MojoExecutionException(e.getMessage()); } callClojureWith( getSourceDirectories(SourceDirectory.COMPILE, SourceDirectory.TEST), outputDirectory, testClasspathElements, "clojure.main", new String[]{genDocClj.getPath()}); } } ClojureMarginaliaMojo.java000066400000000000000000000155441254015153300371060ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Vector; /** * Mojo for running Marginalia. Allows configuration of the source list * and target directory. */ @Mojo(name = "marginalia", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.TEST) public class ClojureMarginaliaMojo extends AbstractClojureCompilerMojo { /** * The Maven Project. */ @Parameter(readonly = true, required = true, property = "project") private MavenProject project = null; @Parameter(property = "project.name") private String projectName; @Parameter(property = "project.version") private String projectVersion; @Parameter(property = "project.description") private String projectDescription; @Parameter(property = "project.build.directory") private String projectBuildDir; /** * Location of the source files. */ @Parameter private String[] marginaliaSourceDirectories; /** * Location of the output files. */ @Parameter(defaultValue = "${project.build.directory}/marginalia") private String marginaliaTargetDirectory; @Parameter private Map marginalia; private Set filterScope(Set artifacts, String scope) { Vector to_remove = new Vector(); for (Artifact artifact : artifacts) { if (artifact.getScope() != scope) to_remove.add(artifact); } artifacts.removeAll(to_remove); return artifacts; } private String quote(String s) { StringBuilder sb = new StringBuilder(); sb.append("\""); sb.append(s); sb.append("\""); return sb.toString(); } private String formatDependencies(Set artifacts) { StringBuilder sb = new StringBuilder(); sb.append("[\n"); for (Artifact artifact : artifacts) { sb.append("[\""); sb.append(artifact.getGroupId()); sb.append("/"); sb.append(artifact.getArtifactId()); sb.append("\" \""); sb.append(artifact.getVersion()); sb.append("\"]\n"); } sb.append("]"); return sb.toString(); } private String formatMap(Map map) { StringBuilder sb = new StringBuilder(); sb.append("{\n"); for (Map.Entry entry : map.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); sb.append(" :" + key + " "); if (value != null) { sb.append(value); } else { sb.append("nil"); } sb.append("\n"); } sb.append("}\n"); return sb.toString(); } public void execute() throws MojoExecutionException { // Build a project info map Map effectiveProps = new HashMap(); effectiveProps.put("name", quote(projectName)); effectiveProps.put("version", quote(projectVersion)); effectiveProps.put("description", quote(projectDescription)); effectiveProps.put("dependencies", formatDependencies( filterScope( project.getDependencyArtifacts(), Artifact.SCOPE_COMPILE))); effectiveProps.put("dev-dependencies", formatDependencies( filterScope( project.getDependencyArtifacts(), Artifact.SCOPE_TEST))); if (marginalia != null) { effectiveProps.put("marginalia", formatMap(marginalia)); } boolean multiDoc = ( marginalia == null ? false : ("true".equals(marginalia.get("multi"))) ); // Build the script to run marginalia StringBuilder sb = new StringBuilder(); sb.append("(use `marginalia.core '[marginalia.html :only (*resources*)])\n"); // fix per https://github.com/fogus/marginalia/issues/43 sb.append("(binding [*resources* \"\"]\n"); sb.append("(ensure-directory! \""); sb.append(marginaliaTargetDirectory); sb.append("\")\n"); sb.append( multiDoc ? "(multidoc!\n" : "(uberdoc!\n" ); // Create the output destination sb.append(" \""); sb.append(marginaliaTargetDirectory); if ( !multiDoc ) sb.append("/uberdoc.html"); sb.append("\"\n"); // Create the list of sources to process sb.append(" (format-sources ["); // Append the explicit marginalia source paths, or project source paths for (String entry : (marginaliaSourceDirectories != null && marginaliaSourceDirectories.length > 0 ? marginaliaSourceDirectories : sourceDirectories)) { sb.append("\""); sb.append(baseDirectory); sb.append("/"); sb.append(entry); sb.append("\" "); } sb.append("])\n"); // and the project map sb.append(formatMap(effectiveProps)); sb.append(")\n"); sb.append(")\n"); // Run it try { File marginaliaClj = File.createTempFile("marginalia", ".clj"); final PrintWriter pw = new PrintWriter(marginaliaClj); pw.print(sb.toString()); pw.close(); getLog().info("Generating marginalia docs"); getLog().debug(sb.toString()); callClojureWith( getSourceDirectories(SourceDirectory.COMPILE, SourceDirectory.TEST), outputDirectory, testClasspathElements, "clojure.main", new String[]{marginaliaClj.getPath()}); } catch (IOException e) { throw new MojoExecutionException(e.getMessage()); } } } ClojureNReplMojo.java000066400000000000000000000047661254015153300360660ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.commons.lang.SystemUtils; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.util.ArrayList; import java.util.List; @Mojo(name = "nrepl", requiresDependencyResolution = ResolutionScope.TEST) public class ClojureNReplMojo extends AbstractClojureCompilerMojo { /** * The clojure script to preceding the switch to the repl */ @Parameter private String replScript; @Parameter(defaultValue = "4005", property = "clojure.nrepl.port") protected int port; @Parameter(defaultValue = "localhost", property = "clojure.nrepl.host") protected String nreplHost; public void execute() throws MojoExecutionException { StringBuilder sb = new StringBuilder(); sb.append("(do "); sb.append("(clojure.tools.nrepl.server/start-server"); sb.append(" :bind \"").append(nreplHost).append("\""); sb.append(" :port "); sb.append(Integer.toString(port)); sb.append("))"); String nreplLoader = sb.toString(); if (SystemUtils.IS_OS_WINDOWS) { nreplLoader = windowsEscapeCommandLineArg(nreplLoader); } List args = new ArrayList(); if (replScript != null && new File(replScript).exists()) { args.add("-i"); args.add(replScript); } args.add("-e"); args.add("(require (quote clojure.tools.nrepl.server))"); args.add("-e"); args.add(nreplLoader); callClojureWith( getSourceDirectories(SourceDirectory.TEST, SourceDirectory.COMPILE), outputDirectory, getRunWithClasspathElements(), "clojure.main", args.toArray(new String[args.size()])); } private String windowsEscapeCommandLineArg(String arg) { return "\"" + arg.replace("\"", "\\\"") + "\""; } } ClojureNailgunMojo.java000066400000000000000000000034471254015153300364360ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; /** * Mojo to start a clojure REPL running vimclojure's nailgun. */ @Mojo(name = "nailgun", defaultPhase = LifecyclePhase.TEST_COMPILE, requiresDependencyResolution = ResolutionScope.TEST) public class ClojureNailgunMojo extends AbstractClojureCompilerMojo { /** * The clojure script to preceding the switch to the repl */ @Parameter private String replScript; @Parameter(defaultValue = "2113", property = "clojure.nailgun.port") protected int port; /** * pre vimclojure 2.2.0: com.martiansoftware.nailgun.NGServer */ @Parameter(defaultValue = "vimclojure.nailgun.NGServer", property = "clojure.nailgun.server") protected String server; public void execute() throws MojoExecutionException { String[] args = new String[]{Integer.toString(port)}; callClojureWith(getSourceDirectories(SourceDirectory.TEST, SourceDirectory.COMPILE), outputDirectory, getRunWithClasspathElements(), server, args); } } ClojureReplMojo.java000066400000000000000000000065361254015153300357450ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Mojo to start a clojure repl */ @Mojo(name = "repl", defaultPhase = LifecyclePhase.TEST_COMPILE, requiresDependencyResolution = ResolutionScope.TEST) public class ClojureReplMojo extends AbstractClojureCompilerMojo { private static final String REPLY_REPLY_MAIN = "reply.ReplyMain"; /** * The clojure script to preceding the switch to the repl */ @Parameter private String replScript; private static final Pattern JLINE = Pattern.compile("^.*/jline-[^/]+.jar$"); private static final Pattern ICLOJURE = Pattern.compile("^.*/iclojure(-[^/]+)?.jar$"); private static final Pattern REPLY = Pattern.compile("^.*/reply(-[^/]+)?.jar$"); boolean isJLineAvailable(List elements) { return isPatternFoundInClasspath(elements, JLINE); } boolean isIClojureAvailable(List elements) { return isPatternFoundInClasspath(elements, ICLOJURE); } boolean isReplyAvailable(List elements) { return isPatternFoundInClasspath(elements, REPLY); } private boolean isPatternFoundInClasspath(List elements, Pattern pattern) { if (elements != null) { for (String e : elements) { Matcher m = pattern.matcher(new File(e).toURI().toString()); if (m.matches()) return true; } } return false; } public void execute() throws MojoExecutionException { List args = new ArrayList(); String mainClass = "clojure.main"; if (isIClojureAvailable(classpathElements)) { mainClass = "com.offbytwo.iclojure.Main"; } else if (isReplyAvailable(classpathElements)) { mainClass = REPLY_REPLY_MAIN; } else if (isJLineAvailable(classpathElements)) { getLog().info("Enabling JLine support"); args.add("clojure.main"); mainClass = "jline.ConsoleRunner"; } if (replScript != null && new File(replScript).exists()) { args.add("-i"); args.add(replScript); if (!mainClass.equals(REPLY_REPLY_MAIN)) { args.add("-r"); } } callClojureWith( ExecutionMode.INTERACTIVE, getSourceDirectories(SourceDirectory.TEST, SourceDirectory.COMPILE), outputDirectory, getRunWithClasspathElements(), mainClass, args.toArray(new String[args.size()])); } } ClojureRunMojo.java000066400000000000000000000117341254015153300356030ustar00rootroot00000000000000clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/* * Copyright (c) Mark Derricutt 2010. * * The use and distribution terms for this software are covered by the Eclipse Public License 1.0 * (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html * at the root of this distribution. * * By using this software in any fashion, you are agreeing to be bound by the terms of this license. * * You must not remove this notice, or any other, from this software. */ package com.theoryinpractise.clojure; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @Mojo(name = "run", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME) public class ClojureRunMojo extends AbstractClojureCompilerMojo { /** * The main clojure script to run */ @Parameter(property = "clojure.script") private String script; /** * Additional scripts to run */ @Parameter private String[] scripts; /** * The fully qualified name of the main class to run. This main class is intended * to be one generated by :gen-class, although any Java class with a standard main() * function will do. */ @Parameter(property = "clojure.mainClass") private String mainClass; /** * args specified on the command line. */ @Parameter(property = "clojure.args") private String args; /** * Returns either a path to a temp file that loads all of the provided scripts, * or simply returns the singular script String (which therefore allows * for @ classpath-loading paths to be passed in as a script). *

* If multiple scripts are defined, they must all exist; otherwise an exception is thrown. */ private static String mergeScripts(String script, String[] scripts) throws MojoExecutionException { if (script == null || script.trim().equals("")) { throw new MojoExecutionException("