Jason van Zyl wrote:

On 22-Mar-08, at 5:02 PM, Trenton Adams wrote:
Jason van Zyl wrote:

On 22-Mar-08, at 4:47 PM, Trenton Adams wrote:
Jason van Zyl wrote:

On 22-Mar-08, at 4:24 PM, Trenton Adams wrote:
I agree that it's not more complex in every way. But, it seems like it is in some ways. For instance, it's looking to me that in order to actually get it to package my WAR with the JAR, I will have to deploy my code JAR to a repository first, then make it a dependency in my webapp, the package my webapp. Is that right?

No. Everything happens locally you don't have to deploy anything.

If the JAR is providing functionally separate code then you put it in another module. Otherwise then just compile the classes and put them in your WAR and just use one project.
The JAR is only providing build dependency code. i.e. kind of like xerces-api vs xerces-impl. Yep, I put it in another module. So how do I now put them both (webapp and code modules) together into a WAR?

You just specify it as a dependency. You need to read a bit of the website and look at the WAR plugin.
Dependencies pull from a remote repository. I don't want to pull from a remote repository, I want to pull from modules themselves (locally), into a combined WAR.

I've been reading the documentation for two days, and have not seen anything that does what I am asking, which is why I am asking. If you know where the documentation is that tells me what to do, by all means point it out. :)


Read the getting started guide. There's an example of the WAR at the bottom. The website is abysmal and I apologize as it took me 5 minutes to find it.
Yeah, I agree, it can be daunting to navigate now and then. Anyhoo, that is the section of documentation that I've been basing everything off of. Unfortunately, I had a typo in my dependency. I had copied the "junit" dependency, and forgot to take out the scope of "test". So, it wasn't sucking in the dependency JAR. So, apparently dependencies can be automatically retrieved from the local modules, rather than going to a repository. That is good. :)

Thanks.


The WAR plugin, as far as I've learned, is automatic, and works when you specify a packaging model. My parent has a packing model of "pom", my webapp has a packaging model of "war" and my code has a packaging model of "jar".



If so, that's more complex than ant, for this set of functionality. If not, how do I go about doing it?

Okay, so I've got two sub-projects now. How do I get the webapp to build a WAR with the JAR from the code of the other sub project? And, can I do it without deploying the JAR to a repository?

And hey, I agree with enforcing the "architectural integrity" concept, as long as it is not too restrictive. I'm going to have to wait and see if it's as restrictive as it seems. It could just be me at this point. But, any help you could give to convince me of your stance, would be appreciated. I do like "simple". I try to write my code simple, and I want my builds to be simple, and maintainable as well.

Thanks.

Jason van Zyl wrote:

On 22-Mar-08, at 3:23 PM, Trenton Adams wrote:
Yes, it definitely is simpler in some ways, but ends up being more complex, and less intuitive in many other ways. Kind of like a Mac in comparison to Windows. Mac is so dumbed down it becomes difficult to use to get the job done, in many other ways. I found ant a lot easier in many ways. The learning curve for ant was extremely minimal. I suppose I have to use maven, just for it's dependency management, but I sure don't like the structure it uses. :(


It's not more complex as the premise is that composition trumps a big globular build. It is intentional and in the long run will prove far more useful. Based on feedback from hundreds of users over the years this has been the overwhelming opinion. We enforce this architectural integrity from the get go.

So, how do I go about doing it then, with multiple projects? Do I have two copies of everything? Do I make one module depend on the other, so that every time I want to deploy, I have to either install the dependency JAR into the local repository, or a remote one, so that the webapp has access to it? i.e. If I update the one project, that has the class files and such, how is the webapp project going to know about it?

It kind of upsets me, because a couple years ago, I specifically combined two projects that were really one project, because ant has the ability to make different jars and such. I did it because it was "simpler", and now maven is making it more complex. :( Okay, I'm done pouting. :P I'll have to see if it's worth it.


Jochen Wiedmann wrote:
On Sat, Mar 22, 2008 at 10:40 PM, Trenton Adams <[EMAIL PROTECTED]> wrote:


That's what I was about to do, but that really is a hack.


No, it isn't. That's the suggested way to do it.



to be a better way than that. Isn't there? I thought maven would at
least have the functionality of ant.


Of course, Maven can do anything that Ant can do: Just use the
maven-antrun-plugin and create an Ant script that can be launched from Maven. The funny thing about Maven is that it enforces you to work structured. That implies, in particular, to think and work in modules. Once you get used to it, you'll soon learn that it simplifies things. At least, my Maven scripts are typically much simpler and more easily
understood than my monster Ant scripts.

Jochen






Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

A party which is not afraid of letting culture,
business, and welfare go to ruin completely can
be omnipotent for a while.

-- Jakob Burckhardt



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

What matters is not ideas, but the people who have them. Good people can fix bad ideas, but good ideas can't save bad people.

-- Paul Graham



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

Selfish deeds are the shortest path to self destruction.

-- The Seven Samuari, Akira Kirosawa



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

Three people can keep a secret provided two of them are dead.

-- Unknown



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to