Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to add sqljdbc_auth.dll to my maven project
    text
    copied!<p>I am trying to establish connection to database. It's a simple project with using maven. I have problems with <code>sqljdbc_auth.dll</code></p> <p>I have added mssql jdbc driver and added a dependency in <code>pom.xml</code></p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;com.microsoft&lt;/groupId&gt; &lt;artifactId&gt;mssql-jdbc&lt;/artifactId&gt; &lt;version&gt;4.0.0&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>This is my try block</p> <pre><code> try { // Establish the connection. SQLServerDataSource ds = new SQLServerDataSource(); ds.setIntegratedSecurity(true); ds.setServerName("BUILDSRV"); ds.setDatabaseName("master"); ds.setIntegratedSecurity(true); con = ds.getConnection(); } </code></pre> <p>and I have an error</p> <pre><code> 21.11.2012 18:07:04 com.microsoft.sqlserver.jdbc.AuthenticationJNI &lt;clinit&gt; WARNING: Failed to load the sqljdbc_auth.dll cause :- no sqljdbc_auth in java.library.path com.microsoft.sqlserver.jdbc.SQLServerException: </code></pre> <p>I have my <code>sqljdbc_auth.dll</code> but I don't need to put it to my <code>C:\windows\...</code> I need to add it in my project from maven. How can I do this?</p> <p>I tried to add it to the <code>pom.xml</code> but it doesn't work</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.1&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;attach-artifacts&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;attach-artifact&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;artifacts&gt; &lt;file&gt;target&lt;/file&gt; &lt;type&gt;dll&lt;/type&gt; &lt;/artifacts&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; </code></pre> <p>I got another error while building</p> <pre><code>Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin:1.1:attach-artifact (attach-artifacts) on project mavenproject1dbconnect: Unable to parse configuration of mojo org.codehaus.mojo:build-helper-maven-plugin:1.1:attach-artifact for parameter file: Cannot configure instance of org.codehaus.mojo.buildhelper.Artifact from target -&gt; [Help 1] </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload