Re: war plugin incompatibility

2023-11-13 Thread Karl Heinz Marbaise

On 09.11.23 23:46, Rick Hillegas wrote:

I am trying to install a Derby release into my local maven repository.
The world has changed underneath me in the last year and a half since I
published the last Derby release. The Derby maven-based publication poms
can be found under
https://svn.apache.org/repos/asf/db/derby/code/trunk/maven2/ The Derby
publication poms don't do much. They just sign the Derby artifacts and
copy them into the repository. No jars or wars are actually built by the
publication poms. That happens elsewhere.

On my first attempt, I used the maven version I used a year and a half
ago: 3.8.6. One of the Derby artifacts is a war file and its associated
publication pom contained this plugin stanza:

     
    org.apache.maven.plugins
    maven-war-plugin
    2.1.1
     


Why using such ancient version?

https://maven.apache.org/plugins/

Upgrade the plugin versions


Kind regards
Karl Heinz Marbaise

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



Re: war plugin incompatibility

2023-11-09 Thread Rick Hillegas
I think that I have fixed this problem by adding the following stanza to 
the maven war plugin descriptor:


   
false
    


On 11/9/23 2:46 PM, Rick Hillegas wrote:
I am trying to install a Derby release into my local maven repository. 
The world has changed underneath me in the last year and a half since 
I published the last Derby release. The Derby maven-based publication 
poms can be found under 
https://svn.apache.org/repos/asf/db/derby/code/trunk/maven2/ The Derby 
publication poms don't do much. They just sign the Derby artifacts and 
copy them into the repository. No jars or wars are actually built by 
the publication poms. That happens elsewhere.


On my first attempt, I used the maven version I used a year and a half 
ago: 3.8.6. One of the Derby artifacts is a war file and its 
associated publication pom contained this plugin stanza:


    
   org.apache.maven.plugins
   maven-war-plugin
   2.1.1
    

When I executed a top level

   mvn clean install

the command failed with the following error:

[WARNING] Error injecting: org.apache.maven.plugin.war.WarMojo
com.google.inject.ProvisionException: Unable to provision, see the 
following errors:


1) Error injecting constructor, java.lang.ExceptionInInitializerError: 
Cannot access defaults field of Properties

  at org.apache.maven.plugin.war.WarMojo.(Unknown Source)
  while locating org.apache.maven.plugin.war.WarMojo

followed at the end by

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on 
project derbywar: Execution default-war of goal 
org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: Unable to 
load the mojo 'war' in the plugin 
'org.apache.maven.plugins:maven-war-plugin:2.1.1' due to an API 
incompatibility: 
org.codehaus.plexus.component.repository.exception.ComponentLookupException: 
Cannot access defaults field of Properties



So I upgraded maven to version 3.9.5 and I upgraded the war plugin 
stanza to specify maven plugin version 3.3.1. Now "mvn clean install" 
raises the following error:


[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-war-plugin:3.3.1:war (default-war) on 
project derbywar: Error assembling WAR: webxml attribute is required 
(or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]


Since all I am doing is signing jars and wars, I don't think that a 
web.xml file should be required. I would appreciate your advice for 
how to get over this speedbump.


Thanks,
-Rick




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