Author: veithen
Date: Sun Jul 18 18:05:10 2010
New Revision: 965268
URL: http://svn.apache.org/viewvc?rev=965268&view=rev
Log:
Simplify the build process of the Eclipse codegen plugin by using
maven-bundle-plugin. This has multiple advantages:
* The bundle plugin automatically generates a manifest for the plugin and
embeds the necessary dependencies into the plugin. -> no need anymore to play
around with ant and maven-assembly-plugin
* Since the plugin now has a manifest, the dependencies no longer need to be
specified in plugin.xml. -> plugin.xml no longer needs to be generated and is a
static file; no need anymore to keep the plugin dependencies in sync with the
Maven dependencies
* maven-bundle-plugin takes care to generate an appropriate bundle version
number from the Maven version number. -> no need anymore to manually change the
plugin version number before or after a release
The only remaining scripting part in the build is a small Groovy snippet that
determines the bundle symbolic name and version.
Added:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/build.properties
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/help_toc.xml
- copied unchanged from r965030,
axis/axis2/java/core/trunk/modules/tool/conf/codegen/help_toc.xml
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/icons/
- copied from r965030,
axis/axis2/java/core/trunk/modules/tool/conf/codegen/icons/
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/plugin.xml
- copied, changed from r965030,
axis/axis2/java/core/trunk/modules/tool/conf/codegen/plugin.xml
Removed:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/build.xml
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/src/test/
Modified:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/
(props changed)
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/pom.xml
Propchange:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Jul 18 18:05:10 2010
@@ -1,3 +1,7 @@
axis2.eclipse.codegen.plugin.iml
target
-
+META-INF
+lib
+.settings
+.classpath
+.project
Added:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/build.properties
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/build.properties?rev=965268&view=auto
==============================================================================
---
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/build.properties
(added)
+++
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/build.properties
Sun Jul 18 18:05:10 2010
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+source.. = src/main/java/,\
+ target/maven-shared-archive-resources/
+output.. = target/classes/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ lib/,\
+ help_toc.xml
Modified:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml?rev=965268&r1=965267&r2=965268&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml
(original)
+++
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml
Sun Jul 18 18:05:10 2010
@@ -23,113 +23,18 @@
<formats>
<format>zip</format>
</formats>
- <fileSets>
- <fileSet>
- <directory>./target/classes</directory>
- <outputDirectory>classes</outputDirectory>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${geronimo.spec.activation.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
-
<include>org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${axiom.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
-
<include>org.apache.ws.commons.axiom:axiom-api:jar</include>
-
<include>org.apache.ws.commons.axiom:axiom-dom:jar</include>
-
<include>org.apache.ws.commons.axiom:axiom-impl:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${commons.logging.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>commons-logging:commons-logging:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${axis2.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.apache.axis2:axis2:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${neethi.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.apache.neethi:neethi:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${geronimo.spec.stax.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
-
<include>org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${wsdl4j.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>wsdl4j:wsdl4j:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${xmlbeans.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.apache.xmlbeans:xmlbeans:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${xmlschema.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
-
<include>org.apache.ws.commons.schema:XmlSchema:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${log4j.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>log4j:log4j:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${woden.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.apache.woden:woden:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${commons.httpclient.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
-
<include>commons-httpclient:commons-httpclient:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${commons.codec.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>commons-codec:commons-codec:jar</include>
- </includes>
- </dependencySet>
- <dependencySet>
-
<outputFileNameMapping>${artifactId}-${jibx.version}.${extension}</outputFileNameMapping>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>jibx:jibx-bind:jar</include>
- <include>jibx:jibx-run:jar</include>
- </includes>
- </dependencySet>
- </dependencySets>
+ <dependencySets>
+ <dependencySet>
+ <!-- We only want to include the main artifact of the project -->
+ <useProjectArtifact>true</useProjectArtifact>
+ <includes>
+ <include>${project.groupId}:${project.artifactId}</include>
+ </includes>
+ <outputDirectory>plugins</outputDirectory>
+ <!-- Make sure that the name of the JAR in the distribution
respects the naming
+ convention expected by Eclipse. The bundle-symbolic-name and
+ bundle-version variables are calculated by a Groovy script
executed from the POM. -->
+
<outputFileNameMapping>${bundle-symbolic-name}_${bundle-version}.jar</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
</assembly>
Copied:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/plugin.xml
(from r965030, axis/axis2/java/core/trunk/modules/tool/conf/codegen/plugin.xml)
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/plugin.xml?p2=axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/plugin.xml&p1=axis/axis2/java/core/trunk/modules/tool/conf/codegen/plugin.xml&r1=965030&r2=965268&rev=965268&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/tool/conf/codegen/plugin.xml (original)
+++
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/plugin.xml
Sun Jul 18 18:05:10 2010
@@ -20,84 +20,7 @@
~ under the License.
-->
-<plugin
- id="Axis2_Codegen_Wizard"
- name="Axis2 Codegen Wizard Plug-in"
- version="@eclipse.plugins.version@"
- provider-name="Apache Software Foundation"
- class="org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin">
-
- <runtime>
- <library name="Axis2CodegenWizard.jar">
- <export name="*"/>
- </library>
- <library
name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library
name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="./lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="./lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="./lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/axi...@[email protected]">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- <library
name="lib/[email protected]@.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.apache.ant"/>
- </requires>
-
+<plugin>
<extension
point="org.eclipse.ui.newWizards">
<category
Modified:
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/pom.xml?rev=965268&r1=965267&r2=965268&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/pom.xml
(original)
+++
axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/pom.xml
Sun Jul 18 18:05:10 2010
@@ -30,6 +30,7 @@
</parent>
<artifactId>axis2.eclipse.codegen.plugin</artifactId>
<name>Apache Axis2 - tool - Eclipse Codegen Plugin</name>
+ <packaging>bundle</packaging>
<description>The Axis 2 Eclipse Codegen Plugin for wsdl2java and
java2wsdl</description>
<dependencies>
<dependency>
@@ -141,126 +142,24 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
- <version>${geronimo.spec.javamail.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>${commons.logging.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-codegen</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-kernel</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-adb</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-java2wsdl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.axis2</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>axis2-adb-codegen</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-java2wsdl</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-xmlbeans</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.0_spec</artifactId>
- <version>${geronimo.spec.stax.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.neethi</groupId>
- <artifactId>neethi</artifactId>
- <version>${neethi.version}</version>
- </dependency>
-
- <dependency>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
- <version>${wsdl4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.xmlbeans</groupId>
- <artifactId>xmlbeans</artifactId>
- <version>${xmlbeans.version}</version>
- <exclusions>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.schema</groupId>
- <artifactId>XmlSchema</artifactId>
- <version>${xmlschema.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>${ant.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.woden</groupId>
- <artifactId>woden-api</artifactId>
- <version>${woden.version}</version>
- </dependency>
-
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>${commons.httpclient.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>${commons.codec.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-bind</artifactId>
- <version>${jibx.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-run</artifactId>
- <version>${jibx.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.woden</groupId>
- <artifactId>woden-impl-dom</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- <version>${javax.mail.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-jibx</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
<build>
@@ -271,6 +170,14 @@
<exclude>**/*.java</exclude>
</excludes>
</resource>
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>plugin.xml</include>
+ <include>icons/**</include>
+ <include>help_toc.xml</include>
+ </includes>
+ </resource>
</resources>
<plugins>
<plugin>
@@ -289,198 +196,116 @@
</executions>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <!-- We don't use the PDE mode here because we don't want
maven-eclipse-plugin to tamper with
+ the manifest generated by maven-bundle-plugin -->
+ <additionalBuildcommands>
+
<buildcommand>org.eclipse.pde.ManifestBuilder</buildcommand>
+
<buildcommand>org.eclipse.pde.SchemaBuilder</buildcommand>
+ </additionalBuildcommands>
+ <additionalProjectnatures>
+
<projectnature>org.eclipse.pde.PluginNature</projectnature>
+ </additionalProjectnatures>
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
<executions>
<execution>
- <id>distribution-package</id>
- <phase>package</phase>
+ <!-- This copies the dependencies so that they can be
located by Eclipse -->
+ <id>copy-dependencies</id>
+ <phase>process-sources</phase>
<goals>
- <goal>attached</goal>
+ <goal>copy-dependencies</goal>
</goals>
<configuration>
- <descriptors>
-
<descriptor>${pom.basedir}/eclipse-codegen-plugin-assembly.xml</descriptor>
- </descriptors>
- <finalName>dist</finalName>
+ <outputDirectory>lib</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>lib</directory>
+ </fileset>
+ <fileset>
+ <directory>META-INF</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- Produce the manifest in the location expected by
Eclipse -->
+ <manifestLocation>META-INF</manifestLocation>
+ <instructions>
+ <!-- Embed all dependencies, except those which are
provided by the Eclipse runtime -->
+
<Embed-Dependency>*;scope=compile|runtime;artifactId=!org.eclipse.*|commons-logging|wstx-asl|geronimo-activation_1.1_spec|geronimo-javamail_1.4_spec|geronimo-stax-api_1.0_spec|ant*</Embed-Dependency>
+ <Embed-Directory>lib</Embed-Directory>
+ <Embed-Transitive>true</Embed-Transitive>
+ <!-- Exclude imports that are actually not used -->
+
<Import-Package>!org.dom4j*,!nu.xom,!org.jdom*,!javax.portlet,!com.sun.*,!org.apache.xmlbeans.*,!org.xmlpull.*,!org.apache.commons.io*,*</Import-Package>
+ <Export-Package></Export-Package>
+ <Bundle-Name>Axis2 Codegen Wizard Plug-in</Bundle-Name>
+
<Bundle-Activator>org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin</Bundle-Activator>
+
<Bundle-SymbolicName>org.apache.axis2.eclipse.codegen.plugin;singleton:=true</Bundle-SymbolicName>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
+
<Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
- <id>package</id>
+ <id>extract-bundle-symbolicname-and-version</id>
<phase>package</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
<configuration>
- <tasks>
+ <source>
+ import java.util.jar.Manifest
- <property name="codegen.plugin.version"
-
value="Axis2_Codegen_Wizard_${eclipse.plugins.version}"/>
- <property name="codegen.plugin.zip.name"
value="axis2-eclipse-codegen-wizard.zip"/>
- <property name="codegen.plugin.jar.name"
value="Axis2CodegenWizard.jar"/>
- <property name="src" value="./src"/>
- <property name="codegen.src.dir"
value="../axis2-eclipse-codegen-plugin/src/main/java"/>
- <property name="output"
value="../target/eclipse_plugins"/>
- <property name="output.target"
value="${output}/release"/>
- <property name="plugin.output.dir"
value="${output}/plugin"/>
- <property name="codegen.output.dir"
value="${output}/code-gen"/>
- <property name="codegen.plugin.output.dir"
-
value="${plugin.output.dir}/${codegen.plugin.version}"/>
- <property name="source.dir.name" value="src"/>
- <property name="lib.dir.name" value="lib"/>
- <property name="bin.dir.name" value="bin"/>
- <property name="help.dir.name" value="help"/>
- <property name="icons.dir.name" value="icons"/>
- <property name="plugin.project.file.name"
value=".project"/>
- <property name="plugin.classpath.file.name"
value=".classpath"/>
- <property name="plugin.help.file.name"
value="help_toc.xml"/>
- <property name="codegen.resource.dir"
value="../conf/codegen"/>
- <property name="codegen.help.resource.file"
-
value="../../../modules/documentation/xdocs/tools/1_4/eclipse/wsdl2java-plugin.html"/>
- <property name="codegen.help.images.dir"
-
value="../../../modules/documentation/xdocs/tools/1_4/eclipse/images"/>
- <property name="axis2.lib.dir"
value="../../../target/lib"/>
- <property name="codegen.resource.dir"
value="../conf/codegen"/>
- <delete
dir="./target/plugin/${codegen.plugin.version}"/>
- <mkdir
dir="./target/plugin/${codegen.plugin.version}"/>
- <delete dir="./target/dist"/>
- <mkdir dir="./target/dist"/>
- <!--Filter tokens for the copy command to
filter the versions of external dependencies -->
- <filter token="eclipse.plugins.version"
value="${eclipse.plugins.version}"/>
- <filter token="version"
value="${project.version}"/>
- <filter
token="geronimo.spec.activation.version"
-
value="${geronimo.spec.activation.version}"/>
- <filter token="geronimo.spec.stax.version"
- value="${geronimo.spec.stax.version}"/>
- <filter token="ant.version"
value="${ant.version}"/>
- <filter token="axiom.version"
value="${axiom.version}"/>
- <filter token="commons.logging.version"
value="${commons.logging.version}"/>
- <filter token="neethi.version"
value="${neethi.version}"/>
- <filter token="xmlbeans.version"
value="${xmlbeans.version}"/>
- <filter token="xmlschema.version"
value="${xmlschema.version}"/>
- <filter token="log4j.version"
value="${log4j.version}"/>
- <filter token="wsdl4j.version"
value="${wsdl4j.version}"/>
- <filter token="woden.version"
value="${woden.version}"/>
- <filter token="commons.httpclient.version"
value="${commons.httpclient.version}"/>
- <filter token="commons.codec.version"
value="${commons.codec.version}"/>
- <filter token="jibx.version"
value="${jibx.version}"/>
- <filter token="javax.mail.version"
value="${javax.mail.version}"/>
- <filter token="geronimo.spec.metadata.version"
value="${geronimo.spec.metadata.version}"/>
- <filter token="geronimo.spec.javamail.version"
value="${geronimo.spec.javamail.version}"/>
- <filter token="stax.impl.version"
value="${stax.impl.version}"/>
-
- <!--
- If it is
neccessary to create the eclipse project manually without using "mvn
eclipse:eclipse" command uncomment the following section which copies
- the required
jars to the the project lib folder
- -->
-
-
- <!--
- <property name="m2.local.repo"
value="${settings.localRepository}"/>
- <mkdir dir="./lib"/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/geronimo/specs/geronimo-activation_1.1_spec/${geronimo.spec.activation.version}/geronimo-activation_1.1_spec-${geronimo.spec.activation.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/ant/ant/${ant.version}/ant-${ant.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/ws/commons/axiom/axiom-api/${axiom.version}/axiom-api-${axiom.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/ws/commons/axiom/axiom-dom/${axiom.version}/axiom-dom-${axiom.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/ws/commons/axiom/axiom-impl/${axiom.version}/axiom-impl-${axiom.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/commons-logging/commons-logging/${commons.logging.version}/commons-logging-${commons.logging.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/neethi/neethi/${neethi.version}/neethi-${neethi.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/${geronimo.spec.stax.version}/geronimo-stax-api_1.0_spec-${geronimo.spec.stax.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/codehaus/woodstox/wstx-asl/${stax.impl.version}/wstx-asl-${stax.impl.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/xmlbeans/xmlbeans/${xmlbeans.version}/xmlbeans-${xmlbeans.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/ws/commons/schema/XmlSchema/${xmlschema.version}/XmlSchema-${xmlschema.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/wsdl4j/wsdl4j/${wsdl4j.version}/wsdl4j-${wsdl4j.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/woden/woden-api/${woden.version}/woden-api-${woden.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/commons-codec/commons-codec/${commons.codec.version}/commons-codec-${commons.codec.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/commons-httpclient/commons-httpclient/${commons.httpclient.version}/commons-httpclient-${commons.httpclient.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/axis2/axis2/${version}/axis2-${version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/${geronimo.spec.javamail.version}/geronimo-javamail_1.4_spec-${geronimo.spec.javamail.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/javax/mail/mail/${javax.mail.version}/mail-${javax.mail.version}.jar"
/>
- <copy todir="./lib"
file="${m2.local.repo}/org/apache/geronimo/specs/geronimo-ws-metadata_2.0_spec/${geronimo.spec.metadata.version}/geronimo-ws-metadata_2.0_spec-${geronimo.spec.metadata.version}.jar"
/>
- -->
-
- <mkdir dir="./icons"/>
- <copy todir="./icons" overwrite="true">
- <fileset dir="../conf/codegen/icons" />
- </copy>
- <copy todir="."
file="../conf/codegen/build.properties" overwrite="true" filtering="on"/>
- <copy todir="."
file="../conf/codegen/help_toc.xml" overwrite="true"/>
- <copy todir="."
file="../conf/codegen/plugin.xml" overwrite="true" filtering="on"/>
- <copy todir="."
file="../conf/codegen/.classpath" overwrite="true" filtering="on"/>
- <copy todir="."
file="../conf/codegen/.project" overwrite="true" filtering="on"/>
- <copy todir="."
file="../conf/codegen/readme.txt" overwrite="true"/>
-
- <unzip
src="./target/axis2.eclipse.codegen.plugin-${pom.version}.jar"
-
dest="./target/plugin/${codegen.plugin.version}"/>
- <!-- Copy to the same position with the
filtering on-->
- <copy
todir="./target/plugin/${codegen.plugin.version}" filtering="on">
- <fileset dir="${codegen.resource.dir}">
- <include name="plugin.xml"/>
- <include name="build.properties"/>
- <include
name="${plugin.classpath.file.name}"/>
- </fileset>
- </copy>
- <!-- copy the help directory -->
- <mkdir
dir="./target/plugin/${codegen.plugin.version}/${help.dir.name}"/>
- <mkdir
dir="./target/plugin/${codegen.plugin.version}/${help.dir.name}/${icons.dir.name}"/>
- <copy
todir="./target/plugin/${codegen.plugin.version}/${help.dir.name}">
- <fileset
file="${codegen.help.resource.file}"/>
- </copy>
- <copy
todir="./target/plugin/${codegen.plugin.version}/${help.dir.name}/${icons.dir.name}">
- <fileset dir="${codegen.help.images.dir}"/>
- </copy>
- <!-- copy the icons-->
- <mkdir
dir="./target/plugin/${codegen.plugin.version}/${icons.dir.name}"/>
- <copy
todir="./target/plugin/${codegen.plugin.version}/${icons.dir.name}">
- <fileset
dir="${codegen.resource.dir}/${icons.dir.name}"/>
- </copy>
- <!-- copy the lib files -->
- <mkdir dir="./target/plugin/temp"/>
- <unzip
src="./target/dist-axis2-eclipse-codege-plugin.zip"
dest="./target/plugin/temp"/>
- <mkdir
dir="./target/plugin/${codegen.plugin.version}/lib"/>
- <copy
todir="./target/plugin/${codegen.plugin.version}/lib">
- <fileset dir="./target/plugin/temp/lib"/>
- </copy>
- <delete dir="./target/plugin/temp"/>
- <!-- copy the other project files-->
- <copy
todir="./target/plugin/${codegen.plugin.version}">
- <fileset
file="${codegen.resource.dir}/${plugin.project.file.name}"/>
- <fileset
file="${codegen.resource.dir}/${plugin.help.file.name}"/>
- </copy>
- <!-- copy the classes to classes directory-->
- <mkdir
dir="./target/plugin/${codegen.plugin.version}/classes"/>
- <copy
todir="./target/plugin/${codegen.plugin.version}/classes">
- <fileset
dir="./target/plugin/${codegen.plugin.version}">
- <include name="**/org/**"/>
- </fileset>
- </copy>
- <!--Zip the classes to a jar file-->
- <zip
destfile="./target/plugin/${codegen.plugin.version}/${codegen.plugin.jar.name}"
-
basedir="./target/plugin/${codegen.plugin.version}/classes" update="true"/>
- <delete
dir="./target/plugin/${codegen.plugin.version}/classes"/>
- <!--Zip the eclipse plugin to the target/dist
directory -->
- <zip
destfile="./target/dist/${codegen.plugin.zip.name}" basedir="./target/plugin"
- update="true"/>
- <delete dir="./target/temp"/>
- <delete dir="./target/classes"/>
- <delete dir="./target/test-classes"/>
- </tasks>
+ Manifest manifest = new Manifest(new
FileInputStream("META-INF/MANIFEST.MF"))
+ project.properties["bundle-symbolic-name"] =
manifest.mainAttributes.getValue("Bundle-SymbolicName").find("^[^;]*")
+ project.properties["bundle-version"] =
manifest.mainAttributes.getValue("Bundle-Version")
+ </source>
</configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distribution-package</id>
+ <phase>package</phase>
<goals>
- <goal>run</goal>
+ <goal>single</goal>
</goals>
+ <configuration>
+ <descriptors>
+
<descriptor>${pom.basedir}/eclipse-codegen-plugin-assembly.xml</descriptor>
+ </descriptors>
+ <finalName>dist</finalName>
+ </configuration>
</execution>
</executions>
</plugin>