Closed GoogleCodeExporter closed 8 years ago
SBT (actually Ivy used by SBT) does not know about "play2" packaging producing
"jar" file.
The workaround is changing packaging from "play2" to "jar".
change:
...
<packaging>play2</packaging>
...
<plugin>
<groupId>com.google.code.play2-maven-plugin</groupId>
<artifactId>play2-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
...
to
...
<packaging>jar</packaging>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<skipMain>true</skipMain> <!-- skip compile -->
<skip>true</skip> <!-- skip testCompile -->
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.sbt-compiler-maven-plugin</groupId>
<artifactId>sbt-compiler-maven-plugin</artifactId>
<version>${sbt-compiler.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.play2-maven-plugin</groupId>
<artifactId>play2-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>routes-compile</goal>
<goal>template-compile</goal>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
...
It's verbose, but it works for me.
I've asked about this problem on SBT dev list. Here it is:
https://groups.google.com/forum/#!msg/sbt-dev/UZ2SB3SdnxA/PEijUw8VALkJ
Original comment by gslowiko...@gmail.com
on 14 May 2014 at 12:19
I found much better solution on SBT side.
Return to "play2" packaging in Maven and add this to your "build.sbt" file:
// If your Maven artifact is not deployed, only installed in local Maven
repository
resolvers += "Local Maven Repository" at Path.userHome.asFile.toURI.toURL +
".m2/repository"
classpathTypes += "play2"
libraryDependencies +=
"lt.spectrofinance.core" % "core-frontend-application" % "0.0.3-SNAPSHOT" artifacts( Artifact("core-frontend-application", "jar", "jar") )
Original comment by gslowiko...@gmail.com
on 15 May 2014 at 9:16
Tell me if it works for you.
Original comment by gslowiko...@gmail.com
on 15 May 2014 at 9:19
Original comment by gslowiko...@gmail.com
on 19 May 2014 at 12:32
this does not work in sbt 0.13.5: classpathTypes += "play2"
Original comment by Andrei.Pozolotin
on 17 Sep 2014 at 8:45
It works for me, I've just tested it. Can you attach sample not working project?
Original comment by gslowiko...@gmail.com
on 18 Sep 2014 at 7:09
Here are my test projects.
Original comment by gslowiko...@gmail.com
on 18 Sep 2014 at 9:41
Attachments:
Original issue reported on code.google.com by
unique.y...@gmail.com
on 14 May 2014 at 11:01Attachments: