AEM+Filevault+Intellij integration - intellij-idea

I am working on AEM 6.2 with crx mapped to local file system using filevault. I also have my code in svn for ui.apps which is in intellij.
Problem: If i change any component dialog, first i need to sync my crx with local file system and then copy changes from file system to svn folder.
I tried to integrate intellij using vlt commands but getting message
File is under version control
Is there a way i can club all three together so from IDE i can update code repository?

You can use the IntelliVault plugin to push content to or pull it from CRX.
In such a setup it doesn't matter where your CRX actually sits. You keep a set of files under version control and the IDE plugin allows you to push/pull to/from CRX whenever you want to. It uses the Vault command line tool under the hood.
It's probably not exactly what you're asking about but it works for me.
Another option is to use AEM Sync from the command line. It's a Node package that you can use to listen to file changes. Have it running in the background and changes you make in your IDE will be automatically reflected in AEM. Be careful about large changes such as switching Git branches. These can kill AEM Sync and potentially interfere with AEM itself if you happen to change a very large number of files while AEM Sync is running.

Aem sync works like a charm - https://github.com/gavoja/aemsync
Go to Terminal> CD to the directory where you have installed aemsync via npm > hit the command provided at the github page.

Related

How do I dynamically link a local created npm package to another project?

I have a project that exports a package to be used by other projects (some infra code).
I've published it in a local repo, and then installed it on my main project.
I need to keep working on that infra project, and to have it updated in the larger project. I have no problem running scripts to do that - but I don't want to increase its package version and to keep publishing it on any change.
I know about npm link and I've been trying to use it, but it seems that some caching in WebStorm causes it to not update in the main project. I actually need sometimes to invalidate caches and restart the IDE after changes to the infra package - and that's a large time consumer.
Is there a way to tell WebStom "for this npm package I want you to use this path instead of the actual npm package"? Or to use the "Attach project" feature to do that when both are open?
Edit: After working like that a bit, I've discovered that the need to invalidate cache is related only to TS related changes - meaning when I add classes or change signatures. I can write the correct code and it works - but TS shows errors and no autocomplete until I invalidate the caches. And restarting TS service doesn't help.

How to put IntelliJ/Pycharm settings under version control?

I'm a frequent user of PyCharm and a number of the other JetBrains IDEs. I try to keep my settings synchronized across the different IDEs, but I'm now considering moving to IntelliJ IDEA and am finding it extremely difficult to figure out what I've changed and what the differences are among my different settings files.
How can I put my PyCharm settings files under version control so that I can track my changes and also quickly revert back to old versions so I can try out new settings changes without fear?
(I don't mind exporting to a specific repo each time, but it seems that the settings always export as JAR files, which don't lend themselves to VCS.)
I am using the Settings Repository plugin to syncronize settings between PyCharm and PhpStorm and it is working very well. It is actually designed with version control and team sharing in mind, see project repo on github and have built in support for conflict resolution, merge and overwriting remote or local.
It does also support file system and, from what I can tell, what then is stored is the mirror version of the git repository.
PyCharm (at least the Linux 4.X and 5.0 Pro versions) places its config files in a .idea dir under the project dir:
$ find .idea/
.idea/
.idea/libraries
.idea/libraries/Google_App_Engine_SDK.xml
.idea/libraries/Generated_files.xml
.idea/apartsw.iml
.idea/misc.xml
.idea/modules.xml
.idea/runConfigurations
.idea/runConfigurations/apartsw.xml
.idea/encodings.xml
.idea/vcs.xml
.idea/inspectionProfiles
.idea/inspectionProfiles/MyProject.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/watcherTasks.xml
.idea/webResources.xml
.idea/workspace.xml
.idea/scopes
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/dictionaries/username.xml
I added the entire dir with the exception of .idea/workspace.xml into the project's git repo, following JetBrains' PyCharm-specific and/or generic .idea-based Tools recommendations.

automate setup of IBM RAD and Websphere

