> On 9 Apr 2025, at 17:40, Tommy <to...@natusoft.se> wrote:
> 
> Hmm ... It seems like I had more in my head than came out!
> 
> It is a maven groovy project that has multiple modules and have built fine 
> until now when it refuses to accept that a what I can see is a perfectly 
> normal maven module with code in it that maven claims must be of type "pom" 
> and not "jar"! And I fail to see why.
> 
> /Tommy
> 

Check for any recent changes in your project hierarchy. When I try to replicate 
with the info you share in a dummy local project (which of course cannot derive 
from your parent project) it builds just fine as a jar, both with and without a 
typo in the groovy filename.

I can get it to break if I try to make it both a project with groovy sources 
AND a multimodule aggregator by adding in another project (adding a <modules> 
section to the pom referring to another project), but then maven clearly 
signals in the error that **an aggregator project** cannot have jar packaging 
but must be pom. 

So also carefully check the exact full error where maven complains that 
‘packaging should be pom instead of jar"



> ______________________
> Tommy Svensson
> to...@natusoft.se
> On 9 Apr 2025 at 17:28 +0200, Tommy <to...@natusoft.se>, wrote:
>> Here is the pom.xml content of the module:
>> <project xmlns="http://maven.apache.org/POM/4.0.0";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>> <modelVersion>4.0.0</modelVersion>
>> 
>> <parent>
>> <groupId>se.natusoft.seagull</groupId>
>> <artifactId>Seagull</artifactId>
>> <version>1.0.0-BC11</version>
>> </parent>
>> 
>> <artifactId>SeagullPlatform</artifactId>
>> <version>1.0.0-BC11</version>
>> 
>> <!--
>> Maven REFUSES to accept this!! Maven insists this is a "pom" ???.
>> It is NOT a POM, it is a JAR, it contains code. Maven refuses to accept this
>> 
>> Note that this is Groovy code and the module has a src/main/groovy/...
>> All modules are actually Groovy code, and it does not complain about any of 
>> the
>> other ones!
>> 
>> I am a very strong BUG MAGNET!! I seriously hope that is not the case here!!!
>> -->
>> 
>> <packaging>jar</packaging>
>> </project>
>> 
>> The module has an src/man/groovy/.... with groovy classes to compile:
>> 
>>    src/
>>       main/
>>          groovy/
>>              se/
>>                 natusoft/
>>                    seagull/
>>                       api/
>>                          SGLogger.grovvy
>>                          ...
>> 
>> and  more classes in that src tree. But maven will not try to compile, just 
>> insists it must have packaging "pom".
>> 
>> I'm going nuts here! I've been using maven for a very very long time, almost 
>> from the beginning! Never ever had problems like this before!
>> 
>> And this have built over and over util it suddenly decided not to! Maybe 
>> something just happened in the world and 1 + 1 is now the square root of 
>> seventy eleven and a half diveded by 2 !?
>> 
>> Note that this has built over and over without any problems before. It is a 
>> rather tiny pom. It inherits from the top level pom. Nothing strange what I 
>> can see!
>> 
>> Any suggestion is appreciated!
>> 
>> Thanks /Tommy
>> 
>> 
>> ______________________
>> Tommy Svensson
>> to...@natusoft.se


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to