dev@glassfish.java.net

Re: Review : Changes to security/core/pom.xml

From: Nithya Subramanian <Nithya.Subramanian_at_Sun.COM>
Date: Fri, 25 Sep 2009 14:26:24 +0530

Sahoo,

Implemented your suggestions:

1. changed the phase to process-classes
2. outputDirectory is now target/classes.

In addition, since the .so are not a part of resources, removing this
entry from pom.xml and changed osgi.bundle to remove the lib in the path.

Please review:

Thanks
Nithya

Index: pom.xml
===================================================================
--- pom.xml (revision 31872)
+++ pom.xml (working copy)
@@ -87,12 +87,6 @@
             <resource>
                 <directory>src/main/resources</directory>
                 <includes>
- <include>**/*.so</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
                     <include>**/admin-keyfile</include>
                 </includes>
             </resource>
@@ -139,6 +133,40 @@
                     </archive>
                 </configuration>
             </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-installed</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>solarisrealm</groupId>
+ <artifactId>libsolsparcauth</artifactId>
+ <version>1.0</version>
+ <type>so</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>solarisrealm</groupId>
+ <artifactId>libsolx86auth</artifactId>
+ <version>1.0</version>
+ <type>so</type>
+ </artifactItem>
+ </artifactItems>
+ <stripVersion>
+ true
+ </stripVersion>
+
<!--<outputDirectory>${maven.project.build.outputDirectory}</outputDirectory>-->
+ <outputDirectory>target/classes</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
         </plugins>
     </build>
     <dependencies>
===================================================================
--- osgi.bundle (revision 31872)
+++ osgi.bundle (working copy)
@@ -31,11 +31,11 @@
                         com.sun.enterprise.server.pluggable; \
                         com.sun.enterprise.security.jacc.provider;
version=${project.osgi.version}
 Bundle-NativeCode: \
- lib/libsolsparcauth.so ; \
+ libsolsparcauth.so ; \
         osname=SunOS ; \
         osname=Solaris ; \
         processor=sparc , \
- lib/libsolx86auth.so ; \
+ libsolx86auth.so ; \
         osname=SunOS ; \
         osname=Solaris ; \
         processor=x86 , \


Sahoo wrote:
> Nithya,
>
> Two comments:
> 1. Why are you copying the dependency in "clean" phase?
> 2. Why are you copying it to src/main/resources?
>
> Can't you copy them to target/classes directory in post-compile phase?
>
> Thanks,
> Sahoo
>
> Nithya Subramanian wrote:
>> These changes are meant to download the libsolarisauth.so files from
>> maven repository to be copied into security/core/resources during the
>> clean phase, to be later copied into the jar file during the build
>> phase.
>> This change would eliminate the need to have the .so files in the
>> source code. Please approve..
>>
>> Thanks,
>> Nithya
>>
>> Index: pom.xml
>> ===================================================================
>> --- pom.xml (revision 31738)
>> +++ pom.xml (working copy)
>> @@ -139,6 +139,39 @@
>> </archive>
>> </configuration>
>> </plugin>
>> +<plugin>
>> + <groupId>org.apache.maven.plugins</groupId>
>> + <artifactId>maven-dependency-plugin</artifactId>
>> + <executions>
>> + <execution>
>> + <id>copy-installed</id>
>> + <phase>clean</phase>
>> + <goals>
>> + <goal>copy</goal>
>> + </goals>
>> + <configuration>
>> + <artifactItems>
>> + <artifactItem>
>> + <groupId>solarisrealm</groupId>
>> + <artifactId>libsolsparcauth</artifactId>
>> + <version>1.0</version>
>> + <type>so</type>
>> + </artifactItem>
>> + <artifactItem>
>> + <groupId>solarisrealm</groupId>
>> + <artifactId>libsolx86auth</artifactId>
>> + <version>1.0</version>
>> + <type>so</type>
>> + </artifactItem>
>> + </artifactItems>
>> + <stripVersion>
>> + true
>> + </stripVersion>
>> + <outputDirectory>src/main/resources/lib</outputDirectory>
>> + </configuration>
>> + </execution>
>> + </executions>
>> + </plugin>
>> </plugins>
>> </build>
>> <dependencies>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>