Discussion:
tomee-maven-plugin webapps
Matthew Broadhead
2018-03-12 11:51:48 UTC
Permalink
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
      <plugin>
            <groupId>org.apache.tomee.maven</groupId>
            <artifactId>tomee-maven-plugin</artifactId>
            <version>${tomee.version}</version>
            <configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
                <tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
                <libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
                </libs>
                <webapps>
<webapp>${project.groupId}:subproject:${project.version}?name=subproject</webapp>

                </webapps>
            </configuration>
       </plugin>
 </plugins>
but it complains that it cannot find the subproject in the maven
repository.  is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Romain Manni-Bucau
2018-03-12 13:10:40 UTC
Permalink
Hi
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules

Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and get rid
of both issues at once.



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?name=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Matthew Broadhead
2018-03-12 14:39:35 UTC
Permalink
hi
i tried putting
<webapp>subproject?name=subproject</webapp>
but i got
[ERROR] format for librairies should be
<groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
org.apache.openejb.maven.plugin.TomEEException: format for librairies
should be <groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
    at
org.apache.openejb.maven.plugin.AbstractTomEEMojo.mvnToFile(AbstractTomEEMojo.java:847)

incidentally librairies should be spelled libraries but it is not a big
deal...

i tried google for an app launcher module but i couldn't find anything. 
could you point me in the right direction?
Post by Romain Manni-Bucau
Hi
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules
Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and get rid
of both issues at once.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?name=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Romain Manni-Bucau
2018-03-12 14:43:51 UTC
Permalink
Yep, was more thinking about a path to the war and not the module but you
are right we only support gav ATM.
the app launcher reference was a new pom module in your project with the
plugin setup, not something existing. Just aligning your usage on maven.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by Matthew Broadhead
hi
i tried putting
<webapp>subproject?name=subproject</webapp>
but i got
[ERROR] format for librairies should be <groupId>:<artifactId>:<versio
n>[:<type>[:<classifier>]]
org.apache.openejb.maven.plugin.TomEEException: format for librairies
should be <groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
at org.apache.openejb.maven.plugin.AbstractTomEEMojo.mvnToFile(
AbstractTomEEMojo.java:847)
incidentally librairies should be spelled libraries but it is not a big
deal...
i tried google for an app launcher module but i couldn't find anything.
could you point me in the right direction?
Post by Romain Manni-Bucau
Hi
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules
Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and get rid
of both issues at once.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 12:51 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?nam
e=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Matthew Broadhead
2018-03-12 14:46:32 UTC
Permalink
why is the gav not resolving to the local builds and trying to get from
repo?
yes i could create another module with the setup but wouldn't i be faced
with the same problem?
Post by Romain Manni-Bucau
Yep, was more thinking about a path to the war and not the module but you
are right we only support gav ATM.
the app launcher reference was a new pom module in your project with the
plugin setup, not something existing. Just aligning your usage on maven.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by Matthew Broadhead
hi
i tried putting
<webapp>subproject?name=subproject</webapp>
but i got
[ERROR] format for librairies should be <groupId>:<artifactId>:<versio
n>[:<type>[:<classifier>]]
org.apache.openejb.maven.plugin.TomEEException: format for librairies
should be <groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
at org.apache.openejb.maven.plugin.AbstractTomEEMojo.mvnToFile(
AbstractTomEEMojo.java:847)
incidentally librairies should be spelled libraries but it is not a big
deal...
i tried google for an app launcher module but i couldn't find anything.
could you point me in the right direction?
Post by Romain Manni-Bucau
Hi
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules
Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and get rid
of both issues at once.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 12:51 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?nam
e=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Romain Manni-Bucau
2018-03-12 14:57:19 UTC
Permalink
Post by Matthew Broadhead
why is the gav not resolving to the local builds and trying to get from
repo?
if in your repo and not in the reactor it should find it otherwise it
doesn't exists from a maven perspective
Post by Matthew Broadhead
yes i could create another module with the setup but wouldn't i be faced
with the same problem?
Shouldn't
Post by Matthew Broadhead
Post by Romain Manni-Bucau
Yep, was more thinking about a path to the war and not the module but you
are right we only support gav ATM.
the app launcher reference was a new pom module in your project with the
plugin setup, not something existing. Just aligning your usage on maven.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 15:39 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i tried putting
<webapp>subproject?name=subproject</webapp>
but i got
[ERROR] format for librairies should be <groupId>:<artifactId>:<versio
n>[:<type>[:<classifier>]]
org.apache.openejb.maven.plugin.TomEEException: format for librairies
should be <groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
at org.apache.openejb.maven.plugin.AbstractTomEEMojo.mvnToFile(
AbstractTomEEMojo.java:847)
incidentally librairies should be spelled libraries but it is not a big
deal...
i tried google for an app launcher module but i couldn't find anything.
could you point me in the right direction?
Hi
Post by Romain Manni-Bucau
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules
Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and get rid
of both issues at once.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 12:51 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?nam
e=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Matthew Broadhead
2018-03-12 15:38:38 UTC
Permalink
i did a
mvn clean install
which added the modules to my .m2

