Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39180 > unrolled thread
| Started by | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| First post | 2019-11-25 11:17 -0800 |
| Last post | 2019-11-26 11:05 -0800 |
| Articles | 6 — 4 participants |
Back to article view | Back to comp.lang.java.programmer
need help with maven Eric Douglas <e.d.programmer@gmail.com> - 2019-11-25 11:17 -0800
Re: need help with maven Wayne <wayne@nospam.invalid> - 2019-11-26 02:47 -0500
Re: need help with maven Eric Douglas <e.d.programmer@gmail.com> - 2019-11-26 05:19 -0800
Re: need help with maven Joerg Meier <joergmmeier@arcor.de> - 2019-11-26 11:41 +0100
Re: need help with maven Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2019-11-26 18:46 +0100
Re: need help with maven Eric Douglas <e.d.programmer@gmail.com> - 2019-11-26 11:05 -0800
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2019-11-25 11:17 -0800 |
| Subject | need help with maven |
| Message-ID | <42591719-d10c-40fd-9a62-1aa81a8fb696@googlegroups.com> |
I inherited a maven project and I'm having trouble understanding how it works.
I run the build and it creates a runnable jar with some values in the manifest such as 'Built-By' and 'Start-Class'. I open the pom.xml and I don't see these values.
I'm not sure if this is a maven thing, a spring boot thing, or a little of both? While the pom.xml file has no reference to a main class or start class, Eclipse opens it with 5 tabs. The tab labeled 'Effective POM' has this:
<mainClass>${start-class}</mainClass>
So it's using some sort of variables but where does it go from there? I don't see where variables are defined or assigned.
[toc] | [next] | [standalone]
| From | Wayne <wayne@nospam.invalid> |
|---|---|
| Date | 2019-11-26 02:47 -0500 |
| Message-ID | <qrilao$iq5$1@dont-email.me> |
| In reply to | #39180 |
Try looking for a text file named "manifest". You might
find it in a subdirectory named "resources".
--
Wayne
On 11/25/2019 2:17 PM, Eric Douglas wrote:
> I inherited a maven project and I'm having trouble understanding how it works.
> I run the build and it creates a runnable jar with some values in the manifest such as 'Built-By' and 'Start-Class'. I open the pom.xml and I don't see these values.
> I'm not sure if this is a maven thing, a spring boot thing, or a little of both? While the pom.xml file has no reference to a main class or start class, Eclipse opens it with 5 tabs. The tab labeled 'Effective POM' has this:
> <mainClass>${start-class}</mainClass>
> So it's using some sort of variables but where does it go from there? I don't see where variables are defined or assigned.
>
[toc] | [prev] | [next] | [standalone]
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2019-11-26 05:19 -0800 |
| Message-ID | <06b741a0-6436-47f3-89a2-0aa6d7fa2fc5@googlegroups.com> |
| In reply to | #39183 |
On Tuesday, November 26, 2019 at 2:47:44 AM UTC-5, Wayne wrote:
> Try looking for a text file named "manifest". You might
> find it in a subdirectory named "resources".
>
> --
> Wayne
>
> On 11/25/2019 2:17 PM, Eric Douglas wrote:
> > I inherited a maven project and I'm having trouble understanding how it works.
> > I run the build and it creates a runnable jar with some values in the manifest such as 'Built-By' and 'Start-Class'. I open the pom.xml and I don't see these values.
> > I'm not sure if this is a maven thing, a spring boot thing, or a little of both? While the pom.xml file has no reference to a main class or start class, Eclipse opens it with 5 tabs. The tab labeled 'Effective POM' has this:
> > <mainClass>${start-class}</mainClass>
> > So it's using some sort of variables but where does it go from there? I don't see where variables are defined or assigned.
> >
That was my first thought was it could be hard coded somewhere copying it in, but there are no manifest files in the project folder so I can only guess it's constructing. While there are no references for that in the pom, there are some references in the effective pom. So far I'm having a hard time tracing the source.
[toc] | [prev] | [next] | [standalone]
| From | Joerg Meier <joergmmeier@arcor.de> |
|---|---|
| Date | 2019-11-26 11:41 +0100 |
| Message-ID | <doeyboq292ch.1d2qu31tg1jv1$.dlg@40tude.net> |
| In reply to | #39180 |
On Mon, 25 Nov 2019 11:17:10 -0800 (PST), Eric Douglas wrote:
> I inherited a maven project and I'm having trouble understanding how it works.
> I run the build and it creates a runnable jar with some values in the manifest such as 'Built-By' and 'Start-Class'. I open the pom.xml and I don't see these values.
> I'm not sure if this is a maven thing, a spring boot thing, or a little of both? While the pom.xml file has no reference to a main class or start class, Eclipse opens it with 5 tabs. The tab labeled 'Effective POM' has this:
> <mainClass>${start-class}</mainClass>
> So it's using some sort of variables but where does it go from there? I don't see where variables are defined or assigned.
There are a vast amount of options for building runnable jars, so it's hard
to say how yours is built, exactly. Maybe you could share the pom.xml on a
pastebin ? Typically pom.xml files only contain very little proprietary
information that should be relatively easy to blank out.
Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
[toc] | [prev] | [next] | [standalone]
| From | Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> |
|---|---|
| Date | 2019-11-26 18:46 +0100 |
| Message-ID | <qrjoe3$926$1@dont-email.me> |
| In reply to | #39180 |
On 2019-11-25 20:17, Eric Douglas wrote:
> I inherited a maven project and I'm having trouble understanding how it works.
> I run the build and it creates a runnable jar with some values in the manifest such as 'Built-By' and 'Start-Class'. I open the pom.xml and I don't see these values.
> I'm not sure if this is a maven thing, a spring boot thing, or a little of both? While the pom.xml file has no reference to a main class or start class, Eclipse opens it with 5 tabs. The tab labeled 'Effective POM' has this:
> <mainClass>${start-class}</mainClass>
> So it's using some sort of variables but where does it go from there? I don't see where variables are defined or assigned.
>
It's not surprising you don't see any variables, for if you did, it
wouldn't show up as '${start-class}', but would have been resolved in
the effective POM.
If the variable is in the POM, it's a Maven thing (or a CI server thing
-- but not a spring-boot thing).
Now as to what the original intent was, it's hard to tell. It may be
that it was passed as an argument in the build environment - although
considering the name of the variable, that seems somewhat unlikely,
albeit not impossible.
What's the context of that variable (the lines around it) and what's
your problem with it?
--
DF.
[toc] | [prev] | [next] | [standalone]
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2019-11-26 11:05 -0800 |
| Message-ID | <c10bb334-1e7d-4655-84f0-7c3acd6febf6@googlegroups.com> |
| In reply to | #39186 |
On Tuesday, November 26, 2019 at 12:46:53 PM UTC-5, Daniele Futtorovic wrote:
> On 2019-11-25 20:17, Eric Douglas wrote:
> > I inherited a maven project and I'm having trouble understanding how it works.
> > I run the build and it creates a runnable jar with some values in the manifest such as 'Built-By' and 'Start-Class'. I open the pom.xml and I don't see these values.
> > I'm not sure if this is a maven thing, a spring boot thing, or a little of both? While the pom.xml file has no reference to a main class or start class, Eclipse opens it with 5 tabs. The tab labeled 'Effective POM' has this:
> > <mainClass>${start-class}</mainClass>
> > So it's using some sort of variables but where does it go from there? I don't see where variables are defined or assigned.
> >
>
> It's not surprising you don't see any variables, for if you did, it
> wouldn't show up as '${start-class}', but would have been resolved in
> the effective POM.
>
> If the variable is in the POM, it's a Maven thing (or a CI server thing
> -- but not a spring-boot thing).
>
> Now as to what the original intent was, it's hard to tell. It may be
> that it was passed as an argument in the build environment - although
> considering the name of the variable, that seems somewhat unlikely,
> albeit not impossible.
>
> What's the context of that variable (the lines around it) and what's
> your problem with it?
>
> --
> DF.
That particular variable should be the startup class. We have a line that says MainClass followed by a line that says StartClass in the manifest of a runnable jar it created.
It is a split maven file, with multiple options passed in using -D which tell the build to generate a .war or a .jar. On testing I got it to create a .war. I'm still getting errors on the variable that creates the runnable jar but the jar existed, it was working at some point. I'm guessing the maven somehow created the manifest since there is a startclass variable in the effective pom, I don't see a hard coded manifest file that would have just copied in, and it seems unlikely there would have been one that just got deleted.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web