Creating independent Module in Magnolia 5.3 - module

I created custom Module with Magnolia Archetype from this link : Module QuickStart
But directly in my workspace, I mean without creating webApp Project.
So when I want to use on my module that is integrated in webApp project I can't find resources like component.ftl.
Please help me if there is useful tutorial for creating a custom independent module and thanks.

by CMD go to your workspace with the command cd: for example
cd users/workspace
Now in your workspace run this command:
mvn archetype:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/
This command creates your module, there is 5 options, follow the instructions to create your best module.

Related

How to build ROS2 based application from outside of workspace

I created a qt application which can be build by cmake. My application uses some ros2 service so I need to build it with ros. For that I need to put my code under ros2_ws/src/. I want to avoid this thing. I want to build by application from any folder ( without putting under ros2_wc) with ament tool. How can I do it ?
If you want to do that, you need to build ROS2 as usual, and source the following script:
. install/local_setup.bash
Then you can call your build command using ament from the directory you want.
cd <dir>
ament build --force-cmake-configure ...
For those who are using the new ros2 build tool: colcon
You can keep your own ~/ros2_ws, and put the QT application to another ~/ros2_overlay_ws.
For example, if your new QT application depends on some service or msg located in the original ~/ros2_ws, you could go to ~/ros2_ws and run colcon build.
After compile finished, please remember to import and re-index your packages by the following command: source ~/ros2_ws/install/setup.bash. This will re-index your ros2 packages at current terminal.
Now go to ~/ros2_overlay_ws/ and put your QT application to ~/ros2_overlay_ws/src and then run colcon build. colcon will find your indexed package and add them to your dependency.

How to open pom.xml project using IDEA

I am trying to learn about annotation processing by looking at this sample.
I've cloned it to my local machine and used IDEA to open it.
However IDEA tells me:
Project SDK not set up.
After setting up Java SDK, the project is not opening correctly. So how can I open this project?
The project structure :
annotationprocessing10
|
|------factory
|-----annotation
|------pom.xml
|-----processor
|------pom.xml
|-----pom.xml
|-------factory-sample
I tried opening annotationprocessing10 (root) directly and also tried factory directly but neither worked. Here is a screenshot of the directory structure:
The given repo is not a maven module (no POM.xml in the base directory), the maven modules are the projects inside.
Make sure you import the modules inside the root directory in IDEA to identify it as a maven project.

Compiling custom ejabberd with multiple source files

I'm trying to compile custom ejabberd module which has multiple files in src/ and include/.
My module is conforming to https://github.com/processone/ejabberd-contrib guidelines and using ejabberdctl module_check produces "ok".
When I'm compiling and installing module with only one source, everything works as expected and ejabberdctl module_install installs module.
But when I have multiple source files, ejabberdctl module_install doesn't compile anything but file with exact name of my module.
I want to avoid manual compilation and rebar if possible. So my question is how to configure my module and where so that ejabberdctl module_install can build and install my module.
If that is not possible could you point me to some rebar script that can serve that purpose.
And finally can someone point me to some resource that explains why Erlang/OTP projects seem to have rigid file structure (I'm coming form c++ world and there IMO, tools and projects are way more forgiving in respect to file structure)
Details:
Erlang 18
ejabberd 15.11.120 (built from source)
if you install module by "ejabberdctl" you don't have to config in ejabberd.yml
other way is install module with source, you must copy file beam to lib/ejabberd... and config file config like README.TXT

Using Gradle to Build an IntelliJ Module From Command Line

I understand the basic functionality of gradle, but I don't understand how to use a build.gradle file other than the one in the project's root. I have a project which contains a gradle wrapper in it's root, and a module which has it's own build.gradle file. How do I specify for gradlew to use the module's build.gradle file instead of the one in the root directory?
Specifically, I have an IntelliJ project I have uploaded to my CI server, and I am trying to setup a script to run the builds automatically.
Cheers
It looks like you have a multi-module build which only has a single module... correct?
You could include a settings.gradle which points to the module
You could declare a GradleBuild task in the root module to invoke the sub module.
A good place to look for inspiration is the java samples and the organizing build logic page in the documentation. An impressive feature of gradle is that all of the code snippets which appear in the documentation is sourced from the samples directory which is run as part of their CI build.
Happy Gradling!

Play framework and IntelliJ new project creation -- errors

I am looking at Play 2.0 for the first time. I installed it using homebrew
~/code $ brew info play
play: stable 2.1.0, HEAD
http://www.playframework.org/
/usr/local/Cellar/play/2.1.0 (3998 files, 254M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/play.rb
I create a new project and set it up for IntelliJ (12.0.4)
~/code $ play new playtime
...
play! 2.1.0 (using Java 1.7.0_15 and Scala 2.10.0), http://www.playframework.org
...
OK, application playtime is created.
...
~/code $ cd playtime/
~/code/playtime $ play idea
...
...
[info] Created /.../playtime/.idea_modules/playtime.iml
[info] Created /.../playtime/.idea_modules/playtime-build.iml
~/code/playtime $
I open IntelliJ and rebuild the project. I get
scala: Output path /.../playtime/project/target/scala_2.9.2 is shared between: Module 'playtime-build' production, Module 'playtime-build' tests
Currently external Scala compiler prohibits output path sharing.
Either disable the external build mode or configure separate output paths.
TIP: you can use Project Artifacts to combine compiled classes.
How to make a clean empty project that builds ?
Why does Play create a -build module ? What is it used for?
Why does this module reference a Scala 2.9.2 path ?
Libraries scala-2.9.2 and scala-2.10.0 also created, but not used. Why?
1) How to make a clean empty project that builds ?
Play 2.0 plugin for IDEA 12.1 (version 0.2.25 or 0.2.26) will be uploaded soon will be much better in this direction, I hope you will not have problems with compilation here.
2-3) Why does Play create a -build module ? What is it used for?
Build module is created for SBT build file. SBT depends on Scala 2.9.2 (that's why this module requires Scala 2.9.2), so to have better editor for such build file, SBT IDEA plugin creates this module (this is third-party plugin, our own SBT plugin will be implemented soon). However this is not right to create such confusing module, in Play 2.0 plugin 0.2.25 project creation will clean this module. So you will not have this confusing module.
4) scala-2.10.0 library is used in Scala facet for Scala compiler. However Scala compiler is not used in Play 2.0 project, we are using play compiler in our support (with bundled with play SBT compiler), so in general it's not used, but you still have this library, otherwise you will get some error messages from Scala compiler, what is Scala plugin usability problem, you can post new issue about it here: http://youtrack.jetbrains.com/issues/SCL