Monday, September 14, 2009

Release s2dm Maven Plugin 0.0.3

Open Toast Project Maven Plugin for Spring Source dm Server Development 0.0.3 was released.

After Spring Bundlor released 1.0M5, I tried and got it working with my project.

Still have trouble with M2Eclipse, the Maven Dependencies classpath of web project doesn't include depending projects in workspace (domain and service projects). So I have to manually add those two projects to web project Java Build Path.

The 0.0.3 release can be used to set up Eclipse workspace, and build par.

To use that plugin, in parent pom.xml, setup plugin repository to

 <pluginRepositories>
  <!-- Maven 2 Plugin for S2DM -->
  <pluginRepository>
   <id>opentoast.maven.s2dm.plugin</id>
   <url>http://opentoastproject.googlecode.com/svn/mavenrepo</url>
  </pluginRepository>
 
  <!-- SpringSource milestone -->
  <pluginRepository>
   <id>com.springsource.repository.bundles.milestone</id>
   <name>SpringSource Enterprise Bundle Repository</name>
   <url>http://repository.springsource.com/maven/bundles/milestone</url>
  </pluginRepository>

 </pluginRepositories>

So go to project root directory /opentoast, and type

mvn org.opentoast:maven-s2dm-plugin:0.0.3:eclipse

It will generate all eclipse setting files, such as /project, .classpath, .settings/org.eclipse.wst.common.project.facet.core.xml, etc. It also generates a dummy MANIFEST.MF file at generated/META-INF/MANIFEST.MF under each bundle project folder. The trick is the .classpath will include the generated folder as classpathentry, so STS bundlor will automatically update it with template.mf settings.

To build the whole application into a par, just type mvn package under opentoast, it will use dm-par goal to package par artifact.

So far STS does not work with dm Server 2.0.0.M4, so I just use STS to edit code, and use command line to build par, then deploy to local running dm Server pickup folder. I will try to get the application running inside STS later. Hope dm Server and Spring 3 can be released before Christmas, so I can play with them during winter break.

No comments: