ant « Development « Spring Q&A





1. Package and run a Java application with spring dependencies    stackoverflow.com

I built a stand-alone Java application that has a bunch of dependencies (Apache Commons libs, etc) as well as a dependency on the Spring framework, which in turn has a bunch ...

2. Compile classfile issue in Spring 3    stackoverflow.com

I have used spring framework 3 for my application. Everything is ok while developed in Netbeans But i need a custom build and done for the ...

3. ant junit task error    stackoverflow.com

i am trying to do the spring tutorials from the spring website. one of the tutorials include bulding an ant build file which when i build I keep getting this error

BUILD ...

4. Cant get Junit to work with Spring in an ANT build    stackoverflow.com

I am trying to get Spring MVC and Junit working with eachother and I am having trouble configuring the build.xml file. I am fairly new at using ANT and do not ...

5. Spring application ant build fails    stackoverflow.com

I am very new to java and spring. I was trying out my first ever application in spring. I followed this tutorial http://www.ibm.com/developerworks/opensource/tutorials/os-ag-springframe2/section6.html I am unable to build using ant. ...

6. dealing with paths that end the same and have a fixed set of path prefixes    stackoverflow.com

My application has internationalization and the language code is in the first part of every path like "/en/dosomething" and "/de/dosomething" How do i make a single access rule for the "dosomething" resource ...

7. Spring is error with Ant build file    stackoverflow.com

I used to build and run automatically with NetBean IDE. It works fine with Spring. However, now I want to write my own Ant build file. It builds successfully, the only ...

8. unable to build new java spring project    stackoverflow.com

i am trying to build a simple java spring project i got setup which contains my hibernate .hbm mappings, the POJO'S that go with each mappings and one SimpleFormController class that ...

9. Different Spring config files for different builds    stackoverflow.com

In Spring application, I set up app-security.xml to controll all the security issues. However, the production will use SSO, where as on local machine I would like the plain old user ...





10. why does javac in ant build script error with incompatible types    stackoverflow.com

I have an ant build script that errors out with the following message.

javac incompatible types by ant build

ProductDao.java:41: incompatible types
found   : java.lang.Object
required: java.util.List<com.sample.dto.Product>
       ...

11. Unable to autowire in JUnit tests via Ant - looks like @RunWith(SpringJUnit4ClassRunner.class) isn't working    stackoverflow.com

My test case looks something like this:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext.xml" })
public class AbstractDatabaseTestCase extends AbstractTestCase {

    @Autowired
    private SessionFactory sessionFactory;

}
For some reason when I run ...

12. ant target for junit fails to load spring context xml files    stackoverflow.com

When i run ant target for junit, following error occurs:

    Configuration problem: Failed to import bean definitions from URL location [classpath:/esw-web-ctx.xml] Offending resource: class path resource [applicationContext.xml]; nested ...

13. junit test and non junit test with ant target    stackoverflow.com

<junit printsummary="on" fork="yes" forkmode="once" 
haltonerror="false" haltonfailure="false" 
    failureproperty="junit.failure" showoutput="false" maxmemory="1024m">
                <classpath>
   ...

14. Could not resolve placeholder    stackoverflow.com

When i run junit test cases, getting following error:

Invalid bean definition with name 'CacheRegionManagerFactory' defined in class path resource [com/bgc/ecm/core/caching/cacheRegionManager-ctx.xml]: Could not resolve placeholder 'appRoot'

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'CacheRegionManagerFactory' ...

15. Java, Spring, Ant deploys two war files    stackoverflow.com

my build.xml

<?xml version="1.0"?>

<project name="spring" basedir="." default="usage">
    <property file="build.properties"/>

    <property name="src.dir" value="src"/>
    <property name="web.dir" value="war"/>
    <property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
   ...

16. Ant task for Spring Validation    stackoverflow.com

I need an ANT task to validate spring configuration. I need to find problems at build time before runtime ? For example, In spring context file contains a property a bean, ...





17. Different behaviour when running code in junit    stackoverflow.com

currently i am developing a spring app. Until now i used Ant and Junit for running the code. Now i tried to move the test code to a java class ...

18. Specifying multiple Spring configuration files using ant style pattern in command line app    stackoverflow.com

I have a web application with mutiple Spring configuration files. These files are loaded using "contextConfigLocation" in web.xml. Like this:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    ...

19. InstallTask not found    stackoverflow.com

