I'll have to think about how this works and the ramifications. Off the top of my head, I'm not sure how packaging the artifact as a JAR would help.

We make use of overlays, and then override the content in the project that depends on the WAR by utilizing Maven's WAR overlays. Basically, the first WAR component wins. The downstream project may override the dependency simply by having a file with the same name in the same web application location.

I might be able to use the dependency plugin and unpack the JAR contents in the correct place (and order). I'll think about that.

What I was hoping for is something like the following:

<reportSets>
        <reportSet>
             <id>dependencies</id>
             <report>dependencies</report>
              <configuration>
                       <exclusions>
                              <!-- exclude WAR dependency -->
                               <exclusion>arifactId</exclusion>
                        </exclusions>
                </configuration>
        </reportSet>
. . . . other reports . . . .
</reportsSets>

However, that doesn't seem to be available.

Of course, then you wouldn't be able to tell of that WAR dependency had updates. Hmm.

Thanks for replying.

Mark
/mde/

On 12/19/2023 3:32 AM, Nils Breunese wrote:
Can’t these resources be packaged in plain JARs and added as a regular 
dependency to the applications that require them, instead of using WAR overlays?

Nils.

Op 19 dec 2023, om 06:53 heeft Mark Eggers <its_toas...@yahoo.com.INVALID> het 
volgende geschreven:

I have several artifacts that consist of WAR archives with no server component.

In other words, there are only HTML, CSS, JS, JSP, images, fonts, etc.files in 
these artifacts. There are no servlets, listeners, POJOs, resources, etc. in 
these artifacts.

These artifacts are used as overlays in other projects to keep common 
components managed.

When a dependency report is run using these artifacts, there is an error along 
the lines of:

[ERROR] Artifact groupId:artifactId:war:version caused IOException:

[FILE_LOCATION]/classes  (The system cannot find the file specified)

-- stack trace --

Well this is obvious, since the WAR artifacts used as an overlay have no 
WEB-INF/classes directories.

Is there a way to exclude these artifacts  from dependency checking for 
projects that consume them? Or do I just live with the error messages in 
site:site (the site builds correctly).

I'm using maven-project-info-reports-plugin 3.5.0 with a variety of Maven 
versions (3.6.3, 3.9.6), and a variety of JDKs (8, 11, 17).

Any ideas would be greatly appreciated.

Thanks in advance,

Mark
/mde/

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



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



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

Reply via email to