GithubHelp home page GithubHelp logo

jruby9-maven-plugins's Introduction

No Longer Maintained

The TorqueBox project is no longer actively developed nor maintained. Do not use it for development or production usage unless you are willing and able to fix issues as they come up.

TorqueBox

This is TorqueBox 4 and represents a substantial change in direction from previous TorqueBox releases. We're moving to a lightweight, embedded model that runs without any Java application server, at the expense of a few of the more enterprisy features. For users that want to run in a Java application server or need those enterprisy features, we'll provide a way to take your TorqueBox application and run it unmodified on a stock WildFly installation.

Documentation

We have various guides available to help with installation, migration, usage, and deployment of TorqueBox 4.

Quickstart for running TorqueBox

Requirements

TorqueBox requires JRuby 1.7.x (in 1.9 or 2.0 mode) or JRuby 9.x.x running on Java 7+. The code has only been tested on JRuby 1.7.6 and higher but should work on earlier versions.

Installation

Read the Installation Guide for installation details.

Running directly

From inside your Rack application's root directory:

torquebox run

Rails

Ensure torquebox is in your Gemfile, then:

rails s torquebox

Rack

rackup -s torquebox

Motivation

We want a smaller, more modular TorqueBox that is easier to get started with, embeddable, and lets users bring in additional functionality as-needed. More details of our motivation and community feedback are expressed in an email thread from the torquebox-user mailing list.

Technology

TorqueBox runs on JRuby and sits on top of a new lightweight, pluggable, polyglot server codenamed WunderBoss (at least for now). All the new features of TorqueBox will be implemented in WunderBoss then exposed via a Ruby API in the TorqueBox project. This lets other projects, in other languages, reuse the same functionality by creating small language-specific API wrappers.

The web portion of WunderBoss uses JBoss Undertow, which is also the same web server used in WildFly (the successor to JBoss Application Server).

We aim to reuse the same underlying components as WildFly so that TorqueBox applications can run on top of WildFly in addition to running without it, to give users an option between a full-blown Java application server and a very lightweight, minimal server.

Current status

Right now TorqueBox 4 provides a high-performance Rack implementation for web applications and basic APIs for messaging, caching, and scheduled jobs. The Rack support is considered production-ready, but the messaging, caching, and scheduling implementations are still in a bit more flux.

Roadmap

We're developing TorqueBox 4 while also maintaining TorqueBox 3, and we expect it to take some time before TorqueBox 4 comes out of alpha and betas and into a final release.

Building TorqueBox

bundle install
rake build

Running specs

rake spec

Running integration tests

Make sure phantomjs is available on your $PATH - http://phantomjs.org/download.html.

The first time you run the integration tests may take longer as bundler gets invoked for each test application to install its dependencies. Subsequent runs with the same JRuby installation should be faster.

cd integration-tests
rake spec

Running a single integration test

cd integration-tests
SPEC=spec/basic_sinatra_spec.rb rake spec

Running specs with more verbose output

DEBUG=true rake spec

Running all integration test variants (disk, jar, wildfly)

There are several variants of integration tests. Each runs the same applications and same specs, but packaged in different ways. This takes quite a bit longer, but is what CI runs.

rake spec:all

Installing from source

rake install

Releasing

Preparation

TorqueBox 4 is released from the master branch of torquebox/torquebox-release.

Set up this repository as an additional remote for your workspace:

git remote add release [email protected]:torquebox/torquebox-release.git

Ensure that the master branch has the contents you wish to release. Using the -f flag to force is allowed in this case, since the torquebox-release repository is not a public-facing human-cloneable repository.

git push release master:master -f

Perform the build

Using the build system, select the torquebox4-release job, entering in the branch to release from (usually 'master'), the version to release, and the next version after release.

If something goes wrong in the release job and it needs to run again, be sure to reset the torquebox-release repository with the correct code first:

git push release master:master -f

Deploy RubyGems

After the job complete successfully, the generated RubyGems will need to be manually deployed. Download them from the job and push each using:

gem push <gem_name>.gem

You'll have to be an owner of the gems to do this. Bug bbrowning, bobmcw, or tcrawley if you are not.

Publish the release API documentation

The release API docs are built by the release job on CI. Download those and put them a _4x_docs//yardoc folder in the torquebox.org git repo.

Push changes from the release repository to the official repository

git fetch release --tags
git merge release/master
git push origin master
git push origin <release_tag>

Release the project in JIRA

Announce it

Post it on torquebox.org

Notify the torquebox-users@ list

Tweet it.

Set the /topic in #torquebox IRC channel using ChanServ (if you can).

jruby9-maven-plugins's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jruby9-maven-plugins's Issues

cant set -Xmx properly

Trying to set the memory limits via -Xmx4G, and finding that I can't, because it is always putting in its own value (why would this be hardcoded?)

[INFO] Execute:Java13CommandLauncher: Executing '/opt/java/jdk_x64_1.8.0_65/jre/bin/java' with arguments:
'-cp'
''
'-cp'
'/mnt/STORAGE/repository/org/jruby/jruby-complete/9.0.4.0/jruby-complete-9.0.4.0.jar'
'-Xmx384m'
'-Xmx4G'

where did the 384m come from?

The plugin shouldn't specify any max at all by default, just let the JVM select... it will do a much better job than 384m.

not working on windows - cannot find main class

I successfully used the jruby9-exec-maven-plugin to do a rails build within maven when running on Linux.

However, when I run the same maven project on windows, it fails with:

[INFO] --- jruby9-exec-maven-plugin:0.2.2:exec (bundle install) @ ets_tooling ---
[INFO] jruby version   : 9.0.4.0
[INFO] script uses jruby jar:E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar
[INFO] add to ruby loadpath: E:\EclipseWorkspaces\ISAAC2\ets_tooling\lib
[INFO] installing gems for compile scope . . .
[INFO] java classpath  :
[INFO] environment     :
[INFO]          JARS_SKIP => true
[INFO]          GEM_PATH => E:\EclipseWorkspaces\ISAAC2\ets_tooling\target\rubygems
[INFO]          GEM_HOME => E:\EclipseWorkspaces\ISAAC2\ets_tooling\target\rubygems
[INFO]          JBUNDLE_SKIP => true
[INFO] Executing 'C:\Program Files\Java\jdk1.8.0_45\jre\bin\java.exe' with arguments:
'-cp'
''
'-cp'
'E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar'
'-Xmx384m'
'-Xbootclasspath/a:E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar'
'org.jruby.Main'
'-I'
'E:\EclipseWorkspaces\ISAAC2\ets_tooling\lib'
'-e'
'load('jar:file:E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar!/META-INF/jruby.home/bin/gem')'
'--'
'install'
'--ignore-dependencies'
'--no-rdoc'
'--no-ri'
'--no-user-install'
'--no-verbose'
'E:\Maven\Repository\rubygems\rake\10.4.2\rake-10.4.2.gem'
'E:\Maven\Repository\rubygems\bundler\1.11.2\bundler-1.11.2.gem'
'--bindir'
'E:\EclipseWorkspaces\ISAAC2\ets_tooling\target\rubygems\bin'

The ' characters around the executable and arguments are
not part of the command.
[INFO] Adding reference: ant.PropertyHelper
[INFO] Project base dir set to: E:\EclipseWorkspaces\ISAAC2\ets_tooling
[INFO] Setting environment variable: JARS_SKIP=true
[INFO] Setting environment variable: GEM_PATH=E:\EclipseWorkspaces\ISAAC2\ets_tooling\target\rubygems
[INFO] Setting environment variable: GEM_HOME=E:\EclipseWorkspaces\ISAAC2\ets_tooling\target\rubygems
[INFO] Setting environment variable: JBUNDLE_SKIP=true
[INFO] Execute:Java13CommandLauncher: Executing 'C:\Program Files\Java\jdk1.8.0_45\jre\bin\java.exe' with arguments:
'-cp'
''
'-cp'
'E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar'
'-Xmx384m'
'-Xbootclasspath/a:E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar'
'org.jruby.Main'
'-I'
'E:\EclipseWorkspaces\ISAAC2\ets_tooling\lib'
'-e'
'load('jar:file:E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar!/META-INF/jruby.home/bin/gem')'
'--'
'install'
'--ignore-dependencies'
'--no-rdoc'
'--no-ri'
'--no-user-install'
'--no-verbose'
'E:\Maven\Repository\rubygems\rake\10.4.2\rake-10.4.2.gem'
'E:\Maven\Repository\rubygems\bundler\1.11.2\bundler-1.11.2.gem'
'--bindir'
'E:\EclipseWorkspaces\ISAAC2\ets_tooling\target\rubygems\bin'

The ' characters around the executable and arguments are
not part of the command.
[INFO] Error: Could not find or load main class E:\Maven\Repository\org\jruby\jruby-complete\9.0.4.0\jruby-complete-9.0.4.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.861 s
[INFO] Finished at: 2016-03-03T11:06:13-06:00
[INFO] Final Memory: 18M/376M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal de.saumya.mojo:jruby9-exec-maven-plugin:0.2.2:exec (bundle install) on project ets_tooling: Execution bundle install of goal de.saumya.mojo:jruby9-exec-maven-plugin:0.2.2:exec failed: Java returned: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Not sure why this is failing on windows - I'm not spotting the problem in the output so far.

My configuration that works on linux, and fails on windows is here:
https://github.com/VA-CTT/ets_tooling/blob/22f91b1fdd7c3911020d95a12bd9230ff74c67a8/pom.xml

rspecs not executed under windows

When using the jrubyExecExample and commenting out all executions except the rspec one I get:

[INFO] Finished in 0.006 seconds (files took 0.323 seconds to load)
[INFO] 0 examples, 0 failures

The one_specs.rb is not executed

When running rspec in the example folder:

rspec
.

Finished in 0.001 seconds (files took 0.20602 seconds to load)
1 example, 0 failures

Bundle install not working on windows

I am trying to upgrade JRuby...

Much to my dismay, once you upgrade to 9.1.9 (9.1.8 works) the build fails. So, from my maven build, I have:

<dependency>
   <groupId>org.jruby</groupId>
   <artifactId>jruby-complete</artifactId>
   <version>9.1.12.0</version>
</dependency>

And I have:

<plugin>
   <groupId>org.torquebox.mojo</groupId>
   <artifactId>jruby9-exec-maven-plugin</artifactId>
   <version>0.3.1</version>
   <executions>
      <execution>
         <id>bundle install</id>
         <phase>compile</phase>
         <goals>
            <goal>exec</goal>
         </goals>
         <configuration>
            <jrubyVerbose>true</jrubyVerbose>
            <jrubyJvmArgs>-Xmx4000m -Djava.awt.headless=true</jrubyJvmArgs>
            <command>bundle</command>
            <args>install</args>
         </configuration>
      </execution>

If I set JRuby to 9.1.8 in the maven build, the bundle install works. It generates the following:

[INFO] Execute:Java13CommandLauncher: Executing 'C:\languages\Java\jdk1.8.0_65\jre\bin\java.exe' with arguments:
'-cp'
'C:\Users\cshupp\.m2\repository\org\jruby\jruby-complete\9.1.8.0\jruby-complete-9.1.8.0.jar'
'-Xmx4000m'
'-Djava.awt.headless=true'
'-Xbootclasspath/a:C:\Users\cshupp\.m2\repository\org\jruby\jruby-complete\9.1.8.0\jruby-complete-9.1.8.0.jar'
'org.jruby.Main'
'-I'
'C:\work\va-ctt\rails\rails_komet\lib'
'-r'
'jars/setup'
'C:\work\va-ctt\rails\rails_komet\target\rubygems\bin\bundle'
'install'

With 9.1.9 and above it generates:

[INFO] Execute:Java13CommandLauncher: Executing 'C:\languages\Java\jdk1.8.0_65\jre\bin\java.exe' with arguments:
'-cp'
'C:\Users\cshupp\.m2\repository\org\jruby\jruby-complete\9.1.12.0\jruby-complete-9.1.12.0.jar'
'-Xmx4000m'
'-Djava.awt.headless=true'
'-Xbootclasspath/a:C:\Users\cshupp\.m2\repository\org\jruby\jruby-complete\9.1.12.0\jruby-complete-9.1.12.0.jar'
'org.jruby.Main'
'-I'
'C:\work\va-ctt\rails\rails_komet\lib'
'-e'
'require 'jruby/commands'; JRuby::Commands.generate_dir_info 'C:\work\va-ctt\rails\rails_komet\target\rubygems' if JRuby::Commands.respond_to? :generate_dir_info'
'--'

