Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The way I do this is like this:</p> <ul> <li>Separate Maven project with the model. In my case that's a bunch of simple POJOs with JPA and JAX-B annotations, some constants, etc. In Maven, I define this as an <strong>OSGi bundle</strong>, by specifying <code>&lt;packaging&gt;bundle&lt;/packaging&gt;</code>. I call this project <code>MyAppInterface</code>.</li> <li><p>Separate Maven projects for other elements that need to deal with the model. In my case, I have one Java EE application with EJBs, Database facade, REST servlet; I have an Integration-Test project which only does tests; a GWT application; etc... In those projects I specify the dependency to the model: </p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;com.skalio&lt;/groupId&gt; &lt;artifactId&gt;MyAppInterface&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;/dependency&gt; </code></pre></li> <li><p>When deploying <code>MyAppInterface</code> to Glassfish, I use the following syntax:</p></li> </ul> <p><code>asadmin deploy --type osgi --name MyAppInterface /path/to/MyAppInterface-1.0-SNAPSHOT.jar</code></p> <ul> <li>I understand it that this is placing the model on the classpath of Glassfish, similar to a mysql-connector, only OSGi-style.</li> </ul> <p>I let all these projects be built by a central jenkins CI server, which deploys the artifacts to our internal maven repository. We then add the internal repository in <code>pom.xml</code> of each project. As a result, everyone automatically works with the latest stable <code>MyAppInterface</code>, even if they don't have the code checked out in NetBeans / Eclipse.</p> <p>Let me know if you need more examples.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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