On Tue, Jan 27, 2009 at 6:32 PM, David Jencks <[email protected]>wrote:
> Hi Trygve,
> Maybe I broke stuff.... its a bit hard to tell from your description.
> There are two things going on in your build:
>
> 1. car-maven-plugin "car" packaging which for each plugin project builds a
> plugin and puts it in the local maven repo. It's plausible that the changes
> here broke this step.
> 2. car-maven-plugin assembly packaging which assembles a server out of the
> plugins from the maven repo. I don't see how this could have broken but you
> never know...
>
> To clarify the situation... IIUC (1) is actually generating artifacts that
> get into the local maven repo?? Are these artifacts copied into the
> geronimo server repository in (2)? If not, something else must have changed
> so these plugins aren't dependencies of the server assembly project.
>
Thanks for the clarification, it matches my understanding.
>
> back to (1)...
> in each plugin project, there should be a target/fliteredplan/plan.xml file
> that should be your plan with the property substitutions done (but not the
> environment element inserted). Is it there and did the property
> substitution work?
>
The file is not there.
> Furthermore, there should be target/resources/META-INF/plan.xml which
> should be your completed plan file with the dependencies etc included and
> target/resources/META-INF/geronimo-;plugin.xml which should have the
> dependencies and the category. Finally both these files should be in the
> completed car file.
>
The plan.xml file is missing as well, but geronimo-plan.xml is present. The
content of geronimo-plan.xml from the broken setup is identical to that of
geronimo-plan.xml in the working setup.
>
> I'd also like to make two suggestions about your build... is a very bad
> idea to have projects reference into each others directories or into other
> file system locations. I'm not sure why you have a lot of individual db
> pools...
>
The reason we have multiple DB pools is that we (try to...) scale our
application horizontally by using many databases. These databases are
identical to each other, hence the shared plan.xml file.
> - if the db pools are all used in one application, note that you can set
> up as many db pools in one plan as you need, as
> connectiondefinitiony-instance elements.
>
The pools are used by many applications (or many different modules of the
same application). The idea behind making each pool a separate plugin was
that some pools would not be used at some server setups, but in practice
either all or none of them are used. I created a plugingroup for all the
pools but it would be better to use a single plan.xml file with multiple
pool definitions as you suggest.
> - if you actually need separate plugins for each db pool so they can be
> used independently, I strongly advise packing the common plan into a jar
> file as a resource (in its own project) and then using the
> maven-dependency-plugin to unpack it into target/rawplan or similar
> location.
>
Yes that sounds reasonable.
>
> Please let us know what is wrong.
>
I did a couple of quick tests today and it seems to me like the
"planFileName" and "sourceDir" configuration variables are ignored by the
car-maven-plugin. At least I am unable to pick up any other file than
/src/main/plan/plan.xml. Tried both with different directory as well as
filename:
<build>
<plugins>
<plugin>
<groupId>org.apache.geronimo.buildsupport</groupId>
<artifactId>car-maven-plugin</artifactId>
<configuration>
<planFileName>test-plan.xml</planFileName>
<sourceDir>${project.basedir}/src/main/hobo</sourceDir>
<deploymentConfigs>
<deploymentConfig>${connectorDeployer}</deploymentConfig>
</deploymentConfigs>
<category>${productName}</category>
<module>
<groupId>org.tranql</groupId>
<artifactId>tranql-connector-mysql-local</artifactId>
<type>rar</type>
</module>
</configuration>
</plugin>
</plugins>
</build>
This still uses /src/main/plan/plan.xml if present, or ignores plan.xml if
not found on the standard location:
[INFO] [car:validate-configuration]
[INFO] [car:prepare-plan]
[INFO] No plan found, plugin will have no classloader
>From you recommendations I won't really need to use a custom plan.xml
location any more, but I'm 90% sure this used to work and was broken
sometime between last week and yesterday.
Many thanks for your quick help! Much appreciated.
Trygve
> On Jan 27, 2009, at 6:15 AM, Trygve Hardersen wrote:
>
> Hi
>
> I hit a problem today with our custom Geronimo assembly that I think is
> related to this:
>
> We have many MySQL DB pools, each represented as a Geronimo plugin. The
> plan.xml file for these plugins is very simmilar, so I'm sharing a common
> file between the plugins:
>
> db-plugin/pom.xml -->
>
> <plugins>
> <plugin>
> <groupId>org.apache.geronimo.buildsupport</groupId>
> <artifactId>car-maven-plugin</artifactId>
> <extensions>true</extensions>
> <configuration>
> <!-- We use a common plan template for DB pools -->
> <planFileName>mysql-pool-plan.xml</planFileName>
> <sourceDir>${project.parent.basedir}/src/main/plan</sourceDir>
> </configuration>
> </plugin>
> </plugins>
>
> db-plugin/src/main/plan/mysql-pool-plan.xml -->
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- The master DB connection pool -->
> <connector xmlns="
> http://geronimo.apache.org/xml/ns/j2ee/connector-${geronimoSchemaVersion}<http://geronimo.apache.org/xml/ns/j2ee/connector-$%7BgeronimoSchemaVersion%7D>
> ">
> <!-- The DB pool -->
> <resourceadapter>
> <outbound-resourceadapter>
> <connection-definition>
>
> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
> <connectiondefinition-instance>
> <name>${currentDBName}</name>
> <config-property-setting
> name="ServerName">${currentDBHost}</config-property-setting>
> <config-property-setting
> name="PortNumber">${currentDBPort}</config-property-setting>
> <config-property-setting
> name="DatabaseName">${currentDBSchema}</config-property-setting>
> <config-property-setting
> name="UserName">${currentDBUser}</config-property-setting>
> <config-property-setting
> name="Password">${currentDBPass}</config-property-setting>
> <connectionmanager>
> <local-transaction/>
> <single-pool>
> <max-size>${currentDBMaxPoolSize}</max-size>
> <min-size>${currentDBMinPoolSize}</min-size>
>
> <blocking-timeout-milliseconds>${currentDBBlockTimeout}</blocking-timeout-milliseconds>
>
> <idle-timeout-minutes>${currentDBIdleTimeout}</idle-timeout-minutes>
> <match-one/>
> </single-pool>
> </connectionmanager>
> </connectiondefinition-instance>
> </connection-definition>
> </outbound-resourceadapter>
> </resourceadapter>
> </connector>
>
> db-plugin/db-001/pom.xml -->
> ....
> <properties>
> <currentDBHost>db-001</currentDBHost>
> <currentDBName>db/shard-001</currentDBName>
> <currentDBSchema>jdb_shard_001</currentDBSchema>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.geronimo.buildsupport</groupId>
> <artifactId>car-maven-plugin</artifactId>
> <configuration>
> <deploymentConfigs>
>
> <!--<deploymentConfig>${gbeanDeployer}</deploymentConfig>-->
>
> <deploymentConfig>${connectorDeployer}</deploymentConfig>
> </deploymentConfigs>
> <category>${productName}</category>
> <module>
> <groupId>org.tranql</groupId>
> <artifactId>tranql-connector-mysql-local</artifactId>
> <type>rar</type>
> </module>
> </configuration>
> </plugin>
> </plugins>
> </build>
> ...
>
> The build still works, but the DB plugins are not included in the final
> /var/config/config.xml file, so they are not started with the server. If I
> create a plan.xml file in src/main/plan for each of the DB plugins
> everything works fine.
>
> Is "my way" of doing it not supported any longer, or is this a bug with
> Geronimo?
>
> Many thanks for your help!
>
> Trygve
>
> On Mon, Jan 26, 2009 at 9:35 AM, David Jencks (JIRA) <[email protected]>wrote:
>
>>
>> [
>> https://issues.apache.org/jira/browse/GERONIMO-4522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>>
>> David Jencks closed GERONIMO-4522.
>> ----------------------------------
>>
>> Resolution: Fixed
>>
>> Implemented rev 737650.
>>
>> To build g. with ee6 bits first build the jetty7 plugins from
>> sandbox/djencks then do the main build with
>>
>> mvn clean install -Pee6,default
>>
>>
>>
>> > history dependencies.xml file should support property substitutions.
>> Plan processing should use maven filtering, not velocity
>> >
>> ------------------------------------------------------------------------------------------------------------------------------
>> >
>> > Key: GERONIMO-4522
>> > URL:
>> https://issues.apache.org/jira/browse/GERONIMO-4522
>> > Project: Geronimo
>> > Issue Type: Bug
>> > Security Level: public(Regular issues)
>> > Components: car-maven-plugin
>> > Affects Versions: 2.2
>> > Reporter: David Jencks
>> > Assignee: David Jencks
>> > Fix For: 2.2
>> >
>> >
>> > In order to support easier switching between ee5 and ee6 builds we need
>> to be able to use properties in the dependencies.xml files. In addition the
>> plan processing can remove a todo by using maven filtering rather than
>> velocity.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>
>