raby / play2-maven-plugin

Automatically exported from code.google.com/p/play2-maven-plugin
0 stars 0 forks source link

unmanaged dependencies in lib directory not included in classpath during compilation #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure play project to use unmanaged jar like sqljbdc4.jar to connect to 
a sql server database.
2. execute mvn clean install

What is the expected output? What do you see instead?
expected compilation to succeed. Instead, compilation fails because the classes 
from the jar file are not found.

What version of the product are you using? On what operating system?
1.0.0-alpha1 on Windows Server 2008 SP2 with Maven 3.0.5

Please provide any additional information below.
This is an excellent solution to using maven to build play.  I am really 
hopeful that you will be able to continue development of it.

Original issue reported on code.google.com by emla...@gmail.com on 26 Jun 2013 at 3:13

GoogleCodeExporter commented 9 years ago
All dependencies have to be managed. In Maven this is not a problem because of 
"system" dependency scope.
More info 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism
.html#System_Dependencies

Add:

<dependency>
    <groupId>com.microsoft.sqlserver</groupId>
    <artifactId>sqljdbc4</artifactId>
    <version>your_version</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/sqljdbc4.jar</systemPath>
 </dependency>

to your dependencies.

Alternatively you can install this dependency locally (like advised here 
http://stackoverflow.com/questions/6942407/setting-up-maven-dependency-for-sql-s
erver) or deploy to your company repository if you have one to share it with 
all users in your company.

Sorry for late response. For some reason I didn't get mail notification about 
this issue.

Original comment by gslowiko...@gmail.com on 12 Jul 2013 at 7:33

GoogleCodeExporter commented 9 years ago

Original comment by gslowiko...@gmail.com on 2 Jun 2014 at 7:46