Error: Unknown argument 'idea-shell' - scala

I'm using Intellij Idea community edition. When I run
new https://github.com/sbt/scala-seed.g8
or
new PlayFramework/play-scala-seed.g8
from sbt shell it gives me following error :
Error: Unknown argument 'idea-shell' g8 0.7.2 Usage: giter8 [options] <template> <template> git or file URL, or github user/repo -b, --branch <value> Resolve a template within a given branch -f, --force Force overwrite of any existing files in output directory --version Display version number
--paramname=paramval Set given parameter value and bypass interaction EXAMPLES Apply a template from github
g8 foundweekends/giter8 Apply using the git URL for the same template
g8 git://github.com/foundweekends/giter8.git Apply template from a remote branch
g8 foundweekends/giter8 -b some-branch Apply template from a local repo
g8 file://path/to/the/repo Apply given name parameter and use defaults for all others.
g8 foundweekends/giter8 --name=template-test

This happens due to how the sbt shell is implemented in the IntelliJ Scala plugin. Also the new command isn't really meant to be run from a live shell session.
Run new from the terminal instead:
sbt new https://github.com/sbt/scala-seed.g8

You should use it from the terminal like:
sbt new scala/scala-seed.g8
If you still have problems:
Maybe you have to run it from a directory that is not a SBT project (no build.sbt)
Of course you need sbt installed.

Related

Create g8 Template From a Git Remote Project

I have a sbt g8 template that I customized for my projects and this is located as one of the sub project in a multi module scala sbt project which is assigned to my organization. For example.,
main-project
- projec1
- sbt-template-project.g8
- some-other-project
The main-project is available in my git repo and I would like to know how I can create a project from the sbt-template-project? I tried the following, but it says "Template Not Found":
sbt new file:https://github.com/my-organization/main-project/tree/master/sbt-template-project.g8
I also tried:
sbt new file:https://github.com/my-organization/main-project/sbt-template-project.g8
I also tried:
sbt new https://github.com/my-organization/main-project/sbt-template-project.g8
What is the correct way to generate the project out of the template?
EDIT: I even tried the following:
sbt new my-organization/main-project -d sbt-template-project-g8
Even that is failing with the message "Template not found"
Your flow is basically not supported - see: http://www.foundweekends.org/giter8/template.html - Giter8 (and sbt new) support only GitHub repositories where the template in either in the root directory or in src/main/g8.
Your best option is to git clone it manually and then call sbt new passing path to the subdirectory:
git clone https://github.com/my-organization/main-project tmp-template-dir
sbt new file://tmp-template-dir/sbt-template-project.g8
rm -rf tmp-template-dir
It is important that the directory name end with .g8.

How to setup the CLI interface and beast-shell - Maven project #ucrbeast #beast

how do I execute the instructions below?
"CLI: To setup the CLI interface and beast-shell, extract the binary package in .tar.gz format. Run $BEAST/bin/beast to launch the command line interface."
then I need to run the command line to create a Maven project.
Dev: To create a new Java/Scala project for Beast using the following command.
mvn archetype:generate -DgroupId=com.example.beastExample -DartifactId=beast-project \
-DarchetypeGroupId=edu.ucr.cs.bdlab -DarchetypeArtifactId=beast-spark -DarchetypeVersion=0.9.5-RC2
I already ran the first line of the command in cmd but something is missing.
does the entire command only work if executing the first part of the statement first?

Cannot do "make eclipse-project" in an exsisting ROS package

When I create a new ROS package using:
$ roscreate-pkg test std_msgs rospy roscpp
and then I proceed to it, typing:
$ make eclipse-project
Everything is OK.
But when I roscd into an existing ROS package and type the above command, it returns :
make: *** No rule to make target `eclipse-project'. Stop.
Is it because the package isn't created by roscreate-pkg?
did you follow the steps here ? Ros Wiki on IDSs
I know the cause for make having no rule is when the rule isn't found in a Makefile.
I was having the same problem with my project and found that it had no Makefile.
Your question gave me the insight to run roscreate-pkg and voilĂ  that folder had a Makefile. The entire contents are:
include $(shell rospack find mk)/cmake.mk
I was able to solve the same problem by having a Makefile in my project with the same content. I did it by copying the Makefile from the dummy project I created via the following commands:
$ roscreate-pkg dummy std_msgs rospy roscpp
$ cp src/dummy/Makefile src/my-package/Makefile

cmake to eclipse project conversion issue

I am trying to create an eclipse project from a cmake project .
I used the following command
cmake -G "Eclipse CDT4 - Unix Makefiles" ./`
it gives the following error
CMake Error at CMakeLists.txt:119 (find_package):
By not providing "FindGlib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Glib", but
CMake did not find one.
Could not find a package configuration file provided by "Glib" (requested
version 2.28) with any of the following names:
GlibConfig.cmake
glib-config.cmake
Add the installation prefix of "Glib" to CMAKE_PREFIX_PATH or set
"Glib_DIR" to a directory containing one of the above files. If "Glib"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
I have glib installed . actually it couldn't resolve the path i guess. wherever find is there in cmake file , it is giving the smiler errors. please i suggest a way out, i badly need to load this project in cmake. Thanks.
Here is line 119 where error message is pointing
find_package(Glib 2.28 REQUIRED)
include_directories(${Glib_INCLUDE_DIRS})
list(APPEND LIBS ${Glib_LIBRARIES})
add_definitions(${Glib_DEFINITIONS})
When you call find_package(MyPackage) in a CMake file, it tries to find a FindMyPackage.cmake configuration in its system path (/usr/share/cmake-2.8/Modules on my Ubuntu box), or in the directory you did specify as CMAKE_MODULE_PATH).
The solution to your problem is to create a directory for modules in your source tree (e.g. CMakeModules), put in it a FindGlib.cmake file that you can find using Google, and add
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
in your CMakeLists.txt before the actual call to find_package.
(your problem is not related to the Eclipse generator, you could remove that from the title of the question).

Why would Eclipse not be able to include a file when running a PHPUnit test?

I have the following class and unit test in a PHP project in Eclipse:
I know my unit test works as I can run it at the command line:
Now I want to run this test from Eclipse. I set up PHP Unit in Eclipse like this:
However, when I run the PHPUnit tests:
It tells me that it can't include the class file:
/usr/bin/php -c /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/zend_debug/session4910937990995915704.tmp -d asp_tags=off /Applications/eclipse/plugins/org.phpsrc.eclipse.pti.tools.phpunit_0.5.0.R20101103000000/php/tools/phpunit.php --log-junit /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/pti_phpunit/phpunit.xml /Volumes/data/domains/et/extjslayout/phpunittest/tests
PHP Warning: include_once(../Product.php): failed to open stream: No such file or directory in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Warning: include_once(): Failed opening '../Product.php' for inclusion (include_path='/usr/local/PEAR') in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Fatal error: Class 'Product' not found in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 9
Why would PHPUnit be able to find the class when run from the command line but not when run from Eclipse?
When you start something from the command line, the "current directory" has a well-defined meaning: It's the directory where you started the command.
In Eclipse, what is the "current directory"? It's probably the directory from which you started Eclipse or maybe the folder in which Eclipse is installed.
I haven't used PHP in Eclipse before but for other languages, I can set the current directory in the launch config somewhere. If that doesn't work, define a variable which points to your project and then use absolute paths (using that variable as a starting point).
Have same problem. Found only solution by creating tests with internal PHPUnit wizard like at this screenshot:
Source: HowTo create a Test Case Class from a PHP Class
But following investigate show that your test case file should contain reference to tested code for example like this: require_once 'C:\Apache2\htdocs\jobeet\src\Ibw\JobeetBundle\Utils\Jobeet.php';
Other experiments with plugin config not bringing luck. So in my opinion PHPUnit from PHP Tools not well developed plugin. Consider using MakeGood plugin as better alternative.