Ant 1.6.5 and JUnit 4.1

According to ant bugs Bug-40682 and Bug-40697, Ant 1.6.5 and JUnit 4.1 have integration problems. Is there a plan for Jdeveloper 11g to upgrade to Ant 1.7?

We are currently testing up take of Ant 1.7 for JDeveloper 11.
--RiC                                                                                                                                                                                           

Similar Messages

  • ANT and JUnit in weblogic

    Hi.
    I see that the problem with ant and junit is discussed here, but with no absolutte solution.
    The problem:
    I create an build.xml containing the <junit>-task and want to run this from within the BEA Workshop. The standard error-message is that it cant find the junit-task. I can run the same build file from command since I got ANT set up correctly with JUnit outside Weblogic.
    It sems for me that Workshop dont care about existing installation of ANT, it uses it own version. I have included junit.jar in the same direstory as ant.jar is in BEA-install-dir also, but it wont work.
    Does anyone have a solution to this "small" problem??
    Thanks in advance.

    I haven't figured out why, but my JDeveloper automatically adds the classpath I have in my ant build.xml to the additional classpath of the project. My classpath is set like this in the build.xml:<path id="classpath">
    <fileset dir="env/lib">
          <include name="**/*.jar"/>
        </fileset>
    </path>And my compile target looks like this:<target name="compile" depends="init">
        <mkdir dir="${compile.outdir}"/>
        <!--Compile Java source files-->
        <javac destdir="${compile.outdir}" debug="on">
           <classpath refid="classpath"/>
           <src refid="srcpath"/>
        </javac>
      </target>And my Jdev project settings -> common -> ant has my build.xml file selected with default make and rebuild targets selected. I have never put a single entry in the additional classpath area but somehow I have all the libs as I set up in my build.xml file. I'm using JDev 9.0.3.2 by the way.

  • Need steps to create ant scripts for publishing and deploying projects.

    Need steps to create ant scripts for publishing and deploying projects.
    Have got ant, Oracle BPM Enterprise WL edition installed , Need to know what are the other configurations to be done.
    Any working example would help me to understand, please do mail me at [email protected]
    Thanks in advance.
    -Sree

    Sreekant,
    Please find the build file to publish and deploy.
    <project name="deployProject"
    xmlns:fuego="antlib:fuego.tools.ant.enterprise"
    xmlns:fuego.j2ee="antlib:fuego.tools.ant.j2ee" default = "publish">
              <property file="./Properties/fuego_deploy.properties"/>
              <fuego:passport id="fuego.passport"
    directoryid="${fuego.directoryid}"
    preset="engine" />
    <target name="publish" description="Publish and deploy processes" depends = "takeInputs">
    <!-- Open a session to the Oracle BPM directory -->
    <fuego:session
    passportref="fuego.passport"
    verbose="true"
                   properties="${fuego.basedir}/conf/directory.xml"
    haltonerror="true" >
    <!-- Publish processes -->
    <fuego:publish fpr="${fuego.project.name}"
    deploy="true"
    engine="${fuego.engineName}"
                        importdata = "${fuego.importdata}"
                        automaproles="${fuego.automaproles}"
                        automapbuspars = "${fuego.automapbuspars}"
                        automapvars="${fuego.automapvars}"
                        automapconfigs = "${fuego.automapconfigs}">
    </fuego:publish>
    </fuego:session>
    </target>
    <target name= "takeInputs" >
    <input
    message="Please enter admin-username:"
    addproperty="fuego.participant"
    />
    <input
    message="Please enter admin-password:"
    addproperty="fuego.password"
    >
    </input>
    </target>
    </project>
    and find the properties I have used..
    fuego.basedir=C:\OraBPMEnterpriseHome
    fuego.directoryid=default
    fuego.engineName = bpmengine
    fuego.project.name = E:/antExamples/Project/CommonUtilities
    # If the below property is true then ant script imports data from the project, as defined in Studio.
    # This includes importing:
    #      •Holiday and Calendar rules
    #      •Organizational Units
    #      •Roles
    #      •Resource configurations
    #      •External Variables
    fuego.importdata = true
    #If the below property is true ant script automatically map abstract roles to real ones with the same name.
    fuego.automaproles=true
    #If the below property is true ant script automatically map business parameter variable names (as defined in the project design) to an business parameter variable id with the same name (as defined in the Fuego Enterprise directory).
    fuego.automapbuspars = true
    #If the below property is true ant script automatically map external variable names (as defined in the project design) to an external variable id with the same name (as defined in the Fuego Enterprise directory).
    fuego.automapvars=true
    #If the below property is true ant script automatically map External Resources configurations (as defined in the project design) to real Configurations with the same name (as defined in the Fuego Enterprise directory).
    fuego.automapconfigs = true

  • Netbeans and junit

    Hi,
    I am sorry if this is the wrong place to post this but I need a quick answer.
    I have developed a school project in netbeans and junit.
    How can I execute the junit tests externaly to the IDE?
    Where is the junit installed?
    thanks,
    Sebastian

    JUnit is just a java library. Take a look at
    http://www.junit.org/index.htm

  • Ant basics, webapp structure, and the build target

    I've reviewed the standard build.xml
    but apparently Tomcat and NetBeans suggest a slightly different webapp dir.structure layout.
    That's making things a big confusing (on the Tomcat side), especially when it comes to the build target, creating the <servlet> and <servlet-mapping> configurations, and running the servlet.
    I thought the target would be the webapp's root directory, but I'm 2nd guessing myself now that I see ant targets of build and dist.
    Can someone clue me in about standard best practices here ?
    I'm also curious about the use of the Tomcat manager app and how that works. thanks for any replies to sort this out.

    I am working on this very thing as well...

  • Error with ant build and JUnit task in IntelliJ

    Hi,
    I seem to be having a very annoying error in IntelliJ. Here are the stats:
    - IntelliJ 4.5.1, Build 2239
    - Using own version of ant (1.5.1)
    - removed junit37.jar from my ant1.5.1/lib dir, and instead added junit version 3.8.1 of junit.jar to that dir
    - Specified that same junit.jar in my project classpath (this is the only item in the classpath for my test project)
    - MyTest.java is the only class in my project, and it is specified as a JUnitTest in run/debug configurations and includes the classpath and jdk of my project module
    When I right-click on my test class, and go to "Run" then my simple test passes. I see the results in the run window.
    Here is where the issue lies (and why this is confusing me). When I try to run the same test from my build.xml file in this project, specified with the classpath as the same from my project, and with the following junit task, I get the below error (3 times in a row for whatever reason). If any of you know of a configuration issue that I may be missing, please let me know. It is very frustrating! Thanks a lot, in advance.
    <target name="run.test">
            <javac classpath="class.path" srcdir="src" destdir="src" />
            <junit haltonerror="true" printsummary="yes" haltonfailure="true" showoutput="true">
                <classpath refid="class.path" />
                <test name="MyTest" />
            </junit>
        </target>
    Test MyTest failed
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:568)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:527)
         at org.apache.tools.ant.Task.perform(Task.java:319)
         at org.apache.tools.ant.Target.execute(Target.java:309)
         at org.apache.tools.ant.Target.performTasks(Target.java:336)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
         at org.apache.tools.ant.Main.runBuild(Main.java:610)
         at org.apache.tools.ant.Main.start(Main.java:196)
         at org.apache.tools.ant.Main.main(Main.java:235)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:13)

    I figured this out - I needed a formatter tag to see the output of the test.

  • Packages, Classpath, Ant, and JUnit (setting up a nice environment)

    Hi,
    I am seeking a little help getting up and running, creating a nice environment where I can build a Java project, including building with Ant and using JUnit - hopefully this is the right forum. I am having some trouble in getting JUnit to run my tests properly (it is installed and findable by my Java install) and I think this is due to a package/classpath issue that is currently outside my experience. Here's my setup to explain:
    I have installed the JUnit jar in my extensions folder, and it works properly (I can call it, don't get errors about JUnit), however, when I run my test I get the error:
    "Could not find class: org.xxx.powersim.ModelTest
    Time: 0
    OK (0 tests)
    Java Result: 1"
    ModelTest has been compiled properly without error, and looks like this:
    package org.xxx.powersim;
    import org.junit.*;
    import static org.junit.Assert.*;
    import java.util.*;
    public final class ModelTest {
         public static void main(String args[]) {
               org.junit.runner.JUnitCore.main("org.xxx.powersim.ModelTest");
         @Test
         public void testJunit() {
              assertTrue(true);
    }Pretty simple stuff.
    As you can see I'm trying to use the 'main' method of the test to execute the test itself... but I've tried running it via the runner from the command line also: "java org.junit.runner.JUnitCore org.xxx.powersim.ModelTest". I get the same result.
    It might be a package issue, so here's how I have things set up in the file system:
    PowerSim
         /build
              /org
                   /xxx
                        /powersim
                             - ModelTest.class
         /src
              /org
                   /xxx
                        /powersim
                             -ModelTest.javaI've tried running it within Ant, by hand using the runner, by hand calling the main method, and from within TextMate's built-in bundle - I get the same result. JUnit is installed and running fine, but it can't seem to see the test class - the more I think about it this is a package problem that I'm just not sure how to fix. I've tried running it by hand in the root /PowerSim directory, in the /build folder, and in the /powersim folder where ModelTest is. I still get the error that "Could not find class: org.xxx.powersim.ModelTest".
    My files compile just fine with my simple Ant script which is as follows:
    <?xml version="1.0"?>
    <project name="PowerSim" default="run" basedir=".">
    <property name="src" value="./src"/>
    <property name="build" value="./build"/>
    <property name="compile.debug"       value="true"/>
    <path id="compile.classpath">
       <pathelement location="${mysql.jdbc}"/>
       <pathelement location="${junit.jar}"/>
    </path>
       <target name="build" depends="init">
           <javac srcdir="${src}"
                  destdir="${build}"
                  debug="${compile.debug}"
                  source="1.5">
              <classpath refid="compile.classpath"/>
           </javac>
       </target>
    <target name="init">
       <mkdir dir="${build}"/>
    </target>
    <target name="run" depends="build">
       <java classname="org.xxx.powersim.Model"
           fork="true"
           dir="${build}"
           classpath="${build}"
           maxmemory="500m">
       </java>
       </target>
         <target name="test" depends="build">
             <java classname="org.xxx.powersim.ModelTest"
                 fork="yes"
                 dir="${build}"
                 classpath="${build}"
                 maxmemory="500m">
             </java>
             </target>
    <target name="clean" description="Removes previous build">
       <delete verbose="true">
         <fileset dir="${build}"/>
       </delete>
    </target>
    </project>As you can see, I'm not sure what to try next - any help would be much appreciated.
    I've tried adding things to my $CLASSPATH. For example I've added the root folder of the project, 'PowerSim' to my classpath, but this appears to have no effect. I am running OS X 10.5.
    Thanks again for any help you may be able to offer, it will be very much appreciated,
    - Peter

    Ok - final bump and then I'll go away.
    (Really - if anyone has any advice that would be great)

  • Ear and junit

    I have a ear file **
    and want to write junit test cases for some classes in the ear.
    the ear file has the following structure:
    ->ear
    ----> ejb.jar
    ----> utils.jar
    ----> some.jar
    ----> app-inf
    ------------> lib/third.jar
    ----> meta-inf
    ----------->application.xml
    Q1) Do i have to have the ear file running inside the container to test it?
    Q2) I just want to write test case for some standalong classes in utils.jar..but
    when i run juni ant task with classpath=ear , its gives classnot found, alghouth
    the uitls.jar is part of the ear?
    please help.
    thanks

    Hi,
    "java guy" <[email protected]> wrote in message news:[email protected]..
    I have a ear file **
    and want to write junit test cases for some classes in the ear.
    the ear file has the following structure:
    ->ear
    ----> ejb.jar
    ----> utils.jar
    ----> some.jar
    ----> app-inf
    ------------> lib/third.jar
    ----> meta-inf
    ----------->application.xml
    Q1) Do i have to have the ear file running inside the container to test it?Yes if you are going to test classes that require to run within a container.
    Such classes could be EJB and servlets.
    Q2) I just want to write test case for some standalong classes in utils.jar..but
    when i run juni ant task with classpath=ear , its gives classnot found, alghouth
    the uitls.jar is part of the ear?EAR itself is a JAR file. Java classloader does not look for classes
    in jars that are packaged in to a jar.
    To test your utility jar you should place/access it outside of the EAR.
    Regards,
    Slava Imeshev

  • Mxmlc ant  task with Groovy and ant builder

    Hi,
    i'm doing some Groovy scripting in the build scripts of my project and among the other things have included Flex sources compilation in there. It cares about auto-compilation of source trees so maybe someone will be interested in that:
    http://tech4web.blogspot.com/2008/12/mxmlc-ant-flex-task-in-groovy.html
    Cheers,
    Piotr

    Are you using Adobe FlexAnt?
    On this
    page
    , there is a <compiler.library-path> node that seems to
    import a bundle directory that contains locales. I believe
    <compiler.library-path> is from FlexAnt, so you would need to
    enable it if you haven't.
    Also look on the next page from the link I posted, there is
    another example on how to import bundles in an automation.

  • EJBContainer (glassfish v 3.0 impl) and JUnit, jndi lookup is impossible!!!

    Hello,
    i hope to find a solution, but i think there's something wrong:
    i did my JUnit test case and i instantiate the glassfish v3 EJBContainer in my @BeforeClass method
    running the test, deploy messages are something like this:
    INFO: Portable JNDI names for EJB PhaseHandler : [java:global/ejb-app4338883541443661181/classes/MyEJB!my.package.MyEJB, java:global/ejb-app4338883541443661181/classes/MyEJB]i would like to lookup for the ejb in my @Before methods... but... which jndi name should i use to fetch the EJB if the app name is random?
    i've tried some tries:
    java:global/classes/MyEJB (read from a tutorial)
    java:app/classes/MyEJB (thought it could work but.. no it doesn't)
    java:module/MyEJB (failed :/ )
    any suggestion? any help will be greatly appreciated
    follows my maven dependency configuration
        <repositories>
            <repository>
                <id>maven2-repository.dev.java.net</id>
                <name>Java.net Repository for Maven</name>
                <url>http://download.java.net/maven/glassfish</url>
                <layout>default</layout>
            </repository>
        </repositories>
        <dependencies>
            <dependency>
                <groupId>org.glassfish.extras</groupId>
                <artifactId>glassfish-embedded-all</artifactId>
                <version>3.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>6.0</version>
                <type>jar</type>
                <scope>provided</scope>
            </dependency>
        </dependencies>and this is my test case:
        @BeforeClass
        public static void startContainer() {
            container = EJBContainer.createEJBContainer();
        @AfterClass
        public static void stopContainer() {
            if (container != null) {
                container.close();
         * @throws NamingException
        @Before
        public void setup() throws NamingException {
            myEjb =(MyEJB)container.getContext().lookup(
                    "which jndi should i use?");
        }

    i did my JUnit test case and i instantiate the glassfish v3 EJBContainer in my @BeforeClass methodWhat is "your jUnit test case"?
    You don't have to implement jUnit tests, and if you do, you generally benefit to have more than one.
    Moreover, you shouldn't think it as "doing jUnit test cases", but merely as "doing unit-testing using jUnit"

  • Ant with external libraries and external projects

    I usually use eclipse, now I must use ant for obfuscate my code.
    In eclipse I can import external jars and project. Here is my classpath
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
         <classpathentry kind="src" path="src"/>
         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
         <classpathentry combineaccessrules="false" kind="src" path="/PEI"/>
         <classpathentry combineaccessrules="false" kind="src" path="/PEI implementation"/>
         <classpathentry combineaccessrules="false" kind="src" path="/Logger"/>
         <classpathentry kind="lib" path="C:/Java/libraries/jfreechart-1.0.13/jfreechart-1.0.13/lib/jcommon-1.0.16.jar"/>
         <classpathentry kind="lib" path="C:/Java/libraries/jfreechart-1.0.13/jfreechart-1.0.13/lib/jfreechart-1.0.13.jar"/>
         <classpathentry kind="lib" path="C:/Java/libraries/jcalendar-1.3.3/lib/looks-2.0.1.jar"/>
         <classpathentry kind="lib" path="C:/Java/libraries/jcalendar-1.3.3/lib/jcalendar-1.3.3.jar"/>
         <classpathentry kind="lib" path="C:/Java/libraries/mail.jar"/>
         <classpathentry kind="output" path="bin"/>
    </classpath> How can I do the same thing with ant?

    [http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html?PHPSESSID=7292c8206cecdae00f82ea5ac3507e21|http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html?PHPSESSID=7292c8206cecdae00f82ea5ac3507e21]
    [https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/ant/ant.html|https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/ant/ant.html].
    [http://ant.apache.org/manual/|http://ant.apache.org/manual/]

  • CAF 7.1 and JUnit

    Hello Kollegues,
    I am searching fort an ability to run JUnit tests with the CAF 7.1 projects. I use RFC external services and would like to cover the compositions of them with automatic unit tests which should run locally (not on server). Unfortunately SAP does not provide any documentation about that. All you can find about JUnit enablement is very old and not really applicable for that case. What is really needed is an ability to mock the calls for getting JCo clients.
    I canu2019t imagine that CAF services cannot be tested automatically!
    I appreciate your hints!
    Dimitri

    Hi Dimitri,
    Unfortunately, not only the JCo clients need to be mocked. All mappings between the RFC function and the Application Service method are described in the model and are executed at runtime.
    At the moment the easiest way to automatically test external services composition is to write JUnit tests that call the corresponding CAF services at runtime.
    One more idea is to override the Application Service method that calls the external service and mock the call and the mappings. You can do this in the "*Impl" file for the service.
    Please let me know if you need more information for some of the solutions above.
    Bets Regards,
    Tsvetan

  • Workshop and Junit

    Hi
    Has anyone used JUnit with a web-app developed using Workshop ?? Is there any
    plug-in for the same or is it not possible ?
    If anyone does have any articles which say how to use Junit with workshop that
    would be fine .
    Thanks
    Kar

    Piyush,
    JUnit integration is planned for the next release. Until then you can use cactus,
    httpunit or other open source JUnit projects which you can run them via ant tasks.
    Nikhil
    "kar piyush" <[email protected]> wrote:
    >
    Hi
    Has anyone used JUnit with a web-app developed using Workshop ?? Is there
    any
    plug-in for the same or is it not possible ?
    If anyone does have any articles which say how to use Junit with workshop
    that
    would be fine .
    Thanks
    Kar

  • Regular Expression and jUnit in ADF Mobile

    Hi Guys,
    I tried to implement Regular Expression in ADF Mobile, but in my jUnit that I was configured to unit test purpose in my application.
    Shown error below inside jUnit plane.
    java.lang.NoClassDefFoundError: oracle/adfmf/util/regex/Pattern
    How to solve this issue for jUnit ?

    I'll start by answering your Q2 - while in theory you can use the same application for both accessing from a browser on a pc and on a phone - in reality the user experience on the phone is not going to be good because of the limitation of the screen size. Users will need to constantly zoom-in scroll around etc. This is why many people who target application for smart phones prefer to build a separate UI for the mobile device.
    Now question 4 which relates to 1 - We haven't tested the ADF Faces components on the browser of blackberry and so there is a chance that some of their functionality won't work there. We did test and certify the ADF Faces components with the safari mobile browser (iOS) - so this is why you see them work there better.
    This is why we recommend that if you are targeting a blackberry (and other mobile devices) you'll use the Trinidad set of components and in general ADF Mobile Browser project type.
    (see example here: https://blogs.oracle.com/shay/entry/building_iphone_interfaces_for_oracle ). This also means that you'll have the check box checked for mobile device when you create a JSF page.
    For question 3 - when the next ADF Mobile solution will be released you'll be able to create applications that install on the device itself.

  • Problem:JDeveveloper 11g and JUnit Extension against a JDK 5 Project

    We've got a project that requires JDK 5, and would like to run our JUnit tests using the integrated JUnit Extension in Jdeveloper 11g.
    However, we are getting the following error: java.lang.UnsupportedClassVersionError: Bad version number in .class file
    Presumabily, this is because the JUnit classes are JDK 6, since the tests work if we switch our project to use JDK 6.
    Of course, the problem is: Our project requires JDK 5. =)
    Anyone have a workaround?
    Thanks,
    - Bill

    Hi,
    JDeveloper is on JDK 1.5, How can I configure it to be 1.4??
    I had the JDeveloper 10.1.3 also and it went ahead with some updates and now even that shows me that it's version is JDK 1.5
    The latest error I get from JDeveloper(From both 11g and 10.1.3) is here,
    Invoking loadjava on connection 'HR_CapRock_DEV' with arguments:
    -order -resolve -thin
    errors : class package1/mypackage/JavaStoredProc
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    The following operations failed
    class package1/mypackage/JavaStoredProc: resolution
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:473)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:360)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:284)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:383)
    #### Deployment incomplete. #### Jun 18, 2007 10:17:31 AM
    *** Note ***
    One possibility for the deployment failure is that the target Database may not support JDK version 1.5. Updating your Project Properties compiler Source & Target to an earlier release could fix this problem.
    How can I either downgrade JDK on the compiler(JDeveloper) to be 1.4 or, How can I resolve the error,
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    Thanks,
    Sujith

Maybe you are looking for

  • Problem in Attachement as HTML or TXT when run in back ground

    hi, I am not getting the full file as attachement when a abaplist is generated in background and sent as attachement in Mail.... The SCOT settings are HTM for ABAP list...Any help in this regard is highly appreciated. Many records are missing in the

  • Push for MS Exchange

    I have three accounts set-up for email. One of which is my work MS Exchange account. This (and all my accounts) are set-up as a push account on my phone, but I only get messages when manually refreshing for the one account. This is my work email on a

  • URGENT : Record Group Problem

    hello all i have a problem regarding record group. i want to populate my record group with a dynamic clause which is "and main_code not in ('02725','02868')" and my record group query is "select mt.main_number from main_table mt,main_parent mp where

  • Nokia 5610 new firmware...

    can anyone tell me when will the new firmware of nokia 5610 going to be launched???? im talking about the version higher than 8:30........

  • Can you download dreamweaver cs6 using a creative cloud account?

    I'm taking an introduction to Dreamweaver CS6 course.  The instructor has stated using the CC version is not recommended.  He recommended uninstalling it and using the CC account to then download the CS6 version.  He stated there should be an option