Re: Re: What could cause a missing JAR in WEB-INF?

2023-04-18 Thread Eric Bresie
Any chance there are some conflicting profile or differences in settings.xml on 
the different machines?

Maybe maven caches is different and needs cleanup?

Eric Bresie
ebre...@gmail.com (mailto:ebre...@gmail.com)

> On April 16, 2023 at 7:36:36 AM CDT, Thad Humphries  (mailto:thad.humphr...@gmail.com)> wrote:
> There are no profiles in the pom.xml that brings in the jar in question,
> xml-apis (
> https://repo1.maven.org/maven2/com/megginson/sax/xml-writer/0.2/xml-writer-0.2.pom).
> Since the webapp works without it, I'll exclude it from the build.
>
> On Sat, Apr 15, 2023 at 7:30 PM Tomo Suzuki  (mailto:suzt...@google.com.invalid)>
> wrote:
>
> > > The pom.xml has 2 profiles
> >
> > I meant the pom file that delcares the missing dependency. Your
> > (transitive) dependency's pom.xml.
> >
> > On Sat, Apr 15, 2023 at 13:29 Thad Humphries  > (mailto:thad.humphr...@gmail.com)>
> > wrote:
> >
> > > Thanks. I might be missing something but I can't see it. Responses
> > inline.
> > >
> > > On Sat, Apr 15, 2023 at 12:00 PM Tomo Suzuki  > > (mailto:suzt...@google.com.invalid)
> > >
> > > wrote:
> > >
> > > > My guess
> > > >
> > > > - Maven profiles activated based on environment
> > > >
> > >
> > > The pom.xml has 2 profiles, both triggered by -P, not (that I know of) by
> > > the environment. In any case, environments are (at least from the debug)
> > > the same except for "java.awt.headless: true" in the debug from the
> > office
> > > Mac that I telnet into. That's the Mini with the extra JAR, but my
> > MacBook
> > > has it, too, and it's here with me.
> > >
> > > Of the two declared profiles, one profile selects GWT devmode, while the
> > > other packages the *war. In all the cases that I am describing, I'm
> > > using the packaging profile. Each time the command is
> > >
> > > $ mvn clean exec:exec -Dexec.executable="xslt" package -P package
> > >
> > > (The exec:exec builds the webapp's online manual using DocBook. It's
> > later
> > > copied into the *war. Same DocBook version, same version of xsltproc.)
> > >
> > > Running `mvn help:effective-settings` shows the same settings on each
> > > machine except for hostnames. Is there another command I should try?
> > >
> > >
> > > > - Download URL was unavailable
> > > >
> > >
> > > I don't think so. I've packaged this dozens of times over the past 3 days
> > > with the same results each time. The Git and Nexus servers are inside the
> > > office, but I've had no connection issues with them. I have a VPN to
> > > everything there.
> > >
> > >
> > > > or
> > > > - Disk was full when downloading
> > > >
> > >
> > > Both Mac Minis have 1.12TB Fusion drives with over 50% free.
> > >
> > >
> > > >
> > > > On Fri, Apr 14, 2023 at 15:34 Thad Humphries  > > > (mailto:thad.humphr...@gmail.com)
> > >
> > > > wrote:
> > > >
> > > > > I have *war that I've built on 3 different Macs (maven-war-plugin
> > > 3.3.2).
> > > > > The code is pulled from my local git repo, and the supporting jars
> > are
> > > > from
> > > > > a local Nexus repository. All Macs use the same setup--Amazon
> > Corretto
> > > > Java
> > > > > 11 and Maven 3.9.1. The ~/.m2/settings.xml are identical. Two of the
> > > Macs
> > > > > produce the same *war (a Mini with 10.15.7 and a MacBook with
> > 12.6.5).
> > > > The
> > > > > third Mac--also a Mini with 10.15.7--is missing one JAR file in
> > > > > WEB-INF/lib. How can this be?
> > > > >
> > > > > The missing JAR is in each local repository. I do not see this JAR
> > > when I
> > > > > run `mvn dependency:tree`, though I see a different (newer) version
> > as
> > > > > "provided." The missing JAR doesn't seem to matter when the webapp
> > runs
> > > > (no
> > > > > problems found so far). Any idea as to why, and what I can (or
> > should?)
> > > > do
> > > > > for a consistent build?
> > > > >
> > > > > --
> > > > > "Hell hath no limits, nor is circumscrib'd In one self-place; but
> > where
> > > > we
> > > > > are is hell, And where hell is, there must we ever be" --Christopher
> > > > > Marlowe, *Doctor Faustus* (v. 111-13)
> > > > >
> > > > --
> > > > Regards,
> > > > Tomo
> > > >
> > >
> > >
> > > --
> > > "Hell hath no limits, nor is circumscrib'd In one self-place; but where
> > we
> > > are is hell, And where hell is, there must we ever be" --Christopher
> > > Marlowe, *Doctor Faustus* (v. 111-13)
> > >
> > --
> > Regards,
> > Tomo
> >
>
>
> --
> "Hell hath no limits, nor is circumscrib'd In one self-place; but where we
> are is hell, And where hell is, there must we ever be" --Christopher
> Marlowe, *Doctor Faustus* (v. 111-13)


