maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arungupta <arun.gu...@gmail.com>
Subject Running Scala script in Maven gives "A required class was missing"
Date Mon, 05 Sep 2011 23:37:38 GMT
I'm following the instructions at:

http://www.sonatype.com/books/mcookbook/reference/ch03s03.html

to have a Scala script running with Maven (tried 3.0.3 and 2.2.1 on Win7)
The script only has

println("Hello, world!")

with some other commented code. Invoking "mvn package" gives:

------------------------------------------------------------------------
Failed to execute goal org.scala-tools:maven-scala-plugin:2.10.1:script
(scala-magic) on project ScalaMavenProject1: Execution scala-magic of goal
org.scala-tools:maven-scala-plugin:2.10.1:script failed: A required class
was missing while executing
org.scala-tools:maven-scala-plugin:2.10.1:script: scala/ScalaObject
-----------------------------------------------------
realm =    plugin>org.scala-tools:maven-scala-plugin:2.10.1
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/scala-tools/maven-scala-plugin/2.10.1/maven-scala-plugin-2.10.1.jar
urls[1] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
urls[2] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.0.4/maven-reporting-impl-2.0.4.jar
urls[3] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar
urls[4] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
urls[5] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/commons-digester/commons-digester/1.6/commons-digester-1.6.jar
urls[6] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
urls[7] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
urls[8] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/doxia/doxia-core/1.0-alpha-7/doxia-core-1.0-alpha-7.jar
urls[9] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/oro/oro/2.0.7/oro-2.0.7.jar
urls[10] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.4/maven-reporting-api-2.0.4.jar
urls[11] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
urls[12] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.jar
urls[13] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-6/plexus-i18n-1.0-beta-6.jar
urls[14] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.3/plexus-velocity-1.1.3.jar
urls[15] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
urls[16] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/velocity/velocity/1.4/velocity-1.4.jar
urls[17] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/velocity/velocity-dep/1.4/velocity-dep-1.4.jar
urls[18] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.jar
urls[19] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/jline/jline/0.9.93/jline-0.9.93.jar
urls[20] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
urls[21] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/shared/maven-dependency-analyzer/1.1/maven-dependency-analyzer-1.1.jar
urls[22] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/asm/asm/3.0/asm-3.0.jar
urls[23] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/shared/maven-dependency-tree/1.2/maven-dependency-tree-1.2.jar
urls[24] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.0/maven-common-artifact-filters-1.0.jar
urls[25] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
urls[26] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
urls[27] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
urls[28] =
file:/C:/Users/arungup.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------: scala.ScalaObject
-> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read
the following articles:
[Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

What am I missing ?

-Arun


--
View this message in context: http://maven.40175.n5.nabble.com/Running-Scala-script-in-Maven-gives-A-required-class-was-missing-tp4772461p4772461.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message