I don't think it works to set the ant.classpath property, you have to include a classpath or classpath ref in the taskdef tag for the maven-ant-tasks jar (not 100% sure though).

On 24.10.2012 19:02, Gopu Shrestha wrote:
Hi Mauro,
I am new in Maven and Ant. can I just copy and paste the build.xml and
run Ant Script via Eclipse-Juno?
if yes, I am getting this error:
Buildfile: C:\BDD WorkingCopy\Build.xml
setup:

BUILD FAILED
C:\BDD WorkingCopy\Build.xml:12: Problem: failed to create task or type
antlib:org.apache.maven.artifact.ant:dependencies
Cause: The name is undefined.
Action: Check the spelling.

However I had added jar in class path. like this;
<path id="ant.classpath">
<fileset dir="C:\JarFiles\maven-ant-tasks-2.1.3" includes="**/*.jar" />
<pathelement location="target/classes" />
</path>

Am I missing anything???

On Wed, Oct 24, 2012 at 10:05 AM, Mauro Talevi
<[email protected]
<mailto:[email protected]>> wrote:

    There is a trader-ant example that shows you how to use Ant.


    On 24 Oct 2012, at 16:41, Gopu Shrestha
    <[email protected]
    <mailto:[email protected]>> wrote:

    Hi Alexander,
    Maven is last options for me therefore I am trying to run through
    ant script and here is the result.
    Buildfile: C:\BDD WorkingCopy\Build.xml
        [junit] Running /BDD WorkingCopy/src/com/execution/Execute
        [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
        [junit] Test /BDD WorkingCopy/src/com/execution/Execute FAILED
    compile:
    run:
    BUILD SUCCESSFUL
    Total time: 322 milliseconds

    Can anybody (ant expert) can figure this out for me, please..

    ---Build.xml----
    <?xml version="1.0" encoding="UTF-8"?>
    <project default="run" name="Running jBehave Test">

    <target name="run" depends="compile">
    </target>
    <junit printsummary="on">
    <test name="/BDD WorkingCopy/src/com/execution/Execute" />
    <classpath>
    <pathelement location="C:\Jar Files\junit-4.10.jar" />
    <pathelement location="CompiledClasses" />
    </classpath>
    </junit>

    <target name="compile">
    <javac includeantruntime="false" srcdir="./src"
    destdir="CompiledClasses">
    <classpath refid="class.path" />
    </javac>
    </target>

    <path id="class.path">
    <fileset dir="C:\jbehave-web-3.5.4\lib">
    <include name="**/*.jar" />
    </fileset>
    </path>

    </project>

    On Tue, Oct 23, 2012 at 3:40 PM, Alexander Lehmann
    <[email protected]
    <mailto:[email protected]>> wrote:

        try running your tests with external Maven in Eclipse, that
        should decouple the test from the Eclipse libraries


        On 23.10.2012 22:03, Gopu Shrestha wrote:

            I am close to develop this POC for my incoming project.
            Can any one advise me another alternative ? like using Ant
            to execute
            the test?


            On Tue, Oct 23, 2012 at 2:27 PM, Cristiano Gavião
            <[email protected]
            <mailto:[email protected]>
            <mailto:[email protected]
            <mailto:[email protected]>>> wrote:

                I follow Brian's comment. I had some problems with
            junit conflicts
                some time ago.

                If you are using Juno, it is using Junit 4.10 while
            jbehave is using
                4.8.2.

                I resolved my problem after I converted the project to
            maven and
                installed m2e plugin that have set the dependencies
            properly.. I
                have to exclude jbehave's junit too in my project's pom.

                regards,

                Cristiano


                On 23/10/12 16:09, Brian Repko wrote:

                    I believe that the JUnit4 container collides with
                hamcrest - there
                    may be another hamcrest library contained in the
                JUnit4 container
                    in Eclipse.
                    I think I've hit this before and ended up not
                using JUnit4 as part
                    of my project configuration but rather adding it as a
                    library/maven dependency.
                    Brian
                    ----- Original message -----
                    From: Gopu Shrestha

                <[email protected]
                <mailto:[email protected]>
                    <mailto:gshrestha1972@gmail.__com
                <mailto:[email protected]>>>
                    To:
                [email protected]
                <mailto:[email protected]>

                <mailto:[email protected].__org
                <mailto:[email protected]>>
                    Subject: Re: [jbehave-user] example Tables samples
                    "org.hamcrest.Matchers"'s
                    Date: Tue, 23 Oct 2012 12:47:37 -0500
                    Removed, added and restarted, same error. Is there
                any problem in
                    code??? I don't think so....
                    Inline image 1

                    On Tue, Oct 23, 2012 at 12:41 PM, Mauro Talevi

                <[email protected]
                <mailto:[email protected]>
                    <mailto:mauro.talevi@__aquilonia.org
                <mailto:[email protected]>>>
                wrote:

                        Could be a corrupt jar.  Try re-downloading
                the hamcrest jars,
                        or if you're using Maven delete the copy in
                the local repo.

                        On 23/10/2012 18:57, Gopu Shrestha wrote:

                            Hi folks,
                            I am getting this error, what could be the
                    problem???
                            (java.lang.SecurityException: class
                    "org.hamcrest.Matchers"'s
                            signer information does not match signer
                    information of other
                            classes in the same package)
                            Inside Method
                            Processing system properties {}
                            Using controls

                    
EmbedderControls[batch=false,__skip=false,__generateViewAfterStories=true,__ignoreFailureInStories=false,__ignoreFailureInView=false,__verboseFailures=false,__verboseFiltering=false,__storyTimeoutInSecs=300,__threads=1]
                            (BeforeStories)
                            Running story calculator.story
                            (calculator.story)
                            Scenario:
                            Given the table of factors:
                            |first|second|
                            |4|5|
                            |3|2|
                            |8|8|
                            When Columns to add
                            Then the result:
                            |product|sum|
                            |20|9|
                            |6|5|
                            |64|16|
                             (FAILED)
                            (java.lang.SecurityException: class
                    "org.hamcrest.Matchers"'s
                            signer information does not match signer
                    information of other
                            classes in the same package)
                            (AfterStories)
                            Generating reports view to 'C:\BDD
                            WorkingCopy\target\jbehave' using formats
                    '[stats, console,
                            txt]' and view properties
                    '{defaultFormats=stats,
                            decorateNonHtml=true, viewDirectory=view,
                            decorated=ftl/jbehave-report-__decorated.ftl,
                            reports=ftl/jbehave-reports-__with-totals.ftl,
                            maps=ftl/jbehave-maps.ftl,
                            navigator=ftl/jbehave-__navigator.ftl,
                            views=ftl/jbehave-views.ftl,

                    nonDecorated=ftl/jbehave-__report-non-decorated.ftl}'
                            Reports view generated with 1 stories (of
                    which 0 pending)
                            containing 1 scenarios (of which 0 pending)


                    Email had 1 attachment:

                      * |image.png|
                          148k (image/png)






        
------------------------------__------------------------------__---------
        To unsubscribe from this list, please visit:

        http://xircles.codehaus.org/__manage_email
        <http://xircles.codehaus.org/manage_email>







---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to