Re: Re: How to add a library to the classpath

2023-01-06 Thread Eric Bresie

Would using basic batch/shell specifying the dependencies with the Java 
classpath argument (without maven run) and the main runtime class be the 
alternative?

Kind of a side question…when building with maven does it automate the addition 
dependencies within the META-INF/MANIFEST.MF (1) embedded within the jar?

Eric Bresie
ebre...@gmail.com (mailto:ebre...@gmail.com)

References (1) 
https://stackoverflow.com/questions/70216/whats-the-purpose-of-meta-inf
> On January 6, 2023 at 2:35:16 AM CST, Mantas Gridinas  (mailto:mgridi...@gmail.com)> wrote:
> I'm confused. Why would your users write additional entries intk your pom?
>
> On Fri, Jan 6, 2023, 10:33 (x-apple-data-detectors://4) Delany 
> mailto:delany.middle...@gmail.com)> wrote:
>
> > Could this help?
> >
> > https://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html
> > Delany
> >
> > On Fri, 6 Jan 2023 at 05:30, Siddharth Jain  > (mailto:siddh...@gmail.com)> wrote:
> >
> > > thanks. unfortunately this is exactly what i don't want to do. i am
> > looking
> > > for a command line solution. i don't want my users to have to write a
> > > pom.xml to add additional dependencies to the classpath.
> > >
> > > On Thu, Jan 5, 2023 at 5:16 PM Greg Chabala  > > (mailto:greg.chab...@gmail.com)>
> > > wrote:
> > >
> > > > Try searching for an example:
> > > >
> > > >
> > >
> > https://github.com/search?l=Maven+POM=additionalClasspathElements=Code
> > > >
> > > > On Thu, Jan 5, 2023 at 7:11 PM Siddharth Jain  > > > (mailto:siddh...@gmail.com)>
> > > wrote:
> > > >
> > > > > thanks. how do i separate multiple classpaths? tried : and , and none
> > > of
> > > > > them work.
> > > > >
> > > > > On Thu, Jan 5, 2023 at 3:58 PM Laird Nelson  > > > > (mailto:ljnel...@gmail.com)>
> > > wrote:
> > > > >
> > > > > > On Thu, Jan 5, 2023 at 3:20 PM Siddharth Jain  > > > > > (mailto:siddh...@gmail.com)>
> > > > > wrote:
> > > > > >
> > > > > > > I am using mvn exec:java to run a program. […] I want to add some
> > > > more
> > > > > > > libraries that I have
> > > > > > > installed in M2 repository to the classpath at runtime and I do
> > NOT
> > > > > want
> > > > > > to
> > > > > > > list them in the project's pom.xml. How can I do this? I tried
> > > > > searching
> > > > > > > online but could not find an answer.
> > > > > > >
> > > > > >
> > > > > > The documentation for the exec-maven-plugin's java goal contains
> > > this:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > https://www.mojohaus.org/exec-maven-plugin/java-mojo.html#additionalClasspathElements
> > > > > >
> > > > >
> > > >
> > >
> >