Help me understand artifacts...

I just converted from Intellij 7 to 9 recently and am stymied by the idea of "Artifacts"  

I usually build web applications in an exploded fashion to a directory named /build underneath one of my modules.   The build is managed by an ant file - I run the ant target myself (either a quick update of the jsp files or a quick compile, or a full on clean compile) and then spin up an instance of Tomcat.

So where does the artifact come in for my process.  Can it help make my development process faster?

5 comments

You can create an artifact describing layout of the exploded directory and specify that artifact in "Before launch" group of Tomcat run configuration.
After that IDEA will automatically build the exploded directory before starting Tomcat.

I just converted from Intellij 7 to 9 recently and am stymied by the idea of "Artifacts" 

I usually build web applications in an exploded fashion to a directory named /build underneath one of my modules.   The build is managed by an ant file - I run the ant target myself (either a quick update of the jsp files or a quick compile, or a full on clean compile) and then spin up an instance of Tomcat.

So where does the artifact come in for my process.  Can it help make my development process faster?

---
Original message URL: http://www.jetbrains.net/devnet/message/5258291#5258291



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I am not sure where you are getting the term "Artifacts" (unless that is a new term in 9, I am still on 8).

Either way, IntelliJ can take care of deploying your web application in exploded format for you (assuming you are using Ultimate edition). There is no need to use an external ANT file for this for local development.

If you use a Debug Configuration then IntelliJ will also take care of deploying any changes to classes and JSP's and hot swap them for you (limited by normal VM limitations on Class hot swapping)

Take a look at File->Project Structure->Modules->your module name->Web->Web Settings Tab

If you have your source code laid out in exploded format there are probably no changes you need to make (and actually even if you don't IntelliJ is pretty good and figuring out what needs to be copied where when it deploys exploded).

Again, this assumes you have Ultimate Edition and the Tomcat plugin installed (installed by default) and that you have configured at least one application server (just point it at your top-level Tomcat install directory):  File->Settings->Application Servers

And yes it saves tons of time letting IntelliJ hot swap classes and JSP's for you.

0

Unfortunately, it appears that this "web settings" functionality was changed in version 9 to the "artifact" concept. Now I also can't figure out how to make it work. I am finally getting it to create an exploded war directory under my build directory but I can't figure out how to get it to copy the jsp and html files from my web source directory. I'm sure this new "artifact" thing is suppose to be better but I don't get yet.

0

So what is the difference between the "Before Launch" and "after Launch" settings.

And how would I sync a project that has 5 different modules?  There are 2 java modules that need to be build and then two web modules.  One of the web modules should be built first and the out put of the build should be copied into the build area of the second web module.

0

Where did you see "After launch" settings? As far as I know a run configuration has only "Before launch" settings group to specify which activities
should be performed before starting.

You can include output of any artifact into another artifact by pressing '+' button and selecting "Artifact" item in an artifact editor.

So what is the difference between the "Before Launch" and "after Launch" settings.

And how would I sync a project that has 5 different modules?  There are 2 java modules that need to be build and then two web modules.  One of the web modules should be built first and the out put of the build should be copied into the build area of the second web module.

---
Original message URL: http://www.jetbrains.net/devnet/message/5262962#5262962



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.