Using Eclipse without maven plugin (multiple module project)

Why aren’t you checking the project out in Eclipse?

BTW. I suggest using the STS version of Eclipse since all your plug-ins come preinstalled except for Subversion which is mostly included.

On 13/07/2010 11:31 AM, Bahadýr Konu wrote:

on

Building the same project with 2 different pom.xml

On 7/7/10 8:30 AM, govind ashrit wrote:

Don’t do this. Figure out how to use profiles or split the project.

Can we define a plugin with different configuration in multi module pom project

There is a top level pom.xml which calls two sub modules as below: module1 module2

Where module2 is dependent on module1 The xjc plugin configuration in module1 pom.xml is as below: com.sun.tools.xjc.maven2 maven-jaxb-plugin generate false true true

The xjc configuration in module2′s pom.xml is as below: com.sun.tools.xjc.maven2 maven-jaxb-plugin com.mycompany.module1 module1 1.0 runtime generate schema.xsd bindings.xjb false true true -Xpdm

Now when I run mvn from top level directory then module2 build fails, I get the below error: [INFO] unrecognized parameter -Xpdm [INFO] ———————————————————————— [INFO] Trace unrecognized parameter -Xpdm at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:446) at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:434)

The reason for this error was because module1 dependency was not used while XJC plugin execution during module2 build. My question: why module2′s xjc plugin configuration did not come into effect? When I run mvn in module2 directory it works fine but from top level directory it fails. Any help, what I am missing at?

Maven API to identify the parent for a project with ‘N’ levels of POM Inheritance

Hi,

We are trying to build a tool around Maven and need to identify the top level parent of any given POM. For example, If ProjectC inherits from ProjectB and ProjectB from ProjectA, we want to know if there is any API in maven to identify ProjectA’s POM, given ProjectC’s POM as input.

In this case, we are NOT really starting a maven execution, just running the tool we build against a list of POMs to find the top level parent.

Could someone throw some light if you have any idea?

problem with a multi-module project, perform phase

You can disable the use of the release profile. See the link Nick sent.

/Anders

On Tue, Jun 22, 2010 at 11:53, Daniele Dellafiore wrote:

problem with a multi-module project, perform phase

Ok, the problem here is that if this conflict with existent source and javadocs generation configuration, it causes the release to fail.

On Tue, Jun 22, 2010 at 11:50 AM, Nick Stolwijk wrote:

problem with a multi-module project, perform phase

M-R-P activates a release profile by default, which contains the source and javadocs. See [1]

[1] http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#useReleaseProfile

With regards,

Nick Stolwijk ~Java Developer~

IPROFS BV. Claus Sluterweg 125 2012 WS Haarlem http://www.iprofs.nl

On Tue, Jun 22, 2010 at 11:46 AM, Daniele Dellafiore wrote:

problem with a multi-module project, perform phase

ok, I changed executions goal from jar-no-fork to just “jar” and it works I think that m-r-p by default has the attach-sources on the goal jar active and if I add a jar-no-fork executions, they are summed. In fact nowhere in my config I tell maven to make javadoc but the release plugin just make it.

I think this is a little tricky, probably an issue to report, what do you think?

On Tue, Jun 22, 2010 at 11:26 AM, Daniele Dellafiore wrote:

problem with a multi-module project, perform phase

I fixed the last problem removing myProject inheritance from the company pom.

Now I am stucked cause the release plugin is deploying the source artifact two times and the second time Nexus give me a 400 cause it does not allow to overwrite an artifact in the release repository, and it’s right.

It install and then deploy the sources artifact two times.

Here is the execution for the source-plugin

attach-sources jar-no-fork

And here is the log

[INFO] [INFO] [install:install {execution: default-install}] [INFO] [INFO] Installing ..lcore-1.0.jar to ../lcore-1.0.jar [INFO] [INFO] Installing ..lcore-1.0-sources.jar to ..lcore-1.0-sources.jar [INFO] [INFO] Installing ..lcore-1.0-sources.jar to ..lcore-1.0-sources.jar [INFO] [INFO] Installing ..lcore-1.0-javadoc.jar to ..lcore-1.0-javadoc.jar [INFO] [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Uploading: http://10.10.20.128:8080/nexus/content/repositories/releases/../1.0/lcore-1.0.jar [INFO] 4/70K [INFO] 8/70K … [INFO] 70/70K [INFO] 70K uploaded (lcore-1.0.jar) [INFO] [INFO] Retrieving previous metadata from releases.company.it [INFO] [INFO] repository metadata for: ‘artifact lavazza.eshop:lcore’ could not be found on repository: releases.iconmedialab.it, so will be created [INFO] [INFO] Uploading repository metadata for: ‘artifact lavazza.eshop:lcore’ [INFO] [INFO] Uploading project information for lcore 1.0 [INFO] Uploading: http://10.10.20.128:8080/nexus/content/repositories/releases/../1.0/lcore-1.0-sources.jar [INFO] 4/61K … [INFO] 61/61K [INFO] 61K uploaded (lcore-1.0-sources.jar) [INFO] Uploading: http://10.10.20.128:8080/nexus/content/repositories/releases/../1.0/lcore-1.0-sources.jar [INFO] 4/61K … [INFO] 61/61K [INFO] [INFO]

problem with a multi-module project, perform phase

Hi everyone.

MRP just suceeded in the prepare but fails immediately the perform phase, with a:

Working directory “/home/[...] /myProject/target/checkout/myProject” does not exist!

In fact it does not exists, the target/checkout folders contains:

src/ pom.xml company-parent-1.0/

where src/ and pom.xml are the same contained in company-parent-1.0 folder. This is strange, I explain you my project layout.

myProject .. module1 .. module2 .. module3

. myProject just defines multi-modules (1, 2 and 3) and inherits from the company-parent-1.0 pom. In this c-p-1.0 I Define distributionManagement and some plugins like the release plugin 2.0 . module1 is another pom project that inherits as well from the company-parent-1.0 pom and defines some specific deps and plugins for myProject. . module2, 3 etc are jar/war projects that inherit from module1

all my project is sync with svn.

mvn release:prepare build succesfully, then perform fails as I wrote. Attached there is the release.properties file.

I just released with success two other single module jar artifacts that inherit from company-parent-1.0. Here the complication is with the multi-module that inherit from company-parent-1.0 as well as one of its modules.

I use this structure cause I do not want to mix the multi-module pom with the pom that has to be inherited by the modules in myProject.

Thanks in advance for any help.