but now i have another problem which is that keycloak requires some
libraries to be included in tomee/lib.  is it possible to add these to a
folder and have them copied over?  e.g.
<lib>unzip:somefolder/keycloakstuff.zip</lib>
Post by Romain Manni-Bucau
Post by Matthew Broadhead
why is the gav not resolving to the local builds and trying to get from
repo?
if in your repo and not in the reactor it should find it otherwise it
doesn't exists from a maven perspective
Post by Matthew Broadhead
yes i could create another module with the setup but wouldn't i be faced
with the same problem?
Shouldn't
Post by Matthew Broadhead
Post by Romain Manni-Bucau
Yep, was more thinking about a path to the war and not the module but you
are right we only support gav ATM.
the app launcher reference was a new pom module in your project with the
plugin setup, not something existing. Just aligning your usage on maven.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 15:39 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i tried putting
<webapp>subproject?name=subproject</webapp>
but i got
[ERROR] format for librairies should be <groupId>:<artifactId>:<versio
n>[:<type>[:<classifier>]]
org.apache.openejb.maven.plugin.TomEEException: format for librairies
should be <groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
at org.apache.openejb.maven.plugin.AbstractTomEEMojo.mvnToFile(
AbstractTomEEMojo.java:847)
incidentally librairies should be spelled libraries but it is not a big
deal...
i tried google for an app launcher module but i couldn't find anything.
could you point me in the right direction?
Hi
Post by Romain Manni-Bucau
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules
Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and get rid
of both issues at once.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 12:51 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?nam
e=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Romain Manni-Bucau
2018-03-12 15:40:50 UTC
Permalink
yes this should work or just all the deps (one line per lib)
Post by Matthew Broadhead
i did a
mvn clean install
which added the modules to my .m2
but now i have another problem which is that keycloak requires some
libraries to be included in tomee/lib. is it possible to add these to a
folder and have them copied over? e.g. <lib>unzip:somefolder/keycloak
stuff.zip</lib>
2018-03-12 15:46 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
why is the gav not resolving to the local builds and trying to get from
repo?
if in your repo and not in the reactor it should find it otherwise it
doesn't exists from a maven perspective
yes i could create another module with the setup but wouldn't i be faced
Post by Matthew Broadhead
with the same problem?
Shouldn't
Post by Matthew Broadhead
Yep, was more thinking about a path to the war and not the module but you
Post by Romain Manni-Bucau
are right we only support gav ATM.
the app launcher reference was a new pom module in your project with the
plugin setup, not something existing. Just aligning your usage on maven.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 15:39 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i tried putting
<webapp>subproject?name=subproject</webapp>
but i got
[ERROR] format for librairies should be <groupId>:<artifactId>:<versio
n>[:<type>[:<classifier>]]
org.apache.openejb.maven.plugin.TomEEException: format for librairies
should be <groupId>:<artifactId>:<version>[:<type>[:<classifier>]]
at org.apache.openejb.maven.plugin.AbstractTomEEMojo.mvnToFile(
AbstractTomEEMojo.java:847)
incidentally librairies should be spelled libraries but it is not a big
deal...
i tried google for an app launcher module but i couldn't find anything.
could you point me in the right direction?
Hi
Post by Romain Manni-Bucau
you can use a file reference I think instead of gav, otherwise no way in a
single reactor until it is already built once
you can add -N to not run submodules
Personally I'd go with a app-launcher module with dependencies on other
modules to ensure the reactor order and it would resolve nicely and
get
rid
of both issues at once.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-
high-performance>
2018-03-12 12:51 GMT+01:00 Matthew Broadhead <
Post by Matthew Broadhead
hi
i am trying to use tomee-maven-plugin from a parent project.
i tried to define the subprojects as webapps like
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>plus</tomeeClassifier>
<config>${project.basedir}/src/test/tomee/conf</config>
<libs>
<lib>mysql:mysql-connector-java:${mysql.connector.version}</lib>
</libs>
<webapps>
<webapp>${project.groupId}:subproject:${project.version}?nam
e=subproject</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
but it complains that it cannot find the subproject in the maven
repository. is there any way to tell it that it is a subproject?
also it seems to try to run up a tomee instance for every subproject
Loading...