Revision: 9392
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=9392&view=rev
Author:   dnaber
Date:     2013-02-16 17:19:40 +0000 (Sat, 16 Feb 2013)
Log Message:
-----------
build the wikipedia module similar to how the standalone module is built, so 
the users get an executable JAR

Modified Paths:
--------------
    trunk/languagetool/languagetool-wikipedia/pom.xml

Added Paths:
-----------
    trunk/languagetool/languagetool-wikipedia/src/main/assembly/
    trunk/languagetool/languagetool-wikipedia/src/main/assembly/zip.xml

Modified: trunk/languagetool/languagetool-wikipedia/pom.xml
===================================================================
--- trunk/languagetool/languagetool-wikipedia/pom.xml   2013-02-16 16:31:15 UTC 
(rev 9391)
+++ trunk/languagetool/languagetool-wikipedia/pom.xml   2013-02-16 17:19:40 UTC 
(rev 9392)
@@ -40,24 +40,48 @@
     <build>
         <plugins>
             <plugin>
-              <artifactId>maven-assembly-plugin</artifactId>
-              <configuration>
-                <archive>
-                  <manifest>
-                    <mainClass>org.languagetool.dev.wikipedia.Main</mainClass>
-                  </manifest>
-                </archive>
-                <descriptorRefs>
-                  <descriptorRef>jar-with-dependencies</descriptorRef>
-                </descriptorRefs>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathLayoutType>custom</classpathLayoutType>
+                            
<customClasspathLayout>libs/$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+                        </manifest>
+                        <manifestEntries>
+                            <!-- as we later unzip the language JARs (see 
zip.xml), we need to add the top directory to the classpath: -->
+                            <Class-Path>./</Class-Path>
+                            
<Main-Class>org.languagetool.dev.wikipedia.Main</Main-Class>
+                            
<ComponentVersion>${project.version}</ComponentVersion>
+                            
<Implementation-Date>${maven.build.timestamp}</Implementation-Date>
+                        </manifestEntries>
+                    </archive>
                 </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <descriptor>src/main/assembly/zip.xml</descriptor>
+                    
<finalName>LanguageTool-wikipedia-${project.version}</finalName>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <addExtensions>false</addExtensions>
+                        </manifest>
+                    </archive>
+                </configuration>
                 <executions>
-                  <execution>
-                    <phase>package</phase>
-                      <goals>
-                        <goal>single</goal>
-                      </goals>
-                  </execution>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>

Copied: trunk/languagetool/languagetool-wikipedia/src/main/assembly/zip.xml 
(from rev 9390, 
trunk/languagetool/languagetool-standalone/src/main/assembly/zip.xml)
===================================================================
--- trunk/languagetool/languagetool-wikipedia/src/main/assembly/zip.xml         
                (rev 0)
+++ trunk/languagetool/languagetool-wikipedia/src/main/assembly/zip.xml 
2013-02-16 17:19:40 UTC (rev 9392)
@@ -0,0 +1,50 @@
+<!-- documentation can be found at 
http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html -->
+<assembly>
+    <id>bin</id>
+    <formats>
+        <format>zip</format>
+        <format>dir</format>
+    </formats>
+    <containerDescriptorHandlers>
+        <!-- both of these handlers are needed so all 
language-module.properties get merged into one file: -->
+        <containerDescriptorHandler>
+            <handlerName>metaInf-services</handlerName>
+        </containerDescriptorHandler>
+        <containerDescriptorHandler>
+            <handlerName>file-aggregator</handlerName>
+            <configuration>
+                
<filePattern>META-INF/org/languagetool/language-module.properties</filePattern>
+                
<outputPath>LanguageTool-wikipedia-${project.version}/META-INF/org/languagetool/language-module.properties</outputPath>
+            </configuration>
+        </containerDescriptorHandler>
+    </containerDescriptorHandlers>
+    <dependencySets>
+        <dependencySet>
+            <unpack>false</unpack>
+            <outputDirectory>libs</outputDirectory>
+            
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <excludes>
+                <!-- gets unzipped below: -->
+                <exclude>org.languagetool:language-*</exclude>
+                <!-- this is what the user calls, so put it in the top 
directory: -->
+                <exclude>org.languagetool:languagetool-wikipedia</exclude>
+            </excludes>
+        </dependencySet>
+        <dependencySet>
+            <unpack>false</unpack>
+            <outputDirectory>/</outputDirectory>
+            
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.languagetool:languagetool-wikipedia</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <!-- unzip because it makes accessing the grammar.xml rules 
easier: -->
+            <unpack>true</unpack>
+            <scope>runtime</scope>
+            <includes>
+                <include>org.languagetool:language-*</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+</assembly>

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to