Comments (2)
Managed to get it working with the following setup:
<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.example</groupId>
<artifactId>maven-scala-seed3</artifactId>
<version>1.0-SNAPSHOT</version>
<name>maven-scala-seed3</name>
<description>A minimal Scala project using the Maven build tool.</description>
<licenses>
<license>
<name>My License</name>
<url>http://....</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>3.3.3</scala.version>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala3-library_3</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala3-compiler_3</artifactId>
<version>${scala.version}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.scalameta</groupId>
<artifactId>munit_3</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<!-- see http://davidb.github.com/scala-maven-plugin -->
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.9.2</version>
<configuration></configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args></args>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
// ./src/main/scala/Smth.scala
@main def main = println("Hello from Maven")
works fine with
mvn scala:run -DmainClass=main
from scala-maven-plugin.
Thanks @Gedochao It was my mistake. I was trying with -DmainClass=SampleMaven
instead of -DmainClass=main
It works now.
I will close this issue now.
from scala-maven-plugin.
Related Issues (20)
- Build error on `sun.*` APIs when `-release` Java version is lower than the execution Java version HOT 2
- Need to update to handle the movement of doxia to apache HOT 6
- Preview compiler features in a mixed Java/Scala Project HOT 12
- Unused 'scalaCompatVersion' flag ? HOT 10
- scala-maven-plugin version for scala-library 2.12.15? HOT 2
- Race condition in sbt-compiler-bridge jar when running multimodule project with -T HOT 3
- Maven 3.9.4 Validation Warnings HOT 2
- Getting object scala in compiler mirror not found issue while running the application using jar HOT 3
- Trouble with installing the Maven plugin in IntelliJ HOT 3
- Unable to download 4.9.1 through the Maven repository HOT 3
- Release a new version with new zinc? HOT 2
- Does this plugin support multi version of Scala? HOT 1
- Goals Page returns 404 HOT 5
- Error when compile with 3.4.2 HOT 27
- An API incompatibility was encountered while executing net.alchim31.maven:scala-maven-plugin:4.0.0
- Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.8.0 HOT 1
- Plugin is a Maven 2.x plugin and mixes multiple Maven versions HOT 1
- Warning "Plugin execution not covered by lifecycle configuration: ..." HOT 3
- Spark build getting failed [3.5.0, 3.5.1] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-maven-plugin.