Using artifacts in IDEA 9.0.1

Hi there,


I'll try to explain my problem cause maybe I'm not going the right path:

  • From one single code-base I have 4 "products" coming out;
  • The main diference between them is the resources they use;



I have one project with one module (i've tried 4 different modules but since they use the same base path i'm not allowed to do that).
I've created for diferent Artifacts in my module settings.



In this project I have 4 diferent Run/Debug Configurations. Each of them uses a diferent "Before launch... -> Build artifact" option.
And this is nice... but it doesn't work.


I've also noticed something else: if i use the Build menu and then the Build artifact feature it doesn't work for all the artifacts.
I dont' know why but some of the files don't go to the specified output folder.


I'm i doing something wrong? Is there another option to acomplished what I want to achieve?


If u need more info feel free to ask for it.


Thanks in advance,


  Tiago

6 comments
Comment actions Permalink

Hi.

Can you attach your artifact definition (.idea/artifacts/*.xml or ArtifactManager component content from .ipr file)?

Thanks,
Alexander.

0
Comment actions Permalink

Thanks for ur fast response Alexander.


Here goes my ArtifactManager section from my ipr file

  <component name="ArtifactManager">
    <artifact name="simn">
      <output-path>$PROJECT_DIR$/classes</output-path>
      <root id="root">
        <element id="dir-copy" path="$PROJECT_DIR$/resources" />
      </root>
    </artifact>
    <artifact name="contract">
      <output-path>$PROJECT_DIR$/classes</output-path>
      <root id="root">
        <element id="dir-copy" path="$PROJECT_DIR$/resources_contract" />
      </root>
    </artifact>
  </component>


Right now there are only two artifacts being used (I've been trying multiple approaches).
What's happening is that not all files in $PROJECT_DIR$/resources_contract go to $PROJECT_DIR$/classes when I do Build artifact.


Thanks,


  Tiago

0
Comment actions Permalink

Do you have same named resource files in /resources and /resource_contact directories?
I see now that in this case resource from only one directory is processed with some circumstances.

Alexander.

0
Comment actions Permalink

That's true. Some of the files have the same name on both resources and resources_contract.
But they are not the same file. It's like there are different pictures with the same name but different content.


If it help's you debug it, i've even deleted the files manually (Windows Explorer -> $PROJECT_DIR$/classes and then deleted some files), then do the Build artifacts command and, even so, it didn't copied the files.


  Tiago

0
Comment actions Permalink

Created http://youtrack.jetbrains.net/issue/IDEA-51910

As a workaround try to use different output directories for the artifacts. In case of some other problems feedback is welcome.

Alexander.

0
Comment actions Permalink

That's a pretty good description for what happens. I'll try your workaround shortly.


Thanks for your help,


  Tiago

0

Please sign in to leave a comment.