just to make myself clear, i could also have said ant is like prolog and
maven like pascal to illustrate my point.

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 10 Jul 2011 13:20, "Stephen Connolly" <[email protected]>
wrote:
> please read one of the maven books. the sonatype one is not too bad.
>
> maven stops you worrying about local jars... you just add a test scope
> dependency on unit to your pom... it looks like you are thinking that
maven
> is just a fancy ant... it is a whole different beast, with a completely
> different approach to building software.
>
> think of ant being like pascal, and maven being like prolog (one is a
> completely different approach to expressing a solution from the other, yet
> both are turing complete, so can be used to solve any problem - i am not
> saying maven is like prolog, more that they are different paradimes and i
> was trying to pick sufficiently different programming languages)
>
> ant asks you to spell out all the steps to build your software, target by
> target.
>
> maven asks you to bind plugins to a predefined lifecycle which has all*
the
> phases you would want for building software.
>
> ant says nothing about where you get dependencies from. maven expects you
to
> tell it what dependencies you want, and it will take care of getting them
> for you.
>
> and then there is the maven reactor... which is the list of all artifacts
> produced in the current build so far... there is no analogue in ant for
that
> (but you could emmulate one if you needed)
>
> the other thing is ant has no opinions about how to build your software...
> maven is very opinionated... the result is that maven builds will be more
> «standard» than ant builds (which are all unique)... some people, myself
and
> most of the maven community included, believe standardized builds are
better
> when jumping from project to project even if that might result in a
> fractionally slower build that downloads the internet.
>
> read a maven book and follow along before you try to hack an
> understanding... you will thank me later
>
> * ok so it is not a «building complete» lifecycle, but it is close-ish
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 10 Jul 2011 12:17, "Natsu" <[email protected]> wrote:
>> I disabled my PeerGuardian program on my computer and all the
> aforementioned
>> problems are gone. Seems like PeerGuardian is interfering with downloads
>> when doing mvn install. However, I encounter another new problem now with
>> NoClassDefFoundError. I tried adding C:\junit4.1\junit-4.1.jar to my
>> Classpath but to no avail.
>>
>> [DEBUG] Adding to surefire booter test classpath: C:\Documents and
>>
>
Settings\User\.m2\repository\org\apache\maven\surefire\surefire-api\2.7.2\surefire-api-2.7.2.jar
>> Scope: compile
>> Forking command line: cmd.exe /X /C "C:\Java\jdk1.6.0_26\jre\bin\java
-jar
>> C:\resteasy-jaxrs-2.2.1.GA
>
\examples\oreilly-workbook\ex03_1\target\surefire\surefirebooter436897204776495759.jar
>> C:\resteasy-jaxrs-2.2.1.GA
>
\examples\oreilly-workbook\ex03_1\target\surefire\surefire8819505597522285218tmp
>> C:\resteasy-jaxrs-2.2.1.GA
>
\examples\oreilly-workbook\ex03_1\target\surefire\surefire2197105008165144533tmp"
>> java.lang.NoClassDefFoundError: org/junit/runner/notification/RunListener
>> at java.lang.Class.getDeclaredConstructors0(Native Method)
>> at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>> at java.lang.Class.getConstructor0(Class.java:2699)
>> at java.lang.Class.getConstructor(Class.java:1657)
>> at
>>
>
org.apache.maven.surefire.util.ReflectionUtils.getConstructor(ReflectionUtils.java:76)
>> at
>>
>
org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:129)
>> at
>>
>
org.apache.maven.surefire.booter.SurefireReflector.instantiateProvider(SurefireReflector.java:198)
>> at
>>
>
org.apache.maven.surefire.booter.ProviderFactory.createProvider(ProviderFactory.java:72)
>> at
>>
>
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:146)
>> at
>>
>
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>> at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>> Caused by: java.lang.ClassNotFoundException:
>> org.junit.runner.notification.RunListener
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>> at
>>
>
org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:93)
>> ... 11 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 4:05.781s
>> [INFO] Finished at: Sun Jul 10 18:11:38 GMT+08:00 2011
>> [INFO] Final Memory: 4M/11M
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (surefire-it)
on
>> project workbook-ex03_1: There are test failures.
>> [ERROR]
>> [ERROR] Please refer to
>> C:\resteasy-jaxrs-2.2.1.GA
> \examples\oreilly-workbook\ex03_1\target\surefire-reports
>> for the individual test results.
>> [ERROR] -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
>> goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test
> (surefire-it)
>> on project workbook-ex03_1: There are test failures.
>>
>> Please refer to
>> C:\resteasy-jaxrs-2.2.1.GA
> \examples\oreilly-workbook\ex03_1\target\surefire-reports
>> for the individual test results.
>> at
>>
>
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
>> at
>>
>
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>> at
>>
>
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>> at
>>
>
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>> at
>>
>
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>> at
>>
>
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>> at
>>
>
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>> 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:597)
>> at
>>
>
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>> at
>>
>
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>> at
>>
>
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: org.apache.maven.plugin.MojoFailureException: There are test
>> failures.
>>
>> Please refer to
>> C:\resteasy-jaxrs-2.2.1.GA
> \examples\oreilly-workbook\ex03_1\target\surefire-reports
>> for the individual test results.
>> at
>>
>
org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:74)
>> at
>>
>
org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:642)
>> at
>>
>
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>> at
>>
>
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>> ... 19 more
>> [ERROR]
>>
>> --
>> View this message in context:
>
http://maven.40175.n5.nabble.com/mvn-install-Failure-executing-javac-but-could-not-parse-error-tp4568321p4570218.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>

Reply via email to