And the build fails. The failure happens on windows only. Any ideas?

Thanks,

Cris

jruby9-exec-maven-plugin can no longer bundle install

I have the following pom file:

<?xml version="1.0"?>
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>gov.va.api.wss.reference.data.service.prototype</groupId>
  <artifactId>evss_prototype</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <name>evss jruby prototype</name>

  <description>
    This project wss-reference-data-service api.
  </description>

  <properties>
  </properties>

  <organization>
    <name>Department of Veterans Affairs</name>
    <url>http://www.va.gov/</url>
  </organization>

  <repositories>
    <repository>
      <id>mavengems</id>
      <url>mavengem:https://rubygems.org</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>mavengems</id>
      <url>mavengem:https://rubygems.org</url>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <version>9.3.0.0</version>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>rake</artifactId>
      <version>13.0.6</version>
      <type>gem</type>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>bundler</artifactId>
      <version>2.2.24</version>
      <type>gem</type>
    </dependency>
  </dependencies>

  <build>

    <extensions>
      <extension>
        <groupId>org.torquebox.mojo</groupId>
        <artifactId>mavengem-wagon</artifactId>
        <version>1.0.3</version>
      </extension>
    </extensions>

    <plugins>

      <plugin>
        <groupId>org.torquebox.mojo</groupId>
        <artifactId>jruby9-exec-maven-plugin</artifactId>
        <version>0.3.1</version>
        <executions>
          <execution>
            <id>install bundler</id>
            <phase>compile</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <jrubyVerbose>true</jrubyVerbose>
              <jrubyJvmArgs>-Xmx4000m -Djava.awt.headless=true</jrubyJvmArgs>
              <command>gem</command>
              <args>install bundler</args>
            </configuration>
          </execution>
    </plugins>
  </build>
</project>

The following execution fails:

          <execution>
            <id>install bundler</id>
            <phase>compile</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <jrubyVerbose>true</jrubyVerbose>
              <jrubyJvmArgs>-Xmx4000m -Djava.awt.headless=true</jrubyJvmArgs>
              <command>gem</command>
              <args>install bundler</args>
            </configuration>
          </execution>

As follows:

[INFO] Execute:Java13CommandLauncher: Executing '/usr/local/openjdk-8/bin/java' with arguments:
'-cp'
'/root/.m2/repository/org/jruby/jruby-complete/9.3.0.0/jruby-complete-9.3.0.0.jar'
'-Xmx4000m'
'-Djava.awt.headless=true'
'-Xbootclasspath/a:/root/.m2/repository/org/jruby/jruby-complete/9.3.0.0/jruby-complete-9.3.0.0.jar'
'org.jruby.Main'
'-I'
'/srv/wss-reference-data-service/src/lib'
'-e'
'load('jar:file:/root/.m2/repository/org/jruby/jruby-complete/9.3.0.0/jruby-complete-9.3.0.0.jar!/META-INF/jruby.home/bin/gem')'
'--'
'install'
'--ignore-dependencies'
'--no-rdoc'
'--no-ri'
'--no-user-install'
'--no-verbose'
'/root/.m2/repository/rubygems/rake/13.0.6/rake-13.0.6.gem'
'/root/.m2/repository/rubygems/bundler/2.2.24/bundler-2.2.24.gem'
'--bindir'
'/srv/wss-reference-data-service/src/target/rubygems/bin'

The ' characters around the executable and arguments are
not part of the command.
[INFO] ERROR:  While executing gem ... (OptionParser::InvalidOption)
[INFO]     invalid option: --no-rdoc
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.711 s
[INFO] Finished at: 2021-10-01T20:01:41Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.torquebox.mojo:jruby9-exec-maven-plugin:0.3.1:exec (install bundler) on project evss_prototype: Execution install bundler of goal org.torquebox.
mojo:jruby9-exec-maven-plugin:0.3.1:exec failed: Java returned: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.torquebox.mojo:jruby9-exec-maven-plugin:0.3.1:exec (install bundler) on project evss_prototype:
Execution install bundler of goal org.torquebox.mojo:jruby9-exec-maven-plugin:0.3.1:exec failed: Java returned: 1

We can see here:
puphpet/puphpet#2838

That for newer gems

'--no-rdoc'
'--no-ri'

is no longer supported. I cannot find how to suppress these flags.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.