I'm going through the Spring MVC tutorial. I have a build.xml and build.properties file as well as a simple jsp file. When I try to run ant, I get this error:

Buildfile: ...

20. Deploying app with Ant not working.    forum.springsource.org

Oct 14th, 2011, 07:47 PM #1 Flo-con View Profile View Forum Posts Private Message Junior Member Join Date Oct 2011 Posts 1 Deploying app with Ant not working. Hi, I created ...

21. trying to run ant tests    forum.springsource.org

trying to run ant tests I am trying to run "jar tests" but I am getting xml errors. This is probably a stupid configuration problem. Btw, when I run the tests ...

22. ApplicationContext in Ant Task.    forum.springsource.org

ApplicationContext in Ant Task. I am trying to create an ApplicationContext (specifically a FileSystemXmlApplicationContext) in a custom Ant task I have written. It finds the XML file correctly, and then throws ...

23. Ant style path wildcard matching API call    forum.springsource.org

Hi I am looking to call a Spring API method, that given input "**/*.xml" will return me a list of Resources that I can load from the file system.. Does anyone ...

24. Ant task    forum.springsource.org

Has any work been done in this space? The biggest Spring complaint I hear from developers is the lack of build time validation of the application context. The Spring IDE is ...

25. creating ant task to use spring, class not found    forum.springsource.org

creating ant task to use spring, class not found Hi, I've created an Ant task to use spring and it attempts to load in the spring context in the execute method: ...

26. ClassPathXmlApplicationContext and Ant-Style    forum.springsource.org

ClassPathXmlApplicationContext and Ant-Style Hi, I tried to use Ant-style with ClassPathXmlApplicationContext and it doesn't work. My context is not located in a JAR and the classpath is correctly set. When I ...

27. Use of ${ant.style.placeholders} for resources    forum.springsource.org

Use of ${ant.style.placeholders} for resources Is it possible to customize the use of ${ant.style.placeholders} when loading Resources? Background: I'm running in TomCat, and I'd really like to have the same war ...

28. Ant Error in running 1.2.8 test suite: Could not create task or type of type:junit    forum.springsource.org

When I run the 1.2.8 test suite I am getting the error \build.xml:695: Could not create task or type of type: junit. What can be a reason for this error? ANT_HOME ...

29. Build with ant and jdk1.4    forum.springsource.org

Just downloaded the new 2.0 version and I want to build a version targeted for Java version 1.4.2. I tried an ant build 'alljars' using the 1.4.2 compiler, but it seems ...

30. Spring 2.0 broken ant build file    forum.springsource.org

31. Ant task for editing XML configuration    forum.springsource.org

Hi, I'm using some code generation tools to create DAOs and services using those DAOs. This is done by ant tasks. What I want to achieve now: the Spring configuration xml-file ...

32. Apache Ant path syntax    forum.springsource.org

Apache Ant path syntax Hi all, In order to configure authorization in Acegi we have to indicate which roles have authorization to access some list of url patterns. We could have ...

33. PATTERN_TYPE_APACHE_ANT, FilterSecurityInterceptor and URL-parameters    forum.springsource.org

As I stated it is not possible to limit access based on an url including the request parameters. Only the url WITHOUT parameters can be checked.

34. OutOfMemory when deploying to Tomcat6.0 using Ant    forum.springsource.org

OutOfMemory when deploying to Tomcat6.0 using Ant I'm starting to try out packaging and deploying to Tomcat. I tried following the Spring MVC (configuration portion) and I was able to successfully ...

35. Ant + Spring = FileNotFound    forum.springsource.org

Thank you, I realize this. How do I get it to pull just the "beans1.xml" part out? I would like to make it location agnostic so I don't have to hard ...

36. Tests fail when runinig with ant    forum.springsource.org

Hi all, i have an integration test for my Daos, the test case is implemented through a class the extends AbstractTransactionalDataSourceSpringContextTests Spring class, when i run the test inside Eclipse it ...

37. Tests fail when runinig with ant    forum.springsource.org

Hi all, i have an integration test for my Daos, the test case is implemented through a class the extends AbstractTransactionalDataSourceSpringContextTests Spring class, when i run the test inside Eclipse it ...

38. 'import' directive and Ant path matching    forum.springsource.org

Is there any way to import resource files using Ant paths ? I have a large number of spring web flows that I use, and I like to keep the beans ...

39. cannot build application-context from within ant task    forum.springsource.org

