Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3459560
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:07:15+00:00 2026-05-18T10:07:15+00:00

I have a Scala project based on the a simple scala project (1.2) archetype

  • 0

I have a Scala project based on the “a simple scala project (1.2)” archetype that I’ve imported into Netbeans 6.9.1 as a maven project wtih existing pom. I can successfully run this project from inside Netbeans, but can’t figure out how to run it from the command line. I saw a couple similar questions, but wasn’t able to apply them to my situation successfully.

When it runs in the IDE, the command that executes is:

mvn -Dexec.classpathScope=runtime -Dexec.args=-classpath %classpath com.sentientswarm.trade_grouper.TradeParseMain /Users/jstanford/Development/test_data/trades/100410.csv -Dexec.executable=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Dnetbeans.execution=true process-classes org.codehaus.mojo:exec-maven-plugin:1.1.1:exec

The closest I’ve come to a realistic command line version is:

mvn -Dexec.classpathScope=runtime -Dexec.args=-classpath /Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper:/Users/jstanford/Development/scala/lib/scala-library.jar com.sentientswarm.trade_grouper.TradeParseMain /Users/jstanford/Development/test_data/trades/100410.csv -Dexec.executable=java  process-classes org.codehaus.mojo:exec-maven-plugin:1.1.1:exec

The classpath above includes the folder where the built classes for the project are as well as the scala library. Not sure if I’m missing something else there. The result is:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: '/Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper'.
[WARNING] POM for 'org.apache.maven.plugins:maven-/Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper-plugin:pom:LATEST' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-/Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper-plugin

Reason: POM 'org.apache.maven.plugins:maven-/Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper-plugin' not found in repository: Unable to determine the latest version

  org.apache.maven.plugins:maven-/Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper-plugin:pom:LATEST


 for project org.apache.maven.plugins:maven-/Users/stanford/Development/NetBeansProjects/target/classes/com/sentientswarm/trade_grouper-plugin


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Nov 25 23:15:14 PST 2010
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------

Here is the pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sentientswarm</groupId>
    <artifactId>trade_grouper</artifactId>
    <version>1.0-SNAPSHOT</version>
    <inceptionYear>2008</inceptionYear>
    <properties>
        <scala.version>2.8.0</scala.version>
    </properties>

    <repositories>
        <repository>
            <id>scala-tools.org</id>
            <name>Scala-Tools Maven2 Repository</name>
            <url>http://scala-tools.org/repo-releases</url>
        </repository>
        <repository>
            <id>BumNetworksReleaseRepository</id>
            <name>Bum Networks Release Repository</name>
            <url>http://repo.bumnetworks.com/releases/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>scala-tools.org</id>
            <name>Scala-Tools Maven2 Repository</name>
            <url>http://scala-tools.org/repo-releases</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.specs</groupId>
            <artifactId>specs</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.novus</groupId>
            <artifactId>casbah_2.8.0</artifactId>
            <version>1.0.8.5</version>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <testSourceDirectory>src/test/scala</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <args>
                        <arg>-target:jvm-1.5</arg>
                    </args>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <buildcommands>
                        <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
                    </buildcommands>
                    <additionalProjectnatures>
                        <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
                    </additionalProjectnatures>
                    <classpathContainers>
                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
                        <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer>
                    </classpathContainers>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <name>TradeGrouper</name>
</project>

I’m finding it pretty hard to believe that running a simple app from the command line can be so complicated, so hopefully someone can show me the path…

Thanks,
John

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:07:16+00:00Added an answer on May 18, 2026 at 10:07 am

    There are two possible ways to run your Maven project. First you can simply use the excec:java-task like this:

    mvn exec:java -Dexec.mainClass=com.acme.Main
    

    This works fine if you do not need any specific arguments passed to the java command.

    You also can use the exec:exec task but then you must not expand the %classpath as it is evaluated by Maven:

    mvn exec:exec -Dexec.args="-classpath %classpath com.acme.Main" \
      -Dexec.executable="java"
    

    If you run your project like this java must be in your $PATH of course or you have to supply the full path via exec.executable.

    You can also configure the exec-maven-plugin in your pom.xml so that you could leave out the property definitions in your command line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Scala project in Eclipse that I need to package up so
I have a project that is actor-based and for one part of it I
I have a small text file that I'd like to read into a scalar
I have an application where I would like to have mixed Java and Scala
I have to develop software for a USB scale that, when you press a
I have an application (an IP conferencing service) that I need to scale. It
I have a standard 800x600 window in my XNA project. My goal is to
I'm working on a JVM project which uses ESRI components (COM based, wrapped with
I am currently working in a .Net project but from university I have also
I have Scala 2.8.0 installed and don't wish to use Scala 2.7. Whenever I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.