I do all my development on a Mac, and my files are on a remote Linux server. I use SSHFS to access the files. When I am using IntelliJ on a local project, I don't even notice the file synchronization, most likely because it can access the files very quickly. But when I have a project open through SSHFS, the synchronizing takes a very long time, which is a pain because inspections are dependent on synchronization being finished. I can't see any code analysis until the synchronization is done.
I saw one solution where someone moved the intellij project files to a local directory and had the project point to the SSHFS files, but I'd rather have everything in one place.
I need to know how to either speed up the synchronization or make inspections run even if the files are synchronizing.
You should consider having a local copy of all your files on your mac, and using a sync utility like Unison or RSync to keep your files in sync
Related
I am working on a repository where I have to extract some features from millions of files.
For me, the current workflow is:
Write code in IntelliJ
Run unit tests
Dry run with small data
ssh to the remote machine
sftp the current code to the remote machine
Run on the server with all million of files
Look into the log exceptions and find out where the code is failing for edge cases
Fix those issues and repeat from step 1
My question would be three-fold:
Is there an easy way how I can sync code with the remote machine automatically (I know I commit to git and then pull the changes in the machine. But is there some other way other than setting up rsync etc.?)
Can I run code directly in the remote machine from IDE and debug it that way?
1) There are a lot of ways to sync your code. Sometimes the best way is to create a kind of deploy script in Python or sh if you don't want to commit and push any changes you are going to test on server. You can use sftp or scp with more automation here (use gzip and so on). Git and rsync are more mature solutions here. But with VCS your problems will be more reproducible and easier to find.
2) You can connect to remote process to debug it directly from IntelliJ. There is a official tutorial for that: https://www.jetbrains.com/help/idea/tutorial-remote-debug.html (but it depends on your security settings because Java debug protocol is not secured itself, you may need to setup SSH tunnel for that)
3) Another, a bit more radical option: you might run IntelliJ IDEA itself on server and debug directly. You can use Projector - an open source project which lets you run IntelliJ on the server with UI in the browser (no X11 required to run). I recommend you look at this repo firstly https://github.com/JetBrains/projector-docker or configure IntelliJ on server following instructions here: https://github.com/JetBrains/projector-server.
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.
I am looking for something similar to RStudio-server (r-studio), but for programming in Java/Scala.
RStudio-server accessed via web is the same as the desktop version.
May be there are other equivalent solutions, given that my problem is scarce local resources to run my programs, but plenty of resources in a remote computer.
The more seamless, the better.
It would be also good if I could just run my program remotely seamlessly (outputing like if it was local and inside the IDE).
I recently starting using Chromoting to remote into a different machine that has IntelliJ. It's convenient in that it's built into chrome and I can pretty much do this anywhere because everyone has Chrome these days. It's a very good remoting tool but it still is remoting, it has its delays and minor problems (some keyboard shortcuts don't get sent through and those options haven't been added yet).
Just an idea for something to try.
It is not seamless, but I just managed to solve the problem using the right workflow:
In the local machine:
edit files in IDEA
[optional] set the output path, if any, to your favorite file hosting service (dropbox in my case)
commit with your favorite VCS (bzr in my case, it can need a push to the remote machine)
In the remote machine:
update with your favorite VCS
compile and run with your favorite build tool (sbt in my case):
sbt 'run-main experiments.AtomicBombMain'
[optional] In the local machine again:
[optional] get the generated files at the output path at the shared folder of your favorite file hosting service
Link with more details about the entire process since instalation until compiling:
sbt-intellij-idea-scala-debian-wheezy-how-to
I would like to see how everything is handled behind the scenes behind web servers such as apache httpd and tomcat. How does one go about stepping through these applications, making changes, and then viewing changes?? Applications this complex use scripts for building and I presume they take a while to compile, it seems to me that there would be more to it than simply downloading the source code and importing into Eclipse. Or is it actually that simple?
And how do developers who want to work on the code of these projects get around the fact that it will take a fair amount of time to compile these applications (and other non-trivial applications such as web browsers)? When I am working on smaller stuff I am constantly compiling and then debugging. I imagine that is no feasible when it can take several minutes to compile?
Easy: just read.
http://tomcat.apache.org/tomcat-7.0-doc/building.html
Also, http://wiki.apache.org/tomcat/FAQ/Developing
The current Tomcat 7.0.x trunk takes about 17 seconds to build on my MacBook Pro, and that included downloading a few dependencies that I didn't already have laying around. If you want to re-compile a single .java file, you can re-run the entire build and the toolchain (really just Apache Ant) will figure out which files actually need to be recompiled.
You only modified one source file? Only one source file will be re-compiled when you run ant deploy (you don't even need the "deploy": it's the default). If you use Eclipse or some other similar IDE, it will recompile on the fly and you don't need to worry about the command line or any of that.
If you have further questions, please join the Tomcat users' mailing list (or the developers' list) and join the community.
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.