How to publish to server using aspnet compiler - publishing

Currenlty I am trying to publish usinf aspnet compiler using a batch file
start /b C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -p "C:\cc\titr\code\" TargetPath="C:\cc\titr\code\deploy\" Force="true" Debug="true"
Giving me error 1010 file path not valid. Any idea where I am doing wrong. as the paths are correct

Take a look at Rick Strahl's utility to manage the precompilation process here: http://www.west-wind.com/tools/aspnetcompiler.asp. I have to say that getting the command line arguments just right to make the aspnet_compiler happy is not easy. It is very important that you have all your slashes and spaces in just the right place! Using the "West Wind ASP.NET 2.0 Compiler Utility" will certainly make this task a breeze for you!
Also take a look at my article series on how to build a StackOverflow inspired Knowledge Exchange. In that series I detail local build processes and continuous integration. The CI article directly touches on this subject too (coming soon!). http://dotnetslackers.com/projects/StackOverflowInspiredKnowledgeExchange/
In your case you might try :
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -p "C:\cc\titr\code" -v / "C:\cc\titr\code\deploy"
You had trailing slashes which the compiler specifically doesn't like. I also swapped out your TargetPath for the -v argument. I don't think TargetPath is an argument.

Related

Ruby on Rails: Executing JAR

Folks, i'm trying to execute a jar file inside RoR. Thanks to SO, I figured using IO::popen calls to execute a jar file.
Requirements:
- To login to site: To let our company employees login. Its a Java library which does some magic and figures if the username/password is valid. Which I did using,
result = IO::popen("java -cp auth.jar com.name.auth.LDAPLookup " + params[:username] + " " + params[:password]).read
p result
output: ["Authorized", "email", "id"]
No input sanitizing done. This is risky. Anyone could type something up in username/password and that will be executed in the server.
I'm not sure how to do this. One option I want to try is to use fork() or Process APIs to launch "java" and pass arguments. Couldn't figure out however. Any other thoughts?
Aside from the issue you mention, this sounds pretty painful in terms of performance (you're waiting around for the JVM to start up on every request, after all).
Two solutions jump out at me:
Look what the library does, and see if you really need to call out to Java for this; in particular, if it's just a question of making a lookup in an LDAP directory with a set of canned parameters, there are plenty of gems for that
If you must make use of Java classes from Ruby, strongly consider using JRuby, which will let you call the Java class in question directly, with neither the overhead of restarting the JVM on each call, nor the risk which comes with trying to correctly escape your arguments from Ruby to the shell to the JVM, and back.

How to configure JIRA_HOME?

How to configure JIRA_HOME? I'm getting an error:
Configured jira.home '/Users/codedroid/Downloads/atlassian-jira-5.1-standalone' must not be a parent directory of the webapp servlet path '/Users/codedroid/Downloads/atlassian-jira-5.1-standalone/atlassian-jira'
Changed it and now I get this:
Configured jira.home '/Users/codedroid/Downloads/atlassian-jira-5.1-standalone/atlassian-jira' must not be the same as the webapp servlet path '/Users/codedroid/Downloads/atlassian-jira-5.1-standalone/atlassian-jira'
Have a look in here, if you're still having troubles please write what did you set JIRA_HOME to be and where did you defined it, thanks.
EDIT
Yea, that documentation is more of 'how to' instead of 'what'. A better explanation of what the JIRA_HOME should be is writen in more details here.
Anyway, if you feel that the documentation are confusing or just bad, you could do everyone a favour and write it at the bottom of the page, under comments, so other could see it easily.
The JIRA documentation does NOT! make it clear even to a seasoned programmer that this JIRA_HOME directory is referring to a data directory and not the installation directory. If there are any JIRA folks out there please fix this outragious misunderstanding in your documentation. JAVA_HOME refers to you guessed it the installation location of java. Its called a 'convention' if you want to invent some other meaning please say so it your documentation and don't wast valuable developer time on installing your productivity tool. Think its not a problem? Google 'must not be the same as the webapp servlet path' and see what you get back. Thanks for wasting my afternoon, and no doubt the time of many others.
(warning) However, avoid locating the JIRA Home Directory inside the JIRA Installation Directory.
This appears in only documentation point and is not the first place people look as noted above
Just create a folder named JIRA, then set the environment variable JIRA_HOME as D:\JIRA, as well as the application properties file.
# jira-application.properties
jira.home = D:\\JIRA
Don't be confused with the JAVA_HOME, JIRA_HOME has absolutely nothing to do with the folder of your zip ball downloaded from official website.
JIRA_HOME is an empty folder where JIRA will create everything it needs in a RUNTIME.
It is NOT a folder where your unpacked JIRA distribution resides.
P.S. yes it is confusing still in 2021

Extract information from a log file using powershell

Hi I am new to the language of powershell s i though about playing around with it. I am trying to extract information out of a log file (the file belongs to a program called event viewer). I need to use the information under Boot Duration.
Could somebody guide me a little bit?
It will be greatly appreciated
Thanks.
Logs are always the same. Not sure if you are going to monitor boot log of windows or linux or what.. but will try to answer.
If you edit your question and add info on the operating system and an example of relevant lines of boot log file I can provide you with some powershell code.
In general you should do:
Identify how to manually see boot time in log file. For example
probably it will have a starting boot time and a finished boot time.
Something similar to this.
[2012-06-08 12:00:04] starting boot
lot of log entries
[2012-06-08 12:00:34] finished boot
Once you know how to do it manually, you have to convince powershell to do it for you. You can use regular expressions to look for the pattern of dates. In my example look for lines that contains "starting boot" and then parse it to load date.
Here you have an useful link on powershell and regular expressions: http://www.regular-expressions.info/powershell.html

Possible to deploy WAR via Dreamweaver CS5?

I use Dreamweaver heavily for modifying Liferay templates (Velocity files), and then have to run Apache Ant from Command Prompt to deploy the WAR to Tomcat . Is there anyway I can streamline this process so I can save/deploy straight from Dreamweaver?
I tried to setup a site and specify Tomcat as the local server, but obviously Dreamweaver just tries to push the raw file and does deploy the WAR.. Is there some sort of extension or way I can call Apache Ant from Dreamweaver?
Thanks!
I've not seen such an extension, you can search for one at the Adobe Exchange: http://www.adobe.com/go/exchange , however if there isn't one already available, which I suspect there isn't, it would be possible to write one of your own. The following links are for the extending Dreamweaver, and Dreamweaver extensibility APIs:
http://help.adobe.com/en_US/dreamweaver/cs/extend/index.html
http://help.adobe.com/en_US/dreamweaver/cs/apiref/index.html
In this particular case, I believe that you'd need to use an undocumented API call to communicate with an external process (in your case Ant), such as DWfile.runCommandLine() or MM.runCommandLine(). Paul Boon found these and blogged about them and a couple of others here:
http://communitymx.com/blog/index.cfm?newsid=179&blogger=35

example command line and dataset for https://cwiki.apache.org/MAHOUT/itembased-collaborative-filtering.html

after reading https://cwiki.apache.org/MAHOUT/itembased-collaborative-filtering.html I've identified this is EXACTLY what I would like to do... however.. I don't actually have any examples to confirm this.
Can a kind sole out there please just give me a linux cmd line (preferably with a 5 line data example) of how I can run mahout with this dataset ? It's installed exactly as per the install instructions, ie via svn and maven.
The command line options are spelled out right there -- what are you looking for?
Maybe you want to read up on how you run a Hadoop job on the command line, which would be the rest of the command line you want.
This is also covered in detail in Mahout in Action.

Resources