ant

Running Oracle sql script from java gives SQLSyntaxErrorException: ORA-00900: invalid SQL statement

谁说胖子不能爱 提交于 2019-12-30 14:17:33
问题 I am using Oracle 11g, I am executing Oracle sql script through java code. My SQL script may contain SQL statements(DDL or DML) or PL/SQL blocks, so I don't want to parse the script in my java code but used This solution to execute complete script at once. Following is the sample code, where SQLExec class is in ant jar . This solution worked for most cases except that if sql script contains create or replace trigger it fails with java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL

How to start an aggregate jetty-server JAR from Ant?

老子叫甜甜 提交于 2019-12-30 13:24:48
问题 Background Disclaimer: I have very little experience with Java. We previously used a wrapped version of Jetty 6 for on-demand static content (JS, CSS, images, HTML) during our Ant build so we can run unit tests with PhantomJS against an HTTP-hosted environment. However, Jetty is now on version 8.1.3 and we no longer need that wrapping (which solves a different problem which is now moot), so I wanted to update to just using Jetty 8.1.3 directly. First I downloaded the whole Jetty distribution,

Getting a cannot find symbol : method getSystemService from ant

最后都变了- 提交于 2019-12-30 11:34:11
问题 I am just starting out with android and ant is giving me the following error: -compile: java:44: cannot find symbol [javac] symbol : method getSystemService(java.lang.String) [javac] AudioManager am = (AudioManager)this.getSystemService(Context.AUDIO_SERVICE); ^ I don't understand the problem since I am importing android.media.AudioManager; My code is as follows: package com.example.findme; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent

Pass semicolon in Ant as a parameter

不想你离开。 提交于 2019-12-30 11:11:25
问题 I want to pass ";;;" string as a string parameter in my Ant task: <mytask param=";;;"/> but Ant consider semicolon as a special symbol and raises an error java.lang.IllegalArgumentException: Illegal group reference how can I escape ; symbol to pass it to Ant? p.s. also I found that I can't pass { symbol, so I wonder what's the common way to escape characters in Ant? I've tried "$;$;$;" but it's not working for me UPDATE: sample code: public class MyTask extends Task { private String value;

Ant replace token from properties file

孤人 提交于 2019-12-30 08:32:21
问题 i would like to replace tokens in source files with Ant: some test ${foo} other text ... Tokens are contained in a properties file eg.: foo=1 Actually this is easy if tokens in source files were like '@@foo@@' or 'foo' but i'm not able to replace whole token : ${foo} I've succeed years ago but this time i've failed ... Thanks 回答1: This is somewhat similar to these. Properties are loaded from the file properties.txt . The weakness here is that all occurrences of ${ in your input text are

How to exclude files with spaces in the path in Sonar?

元气小坏坏 提交于 2019-12-30 06:22:06
问题 I am trying to exclude some auto generated code (Service References) from Sonars static code and unit test coverage analysis. The project is C# .Net and Sonar is running via Jenkins on a Windows server. Within my sonar-project.properties file I am able to exclude various other files and directories by using the sonar.exclusions property, but this is not working for files that have a space in the path. sonar.exclusions=**/Global.asax.cs, **/MyProject/Service References/* Given the above

Can I use a Maven plugin (enunciate) in Gradle?

喜你入骨 提交于 2019-12-30 06:04:50
问题 I have a maven plugin called enunciate that generates nice API documentation. I'd rather use Gradle as my build tool but it looks like it's limited in this aspect or maybe I just don't know how to use it. I'm wondering if it's possible to use a maven plugin (enunciate) in gradle somehow? Do I have to write an ant script and call that? So far I can't find a gradle example for enunciate so I'm guessing it's not supported? 回答1: You can't use a Maven plugin as-is in Gradle; you'll have to port it

Can I use a Maven plugin (enunciate) in Gradle?

删除回忆录丶 提交于 2019-12-30 06:03:46
问题 I have a maven plugin called enunciate that generates nice API documentation. I'd rather use Gradle as my build tool but it looks like it's limited in this aspect or maybe I just don't know how to use it. I'm wondering if it's possible to use a maven plugin (enunciate) in gradle somehow? Do I have to write an ant script and call that? So far I can't find a gradle example for enunciate so I'm guessing it's not supported? 回答1: You can't use a Maven plugin as-is in Gradle; you'll have to port it

Ant: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

扶醉桌前 提交于 2019-12-30 05:57:07
问题 I've installed ubuntu 10.10 in my system and installed ant with the following command: sudo apt-get install ant Now, ant is visible in the share folder, so I've tried to run the ant command in terminal, but it gives me this error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security

Ant: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

*爱你&永不变心* 提交于 2019-12-30 05:57:05
问题 I've installed ubuntu 10.10 in my system and installed ant with the following command: sudo apt-get install ant Now, ant is visible in the share folder, so I've tried to run the ant command in terminal, but it gives me this error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security