pax_global_header 0000666 0000000 0000000 00000000064 12540151533 0014511 g ustar 00root root 0000000 0000000 52 comment=a9ec5f9c00260d486d2803c927d4858697be1239
clojure-maven-plugin-clojure-maven-plugin-1.7.1/ 0000775 0000000 0000000 00000000000 12540151533 0021623 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/.gitignore 0000664 0000000 0000000 00000000375 12540151533 0023620 0 ustar 00root root 0000000 0000000
.*
*~
.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.log clojure-maven-plugin-clojure-maven-plugin-1.7.1/README.markdown 0000664 0000000 0000000 00000042141 12540151533 0024326 0 ustar 00root root 0000000 0000000 Welcome 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.theoryinpractiseclojure-maven-plugin1.3.23true
....
org.clojureclojure1.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/clojuresrc/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.foonet.*!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:
truetrue
## 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:
jlinejline0.9.94
If you prefer [IClojure](https://github.com/cosmin/IClojure) you can add:
com.offbytwo.iclojureiclojure1.1.0
Or [REPL-y](https://github.com/trptcolin/reply/):
replyreply0.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:
clojarshttp://clojars.org/repo/
and then declaring the dependency itself:
swank-clojureswank-clojure1.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.clojuretools.nrepl0.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:
localhost9001
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.kotkavimclojureX.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.
vimclojureserver2.2.0
The jar can be found in [clojars](http://clojars.org/) maven repo (you'll have
to add it to the `repositories` section)
clojarsClojarshttp://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.html 0000664 0000000 0000000 00000031165 12540151533 0023703 0 ustar 00root root 0000000 0000000
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.xml 0000664 0000000 0000000 00000026356 12540151533 0023154 0 ustar 00root root 0000000 0000000
4.0.0clojure-maven-plugin Maven Mojocom.theoryinpractiseclojure-maven-pluginmaven-plugin1.7.1Maven plugin for compiling clojure source fileshttp://github.com/talios/clojure-maven-pluginscm:git:git@github.com:talios/clojure-maven-plugin.gitscm:git:git@github.com:talios/clojure-maven-plugin.githttp://github.com/talios/clojure-maven-pluginclojure-maven-plugin-1.7.1UTF-8taliosMark Derricuttmark@talios.comhttp://www.talios.comTim Dysingertim -on- dysinger.netStuart Sierramail@stuartsierra.comScott Fleckensteinnullstyle@gmail.comJukka Zittingjukka.zitting@gmail.comChas Emerickcemerick@snowtide.comCosmin Stejereancosmin@offbytwo.comEclipse Public Licensesonatype-stagingoss.sonatype.org Staging Repositoryhttp://oss.sonatype.org/service/local/staging/deploy/maven2/github-snapshotsoss.sonatype.org github Release Repository Snapshot Repositoryhttp://oss.sonatype.org/content/repositories/github-snapshots/releaseperformReleasetrueorg.apache.maven.pluginsmaven-gpg-plugin1.5sign-artifactsverifysignmaven-compiler-plugin3.11.51.5org.apache.maven.pluginsmaven-plugin-plugin3.2truemojo-descriptordescriptorhelp-goalhelpmojomaven-release-plugin2.4.1org.apache.maven.scmmaven-scm-provider-gitexe1.8.1clean installdeployfalsetruetruemaven-invoker-plugin1.8src/it${project.build.directory}/it*/pom.xmlsrc/it/settings.xml${project.build.directory}/local-repoverify.bshtrueintegration-testinstallrunorg.apache.maven.pluginsmaven-site-plugin3.0-beta-2org.apache.maven.pluginsmaven-javadoc-plugin2.7org.apache.maven.pluginsmaven-jxr-plugin2.1trueorg.apache.maven.pluginsmaven-surefire-report-plugin2.6org.codehaus.mojocobertura-maven-plugin2.4xmlhtmlorg.apache.maven.pluginsmaven-checkstyle-plugin2.6org.apache.maven.plugin-toolsmaven-plugin-annotations3.2compileorg.codehaus.plexusplexus-utils3.0.17org.apache.mavenmaven-plugin-api3.2.1junitjunit4.11testorg.easytestingfest-assert-core2.0M10testorg.mockitomockito-all1.9.5testorg.apache.commonscommons-exec1.2org.apache.commonscommons-io1.3.2commons-langcommons-lang2.6org.apache.mavenmaven-toolchain3.0-alpha-2org.apache.mavenmaven-core3.2.1org.codehaus.plexusplexus-compiler-api2.3
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/ 0000775 0000000 0000000 00000000000 12540151533 0022412 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/ 0000775 0000000 0000000 00000000000 12540151533 0023026 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/ 0000775 0000000 0000000 00000000000 12540151533 0025117 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/goals.txt 0000664 0000000 0000000 00000000027 12540151533 0026764 0 ustar 00root root 0000000 0000000 clean clojure:autodoc
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/pom.xml 0000664 0000000 0000000 00000004016 12540151533 0026435 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itautodoctestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetrueorg.clojureclojure1.1.0org.clojureclojure-contrib1.1.0autodocautodoc0.7.1org.clojureclojure-contrib
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/ 0000775 0000000 0000000 00000000000 12540151533 0025706 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0026632 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0030275 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.1.0/src/main/clojure/autodoc.clj 0000664 0000000 0000000 00000000146 12540151533 0032426 0 ustar 00root root 0000000 0000000 (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.bsh 0000664 0000000 0000000 00000000312 12540151533 0027115 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0030546 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/goals.txt 0000664 0000000 0000000 00000000027 12540151533 0032413 0 ustar 00root root 0000000 0000000 clean clojure:autodoc
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/pom.xml 0000664 0000000 0000000 00000004160 12540151533 0032064 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itautodoctestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetruesrc${project.build.directory}/autodoc2org.clojureclojure1.2.0org.clojureclojure-contrib1.2.0autodocautodoc0.7.1
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0-nonstandard-paths/src/ 0000775 0000000 0000000 00000000000 12540151533 0031335 5 ustar 00root root 0000000 0000000 autodoc.clj 0000664 0000000 0000000 00000000146 12540151533 0033407 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000000257 12540151533 0032554 0 ustar 00root root 0000000 0000000 File 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/ 0000775 0000000 0000000 00000000000 12540151533 0025120 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/goals.txt 0000664 0000000 0000000 00000000027 12540151533 0026765 0 ustar 00root root 0000000 0000000 clean clojure:autodoc
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/pom.xml 0000664 0000000 0000000 00000003426 12540151533 0026442 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itautodoctestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetrueorg.clojureclojure1.2.0org.clojureclojure-contrib1.2.0autodocautodoc0.7.1
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/ 0000775 0000000 0000000 00000000000 12540151533 0025707 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0026633 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0030276 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/autodoc-1.2.0/src/main/clojure/autodoc.clj 0000664 0000000 0000000 00000000146 12540151533 0032427 0 ustar 00root root 0000000 0000000 (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.bsh 0000664 0000000 0000000 00000000312 12540151533 0027116 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026407 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030253 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/pom.xml 0000664 0000000 0000000 00000004263 12540151533 0027731 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itbasic-usage-testtestingjarpackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truecompilecompilecompiletesttest-compiletestCompileorg.clojureclojure1.3.0-beta1org.clojure.contribgen-html-docs1.3.0-alpha4
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/ 0000775 0000000 0000000 00000000000 12540151533 0027176 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030122 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test-13/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031565 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0034115 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001073 12540151533 0030412 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026166 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030032 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/pom.xml 0000664 0000000 0000000 00000003306 12540151533 0027505 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itbasic-usage-testtestingjarpackaging-testhttp://maven.apache.orgUTF-8com.theoryinpractiseclojure-maven-plugin@project.version@truecompilecompilecompiletesttest-compiletestCompileorg.clojureclojure1.1.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/ 0000775 0000000 0000000 00000000000 12540151533 0026755 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0027701 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/basic-usage-test/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031344 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0033674 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001073 12540151533 0030171 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026750 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/goals.txt 0000664 0000000 0000000 00000000032 12540151533 0030611 0 ustar 00root root 0000000 0000000 clean clojure:marginalia
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/pom.xml 0000664 0000000 0000000 00000004457 12540151533 0030277 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itmarginaliatestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetruetrueorg.clojureclojure1.2.0org.clojureclojure-contrib1.2.0marginaliamarginalia0.7.1org.clojureclojureorg.clojureclojure-contrib
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/ 0000775 0000000 0000000 00000000000 12540151533 0027537 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030463 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia-multidoc/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0032126 5 ustar 00root root 0000000 0000000 autodoc.clj 0000664 0000000 0000000 00000000146 12540151533 0034200 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000000310 12540151533 0030744 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0025132 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/goals.txt 0000664 0000000 0000000 00000000032 12540151533 0026773 0 ustar 00root root 0000000 0000000 clean clojure:marginalia
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/pom.xml 0000664 0000000 0000000 00000004300 12540151533 0026444 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itmarginaliatestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetrueorg.clojureclojure1.2.0org.clojureclojure-contrib1.2.0marginaliamarginalia0.7.1org.clojureclojureorg.clojureclojure-contrib
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/ 0000775 0000000 0000000 00000000000 12540151533 0025721 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0026645 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0030310 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/marginalia/src/main/clojure/autodoc.clj 0000664 0000000 0000000 00000000146 12540151533 0032441 0 ustar 00root root 0000000 0000000 (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.bsh 0000664 0000000 0000000 00000000314 12540151533 0027132 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026266 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030132 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/ 0000775 0000000 0000000 00000000000 12540151533 0030626 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/pom.xml 0000664 0000000 0000000 00000002373 12540151533 0032150 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itmultimoduletestingclojuremultimodule-testhttp://maven.apache.orgUTF-8com.theoryinpractiseclojure-maven-plugin@project.version@truesrc/test/clojure/runtest.cljorg.clojureclojure1.1.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/ 0000775 0000000 0000000 00000000000 12540151533 0031415 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0032341 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/main/clojure/0000775 0000000 0000000 00000000000 12540151533 0034004 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0036334 0 ustar 00root root 0000000 0000000 clojure-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/ 0000775 0000000 0000000 00000000000 12540151533 0032374 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/multimodule/src/test/clojure/0000775 0000000 0000000 00000000000 12540151533 0034037 5 ustar 00root root 0000000 0000000 runtest.clj 0000664 0000000 0000000 00000000043 12540151533 0036153 0 ustar 00root root 0000000 0000000 clojure-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.xml 0000664 0000000 0000000 00000001067 12540151533 0027607 0 ustar 00root root 0000000 0000000
4.0.0com.theoryinpractise.itmultimodule.parentmultimodule.parenttestinghttp://smxemail.compommultimodule
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/multimoduletest/verify.bsh 0000664 0000000 0000000 00000002026 12540151533 0030270 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026362 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030226 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/pom.xml 0000664 0000000 0000000 00000002532 12540151533 0027701 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itpackaging-testtestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@trueorg.clojureclojure1.1.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/ 0000775 0000000 0000000 00000000000 12540151533 0027151 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030075 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.1.0/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031540 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0034070 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001071 12540151533 0030363 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026365 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030231 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/pom.xml 0000664 0000000 0000000 00000002532 12540151533 0027704 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itpackaging-testtestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@trueorg.clojureclojure1.4.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/ 0000775 0000000 0000000 00000000000 12540151533 0027154 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030100 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.4.0/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031543 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0034073 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001071 12540151533 0030366 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026366 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030232 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/pom.xml 0000664 0000000 0000000 00000002532 12540151533 0027705 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itpackaging-testtestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@trueorg.clojureclojure1.5.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/ 0000775 0000000 0000000 00000000000 12540151533 0027155 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030101 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.5.0/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031544 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0034074 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001071 12540151533 0030367 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026370 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0030234 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/pom.xml 0000664 0000000 0000000 00000002536 12540151533 0027713 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itpackaging-testtestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@trueorg.clojureclojure1.7.0-RC1
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/ 0000775 0000000 0000000 00000000000 12540151533 0027157 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030103 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test-1.7.0/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031546 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0034076 0 ustar 00root root 0000000 0000000 clojure-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.cljc 0000664 0000000 0000000 00000000122 12540151533 0034406 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001562 12540151533 0030376 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0025727 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0027573 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/pom.xml 0000664 0000000 0000000 00000002532 12540151533 0027246 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itpackaging-testtestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@trueorg.clojureclojure1.2.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/ 0000775 0000000 0000000 00000000000 12540151533 0026516 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0027442 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031105 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/src/main/clojure/packaging.clj0000664 0000000 0000000 00000000102 12540151533 0033514 0 ustar 00root root 0000000 0000000 (ns packaging)
(defn hello-world
[]
(println "Hello World"))
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/packaging-test/verify.bsh 0000664 0000000 0000000 00000001071 12540151533 0027730 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026621 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/goals.txt 0000664 0000000 0000000 00000000023 12540151533 0030462 0 ustar 00root root 0000000 0000000 clean clojure:run
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/pom.xml 0000664 0000000 0000000 00000003242 12540151533 0030137 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itbasic-usage-testtestingjarpackaging-testhttp://maven.apache.orgUTF-8com.theoryinpractiseclojure-maven-plugin@project.version@trueorg.clojureclojure1.1.0runruntrue
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/ 0000775 0000000 0000000 00000000000 12540151533 0027410 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030334 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031777 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/runwithplugindeps/src/main/clojure/runme.clj 0000664 0000000 0000000 00000000121 12540151533 0033611 0 ustar 00root root 0000000 0000000 (ns packaging)
(defn hello-world
[]
(println "Hello World"))
(hello-world)
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/ 0000775 0000000 0000000 00000000000 12540151533 0031125 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0032771 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/pom.xml 0000664 0000000 0000000 00000003142 12540151533 0032442 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.itpackaging-testtestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetruepackagingorg.clojureclojure1.2.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/ 0000775 0000000 0000000 00000000000 12540151533 0031714 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0032640 5 ustar 00root root 0000000 0000000 clojure/ 0000775 0000000 0000000 00000000000 12540151533 0034224 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/selectivenamespacecompilation/src/main otherpackage.clj 0000664 0000000 0000000 00000000121 12540151533 0037345 0 ustar 00root root 0000000 0000000 clojure-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.clj 0000664 0000000 0000000 00000000102 12540151533 0036633 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001364 12540151533 0033133 0 ustar 00root root 0000000 0000000 import 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.xml 0000664 0000000 0000000 00000001555 12540151533 0025416 0 ustar 00root root 0000000 0000000
it-repotruelocal.central@localRepositoryUrl@truetruelocal.central@localRepositoryUrl@truetrue
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/ 0000775 0000000 0000000 00000000000 12540151533 0027206 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/goals.txt 0000664 0000000 0000000 00000000017 12540151533 0031052 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/pom.xml 0000664 0000000 0000000 00000002767 12540151533 0030537 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.ittemporaryoutputdirectorytestingclojurepackaging-testhttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetrueorg.clojureclojure1.2.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/ 0000775 0000000 0000000 00000000000 12540151533 0027775 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0030721 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/temporaryoutputpath/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0032364 5 ustar 00root root 0000000 0000000 packaging.clj 0000664 0000000 0000000 00000000102 12540151533 0034714 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000001102 12540151533 0031202 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026015 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/goals.txt 0000664 0000000 0000000 00000000016 12540151533 0027660 0 ustar 00root root 0000000 0000000 clean install
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/pom.xml 0000664 0000000 0000000 00000004755 12540151533 0027345 0 ustar 00root root 0000000 0000000 4.0.0clojureh908714124clojure-maven-plugin-demo1.0-SNAPSHOTjunitjunit4.11testorg.clojureclojure1.5.1org.clojuretools.logging0.2.6src/main/resourcestrue${project.build.outputDirectory}src/test/resources${project.build.testOutputDirectory}truemaven-surefire-plugin2.14.1default-testtesttestfalse1com.theoryinpractiseclojure-maven-plugin@project.version@true
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/ 0000775 0000000 0000000 00000000000 12540151533 0026604 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/ 0000775 0000000 0000000 00000000000 12540151533 0027530 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031173 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/clojure/h908714124/ 0000775 0000000 0000000 00000000000 12540151533 0032346 5 ustar 00root root 0000000 0000000 somens.clj 0000664 0000000 0000000 00000000200 12540151533 0034255 0 ustar 00root root 0000000 0000000 clojure-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/ 0000775 0000000 0000000 00000000000 12540151533 0031542 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/resources/main/ 0000775 0000000 0000000 00000000000 12540151533 0032466 5 ustar 00root root 0000000 0000000 build-info.properties 0000664 0000000 0000000 00000000344 12540151533 0036556 0 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/main/resources/main project.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/ 0000775 0000000 0000000 00000000000 12540151533 0027563 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/java/ 0000775 0000000 0000000 00000000000 12540151533 0030504 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/java/h908714124/ 0000775 0000000 0000000 00000000000 12540151533 0031657 5 ustar 00root root 0000000 0000000 ResourceTest.java 0000664 0000000 0000000 00000001345 12540151533 0035075 0 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/java/h908714124 package 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/ 0000775 0000000 0000000 00000000000 12540151533 0031575 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/resources/test/ 0000775 0000000 0000000 00000000000 12540151533 0032554 5 ustar 00root root 0000000 0000000 build-info.properties 0000664 0000000 0000000 00000000344 12540151533 0036644 0 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-resources/src/test/resources/test project.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.bsh 0000664 0000000 0000000 00000000300 12540151533 0030010 0 ustar 00root root 0000000 0000000 File 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/ 0000775 0000000 0000000 00000000000 12540151533 0026404 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/goals.txt 0000664 0000000 0000000 00000000060 12540151533 0030246 0 ustar 00root root 0000000 0000000 clean clojure:compile clojure:test-with-junit
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/pom.xml 0000664 0000000 0000000 00000002731 12540151533 0027724 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.ittest-with-junittestingclojuretest-with-junithttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetrueorg.clojureclojure1.3.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/ 0000775 0000000 0000000 00000000000 12540151533 0027173 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/test/ 0000775 0000000 0000000 00000000000 12540151533 0030152 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-1.3/src/test/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031615 5 ustar 00root root 0000000 0000000 succeeding.clj 0000664 0000000 0000000 00000000114 12540151533 0034335 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000002650 12540151533 0030411 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0030031 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/goals.txt 0000664 0000000 0000000 00000000060 12540151533 0031673 0 ustar 00root root 0000000 0000000 clean clojure:compile clojure:test-with-junit
invoker.properties 0000664 0000000 0000000 00000000167 12540151533 0033551 0 ustar 00root root 0000000 0000000 clojure-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 = failure clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/pom.xml 0000664 0000000 0000000 00000003056 12540151533 0031352 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.ittest-with-junit-failuretestingclojuretest-with-junit-failurehttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truetrueorg.clojureclojure1.3.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/ 0000775 0000000 0000000 00000000000 12540151533 0030620 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/test/ 0000775 0000000 0000000 00000000000 12540151533 0031577 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure-1.3/src/test/clojure/0000775 0000000 0000000 00000000000 12540151533 0033242 5 ustar 00root root 0000000 0000000 failing.clj 0000664 0000000 0000000 00000000117 12540151533 0035265 0 ustar 00root root 0000000 0000000 clojure-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.clj 0000664 0000000 0000000 00000000114 12540151533 0035315 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000004107 12540151533 0032035 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0027532 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/goals.txt 0000664 0000000 0000000 00000000060 12540151533 0031374 0 ustar 00root root 0000000 0000000 clean clojure:compile clojure:test-with-junit
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/invoker.properties 0000664 0000000 0000000 00000000167 12540151533 0033331 0 ustar 00root root 0000000 0000000 # The expected result of the build, possible values are "success" (default) and "failure"
invoker.buildResult = failure clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/pom.xml 0000664 0000000 0000000 00000002752 12540151533 0031055 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.ittest-with-junit-failuretestingclojuretest-with-junit-failurehttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truefalseorg.clojureclojure1.2.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/ 0000775 0000000 0000000 00000000000 12540151533 0030321 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/test/ 0000775 0000000 0000000 00000000000 12540151533 0031300 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit-failure/src/test/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0032743 5 ustar 00root root 0000000 0000000 failing.clj 0000664 0000000 0000000 00000000117 12540151533 0034766 0 ustar 00root root 0000000 0000000 clojure-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.clj 0000664 0000000 0000000 00000000114 12540151533 0035016 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000004062 12540151533 0031536 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0026105 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/goals.txt 0000664 0000000 0000000 00000000060 12540151533 0027747 0 ustar 00root root 0000000 0000000 clean clojure:compile clojure:test-with-junit
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/pom.xml 0000664 0000000 0000000 00000002732 12540151533 0027426 0 ustar 00root root 0000000 0000000 4.0.0com.theoryinpractise.ittest-with-junittestingclojuretest-with-junithttp://maven.apache.orgUTF-8clojure-releaseshttp://build.clojure.org/releasesclojarshttp://clojars.org/repo/com.theoryinpractiseclojure-maven-plugin@project.version@truefalseorg.clojureclojure1.2.0
clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/ 0000775 0000000 0000000 00000000000 12540151533 0026674 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/test/ 0000775 0000000 0000000 00000000000 12540151533 0027653 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/it/test-with-junit/src/test/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0031316 5 ustar 00root root 0000000 0000000 succeeding.clj 0000664 0000000 0000000 00000000114 12540151533 0034036 0 ustar 00root root 0000000 0000000 clojure-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.bsh 0000664 0000000 0000000 00000002650 12540151533 0030112 0 ustar 00root root 0000000 0000000 import 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/ 0000775 0000000 0000000 00000000000 12540151533 0023336 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/ 0000775 0000000 0000000 00000000000 12540151533 0024257 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/ 0000775 0000000 0000000 00000000000 12540151533 0025035 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/ 0000775 0000000 0000000 00000000000 12540151533 0030431 5 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure/ 0000775 0000000 0000000 00000000000 12540151533 0032074 5 ustar 00root root 0000000 0000000 AbstractClojureCompilerMojo.java 0000664 0000000 0000000 00000041161 12540151533 0040272 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000001330 12540151533 0036677 0 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure package 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.java 0000664 0000000 0000000 00000001354 12540151533 0037545 0 ustar 00root root 0000000 0000000 clojure-maven-plugin-clojure-maven-plugin-1.7.1/src/main/java/com/theoryinpractise/clojure package 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.java 0000664 0000000 0000000 00000007632 12540151533 0036437 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000003403 12540151533 0036603 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000006461 12540151533 0036177 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000015544 12540151533 0037106 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000004766 12540151533 0036066 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000003447 12540151533 0036436 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000006536 12540151533 0035745 0 ustar 00root root 0000000 0000000 clojure-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.java 0000664 0000000 0000000 00000011734 12540151533 0035603 0 ustar 00root root 0000000 0000000 clojure-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("