dev@glassfish.java.net

Re: ACTION: pom.xml / packager build.xml review

From: Snjezana Sevo-Zenzerovic <Snjezana.Sevo-Zenzerovic_at_Sun.COM>
Date: Wed, 19 Aug 2009 14:44:19 -0700

Hong,

packager change looks fine.

Thanks,

Snjezana

Hong Zhang wrote:

> Hi,
> This is to make sure the javax.annotation.Resource class loaded from
> Glassfish instead of JDK. A similar mechanism was used as JAX-WS. One
> pom.xml and one build.xml were changed.
> The change of pom.xml in deployment/dol is to satisfy build time
> dependency. And the build.xml in packager/glassfish-common to satisfy
> runtime dependency.
>
> Index: deployment/dol/pom.xml
> ===================================================================
> --- deployment/dol/pom.xml (revision 30586)
> +++ deployment/dol/pom.xml (working copy)
> @@ -49,6 +49,53 @@
> <packaging>hk2-jar</packaging>
> <name>Deployment Object Library</name>
>
> + <build>
> + <plugins>
> + <plugin>
> + <artifactId>maven-dependency-plugin</artifactId>
> + <executions>
> + <execution>
> + <phase>process-resources</phase>
> + <goals>
> + <goal>copy</goal>
> + </goals>
> + <configuration>
> + <artifactItems>
> + <artifactItem>
> + <groupId>org.glassfish</groupId>
> +
> <artifactId>javax.annotation</artifactId>
> +
> <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
> +
> <version>${project.version}</version>+
> + </artifactItem>
> + </artifactItems>
> + </configuration>
> + </execution>
> + </executions>
> + </plugin>
> +
> + <plugin>
> + <groupId>com.sun.enterprise</groupId>
> + <artifactId>hk2-maven-plugin</artifactId>
> + <configuration>
> + <compilerArguments>
> +
> <bootclasspath>${project.build.directory}/endorsed/javax.annotation-${project.version}.jar${path.separator}${java.home}/lib/rt.jar</bootclasspath>
> + </compilerArguments>
> + <fork>true</fork>
> + </configuration>
> + </plugin>
> + </plugins>
> + <resources>
> + <resource>
> + <directory>src/main/java</directory>
> + <includes>
> + <include>**/*.properties</include>
> + </includes>
> + </resource>
> + </resources>
> + </build>
> +
> +
> <developers>
> <developer>
>
> <developer>
> <id>hzhang</id>
> @@ -88,16 +135,6 @@
> </roles>
> </developer>
> </developers>
> - <build>
> - <resources>
> - <resource>
> - <directory>src/main/java</directory>
> - <includes>
> - <include>**/*.properties</include>
> - </includes>
> - </resource>
> - </resources>
> - </build>
> <dependencies>
> <dependency>
> <groupId>com.sun.enterprise</groupId>
>
> Index: packager/glassfish-common/build.xml
> ===================================================================
> --- packager/glassfish-common/build.xml (revision 30586)
> +++ packager/glassfish-common/build.xml (working copy)
> @@ -44,6 +44,7 @@
>
> <move
> file="target/stage/${install.dir.name}/glassfish/modules/jaxb-api-osgi.jar"
> todir="target/stage/${install.dir.name}/glassfish/modules/endorsed"
> failonerror="false"/>
>
> + <move
> file="target/stage/${install.dir.name}/glassfish/modules/javax.annotation.jar"
> todir="target/stage/${install.dir.name}/glassfish/modules/endorsed"
> failonerror="false"/>
>
> <if test="${compression}">
> <antcall target="pack.compression" />
>
>
> Thanks,
>
> - Hong
>