In a project we a forced to use IBM RAD and Webspher Application Server (6.1).
Setting up the development environment is currently described in about 10 pages of wiki documentation and takes about a day if you don't do any mistake. The main parts are:
Installing the IBM Installer;
Use it to install RAD
Install a patch to the Installer;
use it to install half a dozen patches to RAD
create a network drive pointing to ...
checkout project source to ...
install WAS
configure the a WAS instance with two jdbc drivers, 6 datasources, a queue ...
I think you get the idea
I'd like to automate that process (or at lest 95% of it) to something like.
start script x.
On prompt enter a directory with at least yGB of memory available.
Get yourself a cup of coffee
start working.
What are the proper tools to get this working? Should I use something like puppet and chef? Or is that overkill and I can just zip the installation directory and change 2 registry entries?
Has anybody experience with this? Any pointers to get started?
You can script the configuration of WAS using wsadmin:
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Fwelc6topscripting.html
It is some effort to learn how to do so but in the end it saves a lot of time. You need to use Jython or Jacl to do so.
WAS profiles can be created headless with a response file. Use manageprofiles.bat in bin directory of WAS to do so.
Regarding RAD installation you can install the IBM Installation Manager version you need to install the patches right away and then install everything in one shot. Add the fixes you need as Repositiories right from the beginning. The fixes will be installed instead of the old versions in this case. You should have the base images and all fixes on the local disk to do so.
The installation of RAD itself can also run in headless mode but I don't have any experience in doing this.
The configuration of the RAD workspace is the next thing you want to automate. This is not so simple to do. The simplest thing you can do is to export the workspace preferences of a workspace that contains all settings to an eclipse preference file (.epf). File -> Export
This is not a complete solution but may help you a bit. Be sure to keep all settings in just one file and import that into a fresh workspace.
Use Notepad++ TextFX plugin to sort the settings in the epf file. You can then figure out which settings you need just by looking at them.
More control over the workspace settings and automated conifiguration requires accessing eclipse internal APIs and some coding.
Regarding the the project sources it depends on the SCM you are using.

IDE for Firefox Add-ons Development

I have been working on firefox add-ons for quite a long time and its been a real headache to use notpad++ for development. Is there any suitable IDE or plug-in for eclipse available.And just like we do **Run on Server" for dynamic web-projects,Is there any way that, I do a change in any of the sorce file and it automatically creates the .xpi file and installs in firefox?
There are a lot of editors or IDEs that could be easily integrated with the SDK to perform basic tasks like running cfx run or cfx xpi. Here's the system that I use:
I have Wladimir Palant's 'Extension Auto Installer' installed in Firefox
I have a script like this in the add-on's root directory:
#!/bin/bash
/path/to/cfx xpi && wget --post-file=filename.xpi http://127.0.0.1:8888/
Every time I want to test the add-on, I just run the script and the xpi is built and installed into Firefox. Most editors will have some capability to bind a shel command like this to a keybinding.
You don't really need IDE to create XPI every time you make a change.
Create a folder with your addon's source code (e.g.
C://addons/myaddon/).
Put a file containing this path to the folder
containing your Firefox addons and call it the same as your addon ID
(e.g. myaddon#domain.com).
In your install.rdf file, add this line: <em:unpack>true</em:unpack>
This way you can just restart the Firefox whenever you want to see the changes. I recommend this addon, it adds a keyboard shortcut Ctrl+Alt+R for quick restart of Firefox (be sure to get the 0.6b2 version, previous versions don't support the keyboard shortcut):
https://addons.mozilla.org/firefox/downloads/file/121516/restart_firefox-0.6b2-fx.xpi?src=dp-btn-devchannel
Also, you will not loose your source code in case you uninstall your addon while testing (this happens when you develop directly in your Firefox addons folder).
As of IDE, for me personally any editor with syntax highlight for XML and JS works just fine. My personal favorites are Aptana (Eclipse based IDE) and Intype (lightweight and extremely fast).

unable to build ant with Clearcase on VMware

So here is the problem.
I have a local snapshot in my local windows system and i run my ant script and it builds.
I have build system which is also winxp but its a vmware built inside ubuntu. i have also a snapshot there too in winxp , and my script runs against this. But clearcase doesnt allow to write anything on this folder and build fails. Tried and tired of changing everything thats possible.
I did try one more option, like copying snapshot from my local windows system to vmware winxp and run it from there, and it works cool. Coz clearcase doesnt hold any lock. Unable to figure out how to fix this.
Any thoughts friends ?.
ClearCase shouldn't prevent the creation of private files in a snapshot view.
A snapshot view is like a SVN workspace: a collection if files copied on the hard-drive (as opposed to dynamic views which allows for network-access to the same elements)
So I suspect your script fails when it tries to checkout and/or "add to source control" elements.
I which case you need to make sure of the:
user characteristics (CLEARCASE_PRIMARY_GROUP)
view protect ("cleartool lsview -l -full -pro")
If you have those informations, plus any specific error message, you can add them to your question and leave a comment on this answer. I will then update it accordingly.