Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial import into new public SVN repository.
- Loading branch information
Showing
16 changed files
with
1,028 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<classpath> | |||
<classpathentry kind="src" path="src/main/java"/> | |||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> | |||
<classpathentry kind="output" path="target/classes"/> | |||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<projectDescription> | |||
<name>maven-jython-plugin</name> | |||
<comment></comment> | |||
<projects> | |||
</projects> | |||
<buildSpec> | |||
<buildCommand> | |||
<name>org.eclipse.jdt.core.javabuilder</name> | |||
<arguments> | |||
</arguments> | |||
</buildCommand> | |||
<buildCommand> | |||
<name>org.maven.ide.eclipse.maven2Builder</name> | |||
<arguments> | |||
</arguments> | |||
</buildCommand> | |||
</buildSpec> | |||
<natures> | |||
<nature>org.eclipse.jdt.core.javanature</nature> | |||
<nature>org.maven.ide.eclipse.maven2Nature</nature> | |||
</natures> | |||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,87 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
|
|||
<!-- | |||
~ Copyright 2006 - 2007 Servprise International, Inc. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
~ | |||
--> | |||
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<groupId>com.servprise.maven.plugins</groupId> | |||
<artifactId>maven-jython-plugin</artifactId> | |||
<packaging>maven-plugin</packaging> | |||
<name>Jython Maven Plugin</name> | |||
<version>0.1</version> | |||
<url>http://dev.servprise.com/</url> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<configuration> | |||
<source>1.5</source> | |||
<target>1.5</target> | |||
<debug>false</debug> | |||
</configuration> | |||
</plugin> | |||
|
|||
<plugin> | |||
<artifactId>maven-source-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>jar</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-plugin-api</artifactId> | |||
<version>2.0.6</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-artifact</artifactId> | |||
<version>2.0.6</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-project</artifactId> | |||
<version>2.0.6</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-plugin-tools-api</artifactId> | |||
<version>2.0.5</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.python</groupId> | |||
<artifactId>jython</artifactId> | |||
<version>2.2-beta2</version> | |||
</dependency> | |||
</dependencies> | |||
|
|||
<distributionManagement> | |||
<repository> | |||
<id>servprise-repository</id> | |||
<name>Servprise Repository</name> | |||
<url>scp://plato/var/www/servprise.com/dev/maven-repository</url> | |||
</repository> | |||
</distributionManagement> | |||
</project> | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<groupId>com.servprise.maven.plugins</groupId> | |||
<artifactId>maven-jython-plugin-site</artifactId> | |||
<version>0.1</version> | |||
<name>Maven Jython Plugin</name> | |||
<url>http://dev.servprise.com/maven-jython-plugin/</url> | |||
<inceptionYear>2006</inceptionYear> | |||
<distributionManagement> | |||
<site> | |||
<id>servprise-repository</id> | |||
<name>Servprise Repository</name> | |||
<url>scp://plato/var/www/servprise.com/dev/maven-jython-plugin</url> | |||
</site> | |||
</distributionManagement> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<artifactId>maven-site-plugin</artifactId> | |||
<configuration> | |||
<locales>en</locales> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,120 @@ | |||
Plugin Configuration | |||
|
|||
The maven-jython-plugin is mostly a fa�ade to the <jythonc> tool. If | |||
you are familiar with the configuration items of that tool, then you should | |||
pick up the plugin configuration quickly. Of course, since the intention | |||
is to improve upon what jythonc provides, there are additional configuration | |||
items as well, while others have been removed. As we push forward to a final, | |||
stable release, these options may change. Any such change will be noted on the | |||
main page to reduce user confusion. | |||
|
|||
* jythonHome (default: None -- must be provided) | |||
|
|||
This element must point to a valid Jython installation. As of this writing, Jython 2.2-beta-1 | |||
is the preferred release to be used. maven-jython-plugin has only been tested with 2.2-beta-1. | |||
|
|||
You can specify the full path to your installation via either a configuration element in your POM: | |||
|
|||
+------------------------------------------+ | |||
<jythonHome>C:\dev\jython2.2b1</jythonHome> | |||
+------------------------------------------+ | |||
|
|||
or via the command line, with the expression: | |||
|
|||
+---------------------------------------+ | |||
'-Djython.jythonHome=C:\dev\jython2.2b1' | |||
+---------------------------------------+ | |||
|
|||
Obviously, you need to account for the path for your own Jython installation. | |||
|
|||
* sourceDir (default: $basedir/src/main/jython) | |||
|
|||
By default, the <sourceDir> value is set to <$basedir/src/main/jython>, so that your project's | |||
main Jython source files sit alongside their Java brethren. If you are using a non-standard directory | |||
layout, then you can override the <sourceDir> value: | |||
|
|||
+-----------------------------------------------------+ | |||
<sourceDir>C:\temp\my_project\jython_files</sourceDir> | |||
+-----------------------------------------------------+ | |||
|
|||
or via the command line, with the expression: | |||
|
|||
+---------------------------------------------------+ | |||
'-Djython.sourceDir=C:\temp\my_project\jython_files' | |||
+---------------------------------------------------+ | |||
|
|||
* testSourceDir (default: $basedir/test/main/jython) | |||
|
|||
By default, the <testSourceDir> value is set to <$basedir/test/main/jython>, so that your project's | |||
test Jython source files sit alongside their Java brethren. If you are using a non-standard directory | |||
layout, then you can override the <testSourceDir> value: | |||
|
|||
+-------------------------------------------------------------------+ | |||
<testSourceDir>C:\temp\my_project\jython_files\tests</testSourceDir> | |||
+-------------------------------------------------------------------+ | |||
|
|||
or via the command line, with the expression: | |||
|
|||
+-------------------------------------------------------------+ | |||
'-Djython.testSourceDir=C:\temp\my_project\jython_files\tests' | |||
+-------------------------------------------------------------+ | |||
|
|||
|
|||
* deep (default: false) | |||
|
|||
If you are familiar with <jythonc>, you know what this configuration item does. It is a boolean | |||
value, so set it to "true" if you wish to deep compile your sources. | |||
|
|||
It is extremely likely that this option will be removed in the next release, in favor of a more | |||
maven-friendly approach. Please see the {{{faq.html}FAQ}} for more details on how this may proceed. | |||
Until then, use this configuration item with caution. | |||
|
|||
+-------------------------------------------------------------------+ | |||
<deep>true</deep> | |||
+-------------------------------------------------------------------+ | |||
|
|||
or via the command line, with the expression: | |||
|
|||
+-------------------------------------------------------------+ | |||
'-Djython.deep=true' | |||
+-------------------------------------------------------------+ | |||
|
|||
|
|||
* core (default: false) | |||
|
|||
If you are familiar with <jythonc>, you know what this configuration item does. It is a boolean | |||
value, so set it to "true" if you wish to deep compile your sources. | |||
|
|||
It is extremely likely that this option will be removed in the next release, in favor of a more | |||
maven-friendly approach. Please see the {{{faq.html}FAQ}} for more details on how this may proceed. | |||
Until then, use this configuration item with caution. | |||
|
|||
+-------------------------------------------------------------------+ | |||
<core>true</core> | |||
+-------------------------------------------------------------------+ | |||
|
|||
or via the command line, with the expression: | |||
|
|||
+-------------------------------------------------------------+ | |||
'-Djython.core=true' | |||
+-------------------------------------------------------------+ | |||
|
|||
|
|||
* all (default: false) | |||
|
|||
If you are familiar with <jythonc>, you know what this configuration item does. It is a boolean | |||
value, so set it to "true" if you wish to deep compile your sources. | |||
|
|||
It is extremely likely that this option will be removed in the next release, in favor of a more | |||
maven-friendly approach. Please see the {{{faq.html}FAQ}} for more details on how this may proceed. | |||
Until then, use this configuration item with caution. | |||
|
|||
+-------------------------------------------------------------------+ | |||
<all>true</all> | |||
+-------------------------------------------------------------------+ | |||
|
|||
or via the command line, with the expression: | |||
|
|||
+-------------------------------------------------------------+ | |||
'-Djython.all=true' | |||
+-------------------------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,57 @@ | |||
Frequently Asked Questions | |||
|
|||
[[1]] <<Where do I send bugs/patches/complaints/praise/questions/etc?>> | |||
|
|||
At some point, this plugin will probably migrate to either the ASF or Codehaus, and at | |||
that time, we will use whatever infrastructure and processes they have in place. The | |||
only reason it hasn't thus far was because of lack of clarification on this process | |||
and because we didn't have time to jump through the necessary hoops (the lead developer | |||
of this plugin is an ASF committer, but not a Codehaus member). | |||
|
|||
In any event, for the interim, please direct any of the above communication to our | |||
{{{mailto:support@servprise.com}support alias}}, where it will be addressed. | |||
|
|||
[[2]] <<How do I build a wholly contained application?>> | |||
|
|||
Using the maven-dependency-plugin is probably the best way at building a wholly | |||
contained Jython application. With this plugin, you can unpack the Jython JAR and | |||
bundle it with your own application. This will allow you to distribute a single JAR | |||
to your customers, relieving the requirement of having Jython installed locally. | |||
|
|||
Note that the maven-dependency-plugin must execute prior to the <package> phase, so that | |||
the distribution directory will contain both your class files and the Jython class files. | |||
In maven 2.0.x, there is no "pre-package" phase, so you must arbitrarily choose one that will | |||
execute before <package>. In the following example, we bind to the <test> phase, since we | |||
have no Jython test sources. If you do, you should bind to some other phase occurring after | |||
<test>, but before <package>. Please read the "Build Lifecycle Phase Reference" section at | |||
{http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html} for further details. | |||
|
|||
+--------------------------------------------------------+ | |||
<project> | |||
... | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<artifactId>maven-dependency-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<id>unpack-dependencies</id> | |||
<configuration> | |||
<excludeTransitive>true</excludeTransitive> | |||
<outputDirectory> | |||
${project.build.outputDirectory} | |||
</outputDirectory> | |||
</configuration> | |||
<phase>test</phase> | |||
<goals> | |||
<goal>unpack-dependencies</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
... | |||
</project> | |||
+--------------------------------------------------------+ | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,41 @@ | |||
----- | |||
Maven Jython Plugin | |||
----- | |||
Servprise International, Inc. | |||
----- | |||
|
|||
Introduction | |||
|
|||
The maven-jython-plugin is a plugin for the {{{http://maven.apache.org/}Maven 2}} project management system that allows {{{http://www.jython.org}Jython}} to be integrated into your projects. | |||
|
|||
Current Status | |||
|
|||
The plugin is admittedly in a very nascent state. It has, however, been used to generate commercial software. We use it to | |||
build our open source WebReboot(R) command-line tool. The plugin is available as open source software | |||
under the {{{http://www.apache.org/licenses/LICENSE-2.0.html}Apache Software License v2}}. Unfortunately, we do not yet have | |||
a publicly accessible Subversion repository, but you can download and view the sources from the {{{http://dev.servprise.com/maven-repository/com/servprise/maven/plugins/maven-jython-plugin/0.1/maven-jython-plugin-0.1-sources.jar}sources jar}}. | |||
|
|||
We will update this page as the plugin matures, but if you'd like to keep in touch with the ongoings, you may want to subscribe to our | |||
{{{http://dev.servprise.com/weblog/}weblog}}. In the interest of full disclosure, please note that this weblog also contains | |||
posts unrelated to this plugin, mostly for Servprise product developments. We do try to make good use of categories so that you | |||
can filter out posts as appropriate, however. | |||
|
|||
Features | |||
|
|||
* Easily fire up an interactive Jython shell | |||
|
|||
* Compile main Jython source files to Java classes | |||
|
|||
* Compile test Jython source files to Java classes | |||
|
|||
* {{{inferred-packages.html}Inferred package structure}} to make life simpler | |||
|
|||
Additional Information | |||
|
|||
As the plugin evolves, so will the documentation. The following should be enough to get you started, however: | |||
|
|||
{{{usage.html}How to Use the Plugin}} | |||
|
|||
{{{configuration.html}How to Configure the Plugin}} | |||
|
|||
{{{shell.html}Running the Jython Shell}} |
Oops, something went wrong.