dev@glassfish.java.net

Re: [GFv3] No domain1 dir in glassfish.zip

From: Jane Young <Jane.Young_at_Sun.COM>
Date: Fri, 24 Jul 2009 11:32:39 -0700

I will remove LATEST and use a fixed version and add clean plugin in
pluginManagement.

Thanks,
Jane


Sahoo wrote:
> Cool. Just don't use LATEST as version; use a fixed version and use
> pluginManagement to specify the version.
>
> Thanks,
> Sahoo
>
> Jane Young wrote:
>> Hi Snjezana,
>>
>> Build time using an existing maven repository:
>> with automatic clean in packager and distribution: 8 minutes 1 second
>> w/o automatic clean: 7 minutes 39 seconds
>>
>> Not much impact. Are you okay with this?
>>
>> Here's the pom diffs, please review:
>>
>> Index: pom.xml
>> ===================================================================
>> --- pom.xml (revision 29670)
>> +++ pom.xml (working copy)
>> @@ -507,7 +507,7 @@
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-source-plugin</artifactId>
>> - <version> 2.0.4 </version>
>> + <version> LATEST </version>
>> </plugin>
>>
>> <plugin>
>> @@ -607,18 +607,24 @@
>> </plugin>
>>
>> <plugin>
>> - <groupId>org.apache.maven.plugins</groupId>
>> - <artifactId>maven-source-plugin</artifactId>
>> - <executions>
>> - <execution>
>> - <id>attach-sources</id>
>> - <phase>verify</phase>
>> - <goals>
>> - <goal>jar</goal>
>> - </goals>
>> - </execution>
>> - </executions>
>> - </plugin>
>> + <groupId>org.apache.maven.plugins</groupId>
>> + <artifactId>maven-source-plugin</artifactId>
>> + <!-- if project does not contain source, plugin will
>> fail, so add pom.xml. + See:
>> http://jira.codehaus.org/browse/MSOURCES-44. -->
>> + <configuration>
>> + <includePom>true</includePom>
>> + </configuration>
>> + <executions>
>> + <execution>
>> + <id>attach-sources</id>
>> + <phase>verify</phase>
>> + <goals>
>> + <goal>jar-no-fork</goal>
>> + </goals>
>> + </execution>
>> + </executions>
>> + </plugin>
>> +
>> <plugin>
>> <artifactId>maven-surefire-plugin</artifactId>
>> <configuration>
>> Index: distributions/distributions.xml
>> ===================================================================
>> --- distributions/distributions.xml (revision 29649)
>> +++ distributions/distributions.xml (working copy)
>> @@ -291,8 +291,7 @@
>> description="Create default domain- domain1">
>> <echo message="Directory to run command from: ${exec.dir}"/>
>> <echo message="Command to run: ${exec.executable}"/>
>> - <!-- exec dir="${exec.dir}" executable="${exec.executable}"
>> failonerror="true" -->
>> - <exec dir="${exec.dir}" executable="${exec.executable}" >
>> + <exec dir="${exec.dir}" executable="${exec.executable}"
>> failonerror="true" >
>> <arg line= "create-domain --savelogin=true --checkports=false
>> --adminport 4848 --user anonymous --instanceport 8080
>> --keytooloptions CN=localhost domain1"/>
>> </exec>
>> </target>
>> Index: distributions/pom.xml
>> ===================================================================
>> --- distributions/pom.xml (revision 29649)
>> +++ distributions/pom.xml (working copy)
>> @@ -85,6 +85,20 @@
>> </modules>
>>
>> <build>
>> + <plugins>
>> + <plugin>
>> + <artifactId>maven-clean-plugin</artifactId>
>> + <version>LATEST</version>
>> + <!-- automatically invokes clean during initalize
>> phase -->
>> + <executions>
>> + <execution>
>> + <id>auto-clean</id>
>> + <phase>initialize</phase>
>> + <goals><goal>clean</goal></goals>
>> + </execution>
>> + </executions>
>> + </plugin>
>> + </plugins>
>> <extensions>
>> <extension>
>> <groupId>org.glassfish.build</groupId>
>> Index: packager/pom.xml
>> ===================================================================
>> --- packager/pom.xml (revision 29610)
>> +++ packager/pom.xml (working copy)
>> @@ -101,6 +101,20 @@
>> </modules>
>>
>> <build>
>> + <plugins>
>> + <plugin>
>> + <artifactId>maven-clean-plugin</artifactId>
>> + <version>LATEST</version>
>> + <!-- automatically invokes clean during initalize
>> phase -->
>> + <executions>
>> + <execution>
>> + <id>auto-clean</id>
>> + <phase>initialize</phase>
>> + <goals><goal>clean</goal></goals>
>> + </execution>
>> + </executions>
>> + </plugin>
>> + </plugins>
>> <extensions>
>> <extension>
>> <groupId>org.glassfish.build</groupId>
>>
>>
>> Thanks,
>> Jane
>>
>>
>> Snjezana Sevo-Zenzerovic wrote:
>>> Yes, we can do that. Could you please run build time comparison
>>> before and after to find out how much of an impact on the build time
>>> this makes?
>>>
>>> Thanks,
>>>
>>> Snjezana
>>>
>>> Jane Young wrote:
>>>
>>>> Deleting the domain will resolve the "failonerror" but it still
>>>> does not solve the problem that Sahoo raised. Creating the domain
>>>> in distributions will still use the old files and if there are any
>>>> changes in domain.xml, it will not get used.
>>>>
>>>> Kedar's response suggests that any build in packager and
>>>> distributions should always start with a clean target directory.
>>>> Snjezana, do you see an issue if I add the Maven clean plugin in
>>>> packager and distributions modules so that clean gets automatically
>>>> invoked in the build.
>>>>
>>>> Thanks,
>>>> Jane
>>>>
>>>>
>>>> Snjezana Sevo-Zenzerovic wrote:
>>>>
>>>>> Correct, the original bug evaluation mentioned that we would also
>>>>> need to provide more sophisticated mechanism to make sure that
>>>>> we skip the domain creation only if all artifacts involved in
>>>>> domain creation remained the same...
>>>>>
>>>>> When all is said and done, safe thing to do in the short term
>>>>> would be to get rid of the domain directory and recreate on each
>>>>> run...
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Snjezana
>>>>>
>>>>> Sahoo wrote:
>>>>>
>>>>>> Snjezana Sevo-Zenzerovic wrote:
>>>>>>
>>>>>>> Removing the domain directory from the staging area will work,
>>>>>>> but this also means that build will need to recreate the domain
>>>>>>> each time distributions module is built and that's something we
>>>>>>> originally wanted to avoid for incremental builds. So, other
>>>>>>> option would be to look for the presence of the default domain
>>>>>>> directory and skip the domain creation step in that scenario.
>>>>>>
>>>>>>
>>>>>>
>>>>>> This optimisation can cause problems. Imagine a user updates the
>>>>>> workspace and now create-domain produces different set of files
>>>>>> (let's say a different domain.xml). Because of the above
>>>>>> optimization, we won't run create-domain and hence would end up
>>>>>> using old files.
>>>>>>
>>>>>> Sahoo
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> 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
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>