cannot build application-context from within ant task hi there, given the following dummy class... Code: package com.xyz.dummy; import org.apache.commons.logging.LogFactory; public class Dummy { public void init() { LogFactory.getLog(getClass()).info("dummy initialized"); } } ...

40. cannot run TimerFactoryBean with Ant fork = "false"    forum.springsource.org

cannot run TimerFactoryBean with Ant fork = "false" Hi all, I tried to build a timer using TimerFactoryBean and ScheduledTimerTask. I managed to run the program normally and as expected if ...

41. ant task to aut-gen for mappingResources?    forum.springsource.org

ant task to aut-gen for mappingResources? Hi, I'd like to distribute my services layer (and underlying Hibernate-based persistence layer) as a single JAR. I'm having trouble easily packaging hbm.xml files: ...

42. Problems my Spring-based app deploying with Ant    forum.springsource.org

Problems my Spring-based app deploying with Ant I've been trying to deploy my Spring-based application to Tomcat with Ant. My build file is, in principle, the same as the one Thomas ...

43. some way to resolve this with ant or other tool    forum.springsource.org

hello guys i am in hell with this i work with xdoclet and pls see this situtation Code: /** * @hibernate.property column="precioUnitarioVenta" length="6" not-null="true" */ public BigDecimal getPrecioUnitarioVenta() { return precioUnitarioVenta; ...

44. hbm2ddl schema export ant tast using applicationContext    forum.springsource.org

hbm2ddl schema export ant tast using applicationContext Hi there, I am very new to spring, and am having trouble reconciling how all of these different components wire together. Figuring out how ...

45. Test Cases does NOT persist with JUNIT & ANT    forum.springsource.org

Test Cases does NOT persist with JUNIT & ANT I have several test cases I wrote and tested individually. They run fine individually. Next, I tried to create a junit test ...

46. JUnit tests all fail if run via ant script    forum.springsource.org

JUnit tests all fail if run via ant script I have a series of junit tests that run fine when I launch them via eclipse. But if I try to run ...

47. InterPackage(Folder) dependency in spring/ant    forum.springsource.org

InterPackage(Folder) dependency in spring/ant Hi I am going to handle a large project in spring.I dont want to keep all my packages in a single folder.I want to logically separate my ...

48. getting ant errors    forum.springsource.org

getting ant errors hi everybody, i'm a new user of the springframework, i'm trying the tutorial of the inventory system but when i want to build the application using ant i'm ...

49. Problem running SpringJUnit4ClassRunner via ANT    forum.springsource.org

Hi all, I am trying to run my tests using ANT and I have found that @Autowire is not activated. However, when I run the same test using Eclipse built-in JUnit ...

50. @Autowired dependencies not set by ANT on a non-public class    forum.springsource.org

@Autowired dependencies not set by ANT on a non-public class Hi all, It seems that setters annotated with @autowired are not called, when running a unit-test via ANT, if the autowired ...

51. Problem with ANT Pattern Matching    forum.springsource.org

Hi everybody, I'm having a problem with ANT patter matching. I have the following attributes defined for a resource: /MyServlet**=ROLE_ANONYMOUS But, the following URL does not match this pattern: Code: http://localhost:9080/MyApplication/MyServlet?forward=/TestView.jsp ...

52. No more request to save on Ant task?    forum.springsource.org

No more request to save on Ant task? Hi, I didn't know where else to put this so I apologize if its in the wrong place. Last week I downloaded and ...

53. Request Mapping - Ant Style Patterns    forum.springsource.org

Request Mapping - Ant Style Patterns Hi there! I am recently working on a webproxy as a part of the european union project SPIKE, which will be available as open source ...

54. ant problem with spring    forum.springsource.org

ant problem with spring Hi guys, I'm fairly new to spring and I've been able to use it relatively comfortably so far. That is until I tried to run some junit ...

55. Invoking application context through Junit and Ant    forum.springsource.org

Oct 13th, 2010, 11:38 PM #1 KoAllen View Profile View Forum Posts Private Message Junior Member Join Date Oct 2010 Posts 1 Invoking application context through Junit and Ant We are ...

56. Ant task to validate applicationContext.xml    forum.springsource.org

Amit, currently an ANT task which validates Spring beans config files is not planned. But it can be done. All the code for the validation itself is already available in the ...

57. Ant task for perform package command    forum.springsource.org

Hello, I'm newbie in Spring Roo. But I need to use Ant task for packaging the application to war file. Spring Roo has command for this case "perform package". How can ...