Galleon maven plugin fails to exclude packages from installation

295 views
Skip to first unread message

Ivan L

unread,
Mar 18, 2021, 3:20:53 PM3/18/21
to WildFly
Hi all,

I would like to provision a specific installation of wildfly with only selected layers, so I have created a maven project for this and the following is a snippet from it. The problem is that I try to exclude some packages like docs.schema but it does not work and the directories under docs/ are still present in the target installation directory. What could be the problem?

<build>
        <finalName>${server.name}</finalName>
        <plugins>
            <plugin>
                <groupId>org.jboss.galleon</groupId>
                <artifactId>galleon-maven-plugin</artifactId>
                <version>4.2.7.Final</version>
                <executions>
                    <execution>
                        <id>server-provisioning</id>
                        <goals>
                            <goal>provision</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <install-dir>${project.build.directory}/${project.build.finalName}</install-dir>
                            <record-state>false</record-state>
                            <log-time>${galleon.log.time}</log-time>
                            <!--
                            <offline>true</offline>
                             -->
                            <feature-packs>
                                <feature-pack>
                                    <groupId>org.wildfly</groupId>
                                    <artifactId>wildfly-galleon-pack</artifactId>
                                    <version>${version.org.wildfly}</version>                                    
                                    <inherit-configs>false</inherit-configs>
                                    <included-configs>
                                        <config>
                                            <model>standalone</model>
                                            <name>standalone.xml</name>
                                        </config>
                                    </included-configs>
                                    <excluded-packages>
                                        <name>product.conf</name>
                                        <name>docs</name>
                                        <name>docs.schema</name>
                                        <name>docs.examples</name>                                       
                                    </excluded-packages>
                                </feature-pack>                                
                            </feature-packs>
                            <configurations>
                                <config>
                                    <model>standalone</model>
                                    <name>standalone.xml</name>
                                    <layers>                                        
                                        <layer>datasources-web-server</layer>
                                        <layer>logging</layer>
                                        <layer>ejb-lite</layer>
                                        <layer>core-tools</layer>
                                    </layers>
                                </config>
                            </configurations>
                            <plugin-options>
                                <jboss-maven-dist/>
                                <jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
                                <optional-packages>passive+</optional-packages>
                            </plugin-options>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assemble</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>assembly.xml</descriptor>
                            </descriptors>
                            <recompressZippedFiles>true</recompressZippedFiles>
                            <finalName>${project.build.finalName}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <workDirectory>${project.build.directory}/assembly/work</workDirectory>
                            <tarLongFileMode>gnu</tarLongFileMode>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Jean Francois Denise

unread,
Mar 18, 2021, 3:28:14 PM3/18/21
to wil...@googlegroups.com
Hi,
you can look at an example of provisioning of layers only :
Items that seem suspicious:
You are including a default config, you should remove it: <included-configs>
You are inheriting all default packages, add: <inherit-packages>false</inherit-packages>
JF
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/3fcc94e3-3be9-4164-b8c1-1bbe86444c3bn%40googlegroups.com.


Ivan L

unread,
Mar 22, 2021, 3:26:26 PM3/22/21
to WildFly
Thanks, JF, for your response.

However, could you elaborate a little on what you said?

> You are including a default config, you should remove it: <included-configs>

I thought I should include standalone if I want to use it.

> You are inheriting all default packages, add: <inherit-packages>false</inherit-packages>

If I do this, the installation does not contain any jars in the modules directory, just module.xml files. I am not sure what that means.

Jean Francois Denise

unread,
Mar 23, 2021, 6:44:55 AM3/23/21
to wil...@googlegroups.com
Hi,
On 3/22/21 8:26 PM, Ivan L wrote:
Thanks, JF, for your response.

However, could you elaborate a little on what you said?

> You are including a default config, you should remove it: <included-configs>

I thought I should include standalone if I want to use it.
We are generating a standalone.xml config from scratch using the layers you are specifying, we don't inherit anything from the default standalone.xml that WildFly provides.


> You are inheriting all default packages, add: <inherit-packages>false</inherit-packages>

If I do this, the installation does not contain any jars in the modules directory, just module.xml files. I am not sure what that means.

The "no jar" in modules sub directories is caused by : <jboss-maven-dist/> plugin-options. It means that the jars will get resolved and loaded during boot from Maven local cache.

Remove this option to have the jars copied to the modules sub directories.

JF.

Ivan L

unread,
Apr 9, 2021, 8:56:15 AM4/9/21
to WildFly
Thanks very much, JF.

It was what you described.
Reply all
Reply to author
Forward
0 new messages