Opinions wanted on package structuring in cvs

Hello all,
My organization stores packages in separate directories in our repository.
E.g., look at the tree structure below. The example package is
com.company.util
Although this poses no compilation problems, this still seems odd to me.
The first oddity is organization. All classes related to a package are in different directories in this example, shouldn't they be in the same directory?
My second perspective is potentially versioning problems.If we tag Project1 as 3.4 and XProj as 5.6, which version is the package at?
I was wondering if any of you would share your opinions on this...
Thanks!
-root
----Project1
-------com
----------company
-------------util
----------------+MyClass.java
----XProj
-------com
----------company
-------------util
----------------+AnotherClass.java

ideally all classes having same package should be in the same directory
see one of the main function of creating packages in java is grouping classes having same functionality
of e.g u have a package call
com.utility
now all classes which provides some utility in a project are kept under this package and the dir structure will be com/utility/classes
so that a new developer is looking for some utility class he will direclty search under this dir...
in ur case the new developer who has join the project in middle might go mad searching.....

Similar Messages

  • Error: A file found in a source-path must have the same package structure

    I use Adobe Flex Compiler (mxmlc) Version 4.1.0 build 16032,I have a file,named CustomGraphContainerController.as,it's directory is c:\controllers,and the GCController.as file is under the same directory,CustomGraphContainerController.as file like follows
    package controllers{
    import ui.GraphControlContainer;
    public class CustomGraphContainerController extends GCController {
      public function CustomGraphContainerController(a_graphControlContainer:GraphControlContainer) {
       super(a_graphControlContainer);
    Then I want to use mxmlc command to compile it,like follows:
    C:\>mxmlc c:\controllers\CustomGraphContainerController.as
    But it raise compile errors,like follows:
    Loading configuration file C:\sdk\frameworks\flex-config.xml
    C:\controllers\GCController.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'controllers'.
    I don't know how to compile the as file with package controllers? Where is wrong? How to use mxmlc to compile it?
    Thanks

    HI,
         You should have one main application class to compile this as code to swf.. So that main application path should be in your proper package structure.. then you can compile you app and as files also...
    Thanks
    Ram..

  • Project / Package structure..

    Hi
    I am currently prototyping some relatively simple BC4J / Struts / JSP applications in JDev.
    I have followed the toystore demo which seems to have a nice clear and logical project / package structure for working with the MVC architecture.
    However, i have found it very difficult to actually recreate this template when building my own prototypes using the built in wizards.
    Example :
    I have a Model.jpr separated into packages for BO / VO / services.
    I want to create my Struts components (action classes and xml config) in a Controller.jpr and my presentation JSPs in a View.jpr
    When using the web-tier wizards (JDev9.03) for a "complete struts based application" i can see no clear way of separating out the components ? It will package up the action classes into a package that i had no choice in creating / naming !?
    I realise that if i use the subset wizards i have more control over where components are created (i.e. create an empty struts-xml, then add individual action classes etc. ) but it seems a shame that we can't do this within the complete application wizard.
    Also,is there a way to create a new package without creating a "empty" business components package ? I have found myself creating the folder structure from windows explorer with a dummy java file in the relevant directory, then importing and editing the class to ensure compliance with my project design ?
    How do you guys achieve these goals ?
    Thanks in advance
    Matt

    Bump.

  • HowTo: Use package structure in generated code?

    Hi,
    I'm trying to find out if JCS is meeting my requirements for JSF development. So far it is pretty good, although the lack of support for new components is defeating the purpose of JSF for a great deal.
    One of the most terrible things I encountered so far is the fact that I've been unable to get JCS to create a package structure to contain the generated code. In other words, I want JSC to generate the code in "src/com.foo.bar.my.application" instead of just the root of "src/" (where src/ means the source-folder of my project).
    This is a real drawback.
    Maybe I'm wrong, but in that case it's a plain bug because I can't get it to work.
    Iwan

    Admitedly, Creator does not yet offer much flexibility in terms of user-defined package structure. I know you won't like this, but here's a workaround/hack that almost gets to where you want to be.
    First of all, the binding between jsp file and backing bean is defined by the relative positioning between the two files. A JSP file at the top level folder maps to a backing bean just under the assigned java package name (something like webapplicationxx). If you create a directory structure for your JSPs and create pages in them, Creator will create a corresponding package hierarchy for the backing beans.
    So, one way to contrive a java package structure such as com.foo.bar is as follows (best to start with a new project):
    1. Under the Web Pages folder, create a subfolder hierarchy "foo/bar".
    3. Under the Java Sources folder, rename the top level package to 'com'.
    4. You may now create Web pages in the foo/bar subfolder. You'll probably want to cut & paste the Resources directory into the foo/bar folder if you want to use stylesheets, etc. As the pages are created, notice that a com/foo/bar package structure is created under the Java Sources node where the backing beans are maintained.
    One final note, due to a bug in Creator, renaming the package in step 3 does not properly update references to the old pacakge in SessionBean1.java. These will have to be manually changed in the editor. Also note that the ApplicationBean1 and SessionBean1 files must remain at under to top-level package.
    We acknowledge this deficiency in Creator and are working to fix it in the next release.

  • Changing package structure through scripts

    Hi ,
    I have a project with huge number of files(around 2 thousand).
    I want to change the package structure of my source files.Previously no consistent approach is followed.so i want to correct that now.
    I can map each file to a new package structure.
    example: mypackage\common\sample.java = app\comon\Using this input i want to correct oackage and releated imports in my java files.Can any one help me write the best one
    or even if anyone can point to anything of this sort written earlier it would be of great help to me.
    Thanks in advance.

    ..And I am not looking for a simple search replace
    option...
    as it is very difficult for me to test this project.
    So, I am looking for a reliable way of changing
    package and import statements in the depending filesThis would still be a simple search and replace just with "package " and "import " in front of the package name to search for. But you would still have problems whenever the following is used:
    a.b.c.d.F bogus = new a.nb.c.d.F();As a matter of fact, simple search and replace (as long as it is done on the entire package name and not just parts of it) is probably your best bet, if you do not want to go the IDE way. There would probably still be a few mistakes, but there shouldn't be many (if your mapping is reliable). The other problem is would be if classes in one package are to be split into multiple packages, then have fun with any script you write to do it.

  • Compiling classes in their package structure

    I want to compile all classes using one command line
    I have the file structure.
    With .java files contained in two packages
    com.mine.FoldOne
    com.mine.FoldTwo so in the system
    C:/javaProj/src/com/mine/FoldTwo
    C:/javaProj/src/com/mine/FoldOne
    And the folder I want to compile too
    C:/JavaProj/classes
    FromC:/JavaProj I have tried javac @javaProj –d classes
    And
    Javac *.java –d classes
    And several variations of this
    Please tell me how I can compile all my packages using one command line.
    Thanks

    user10778915 wrote:
    Thanks for your advise i will look into building it with antIt's a good tool to know as your projects get more complex. However, if you really do just have 2 packages, then, as suggested by jschell, a simple batch script will suffice, and will probably be simpler. If you just want to get something going as quickly as possible, and don't expect a more complex package structure any time soon, ant may be overkill. But if you're going to be working on bigger projects in the near future, it's probably worth cutting your teeth on ant with a simple project now.

  • Tool needed for creating the package structure

    I need to create a package structure of an existing application. I don�t know much of UML and so I was just wondering if there's any tool available to do so.I researched and came to one such tool(not free to use) i.e
    http://javacentral.compuware.com/pasta/
    Please let me know if you guys know of something similar to this.
    Thanks

    No. There should be an option to 'import java sources' somewhere in the 'file' menu (I think). Unpack the WAR. You will need to locate the JAVA source files, and then import from ArgoUML. The classes will all come in. You simply have to drag which ones you want onto the applicable blank diagram(s) you create.
    - Saish

  • Package structure compilation

    Greetings Of The Day !!!
    I want to compile whole application having package structure as follows
    com.txcs.sms.view.commom.SOMEJAVAFILES.java
    com.txcs.sms.view.marine.SOMEJAVAFILES.java
    com.txcs.sms.model.commom.dao.SOMEJAVAFILES.java
    com.txcs.sms.model.commom.data.SOMEJAVAFILES.java
    com.txcs.sms.control.commom.SOMEJAVAFILES.java
    com.txcs.sms.control.marine.SOMEJAVAFILES.java
    com.txcs.sms.util.SOMEJAVAFILES.java
    com.txcs.sms.upload.SOMEJAVAFILES.java
    I want classes should be in same packege structure as htat of .java file structure mentioned above.
    Also how I can run this whole application...main methos is in
    com.txcs.sms.view.marine.index.java is the main file having public static void main()
    I would like to mention here is that I do not intend to use any compilation tool
    Any positive reply would be greatly appreciated
    Regards

    >
    I want classes should be in same packege structure as
    htat of .java file structure mentioned above.
    no problem, just put them there...
    I would like to mention here is that I do not intend
    to use any compilation tool
    So you want to create all the classfiles by hand without using a compiler?
    I assume it can be done but why should you want to?
    Any positive reply would be greatly appreciated
    Compile the startup class for your application, all the rest should be taken care of by the compiler (unless you have done ugly things like circular references between classes).

  • What is package structure for Client ABAP Proxy?

    1.     What is the package structure need to be  followed for creating abap client proxy.
    2.     I read some where in the form, it need to be 4 levels. Why is it?
    Thank you
    Ganges Leaves

    Hi
    U hav to create a 4 level package structure for client ABAP proxy.
    U can create ur on packages
    1st level-structure package.
    2nd level-main package.
    3rd and 4th level-sub packages.
    To the 4th level only u hav to create proxy.
    The classes and code wil be automatically generated at the time of proxy creation.
    I think the 4 level structure bcz while in r/3 everythin in integration builder like software component version and all wil be takin as different levels.
    Also u can go through the weblogs in the above replies u got.
    Regards
    Victoria.

  • Creation of package structure for ABAP proxy scenario

    Hi All,
    I have a doubt on package structure used for ABAP proxy scenario. What is the specific reason to create a four level package structure? Can some one please explain? Thanks in advance.
    Regards,
    Sudheer.

    Hi Sudheer,
    Can you pls clarify what do you mean by 'four level package structure' ?
    Are you referring to the ABAP structures that get created during creating the proxy by SPROXY transaction ? These structures get automatically created. We simply have to write the code using these structures.
    Or do you mean the 'package' which is mandatory to create a transportable ABAP object ? i.e. transport from Development to Staging and then Production.
    Regards,

  • Creating separate jars from one package structure

    Hello,
    I have the following package structure:
    project
    project.util
    project.mainAll of these packages are in the same classes directory. I would like to create one jar that contains project, one jar that contains project.util and one jar that contains project.main.
    The sub-packages jar correctly (each in its respective jar), however, the jar that supposed to contain ONLY the project package ends up containing the other two packages as well. If I say jar -cvf project.jar -C classes project it takes the entire project hierarchy (including util and main packages). If I say jar -cvf project.jar -C classes project\*.class it says that classes\project\*.class cannot be found. How can I limit the classes being jarred to not include the classes in the subdirectories?
    Please help. Thank you
    Elana

    Please help, anyone!
    Thanks

  • Hi  i am shishir Dixit and i want a package of PDF to excel converter

    Hi
    i am shishir Dixit and i want a package of PDF to excel converter

    Sign up at https://www.acrobat.com/exportpdf/en/home.html
    [topic moved to ExportPDF forum]

  • Package structure suitable for entity beans

    hi,
    I have to manage some good number of entity beans ( around 250 )
    is it a good idea to package these beans.
    i mean what number of packages could be an idea one.
    currently we have 5 packages and around 50 beans will be in each.
    can anybody suggest on this..

    package structure should be based more on the business context rather than number of beans. Usually it is of the form..
    org/com.<company_name>.<proj_name>.<context>.entity
    for instance...a good package structe example is
    org.apache.log4j.Category !
    If you have customer and order beans then
    com.walmart.pos.customer.entity
    com.walmart.pos.order.entity
    hth...
    sanjay.

  • Four layered package structure for ABAP proxies

    Hi
    I am trying to generate an outbound ( client ) abap proxy in our WAS 640 based ERP system by pointing to a XI message interface on the XI integration repository. I have a single package ZPROXY ( not a main or a structure package ) created in our ERP system to hold the proxy structures ( classes, interfaces ). I have this package assigned to a transport layer ( a common transport layer through which other ABAP objects are to be transported ). Is it really necessary to have a four layer package structures for proxies to be transported and work in the QA/Production system ?

    Hi Sudheer,
    Can you pls clarify what do you mean by 'four level package structure' ?
    Are you referring to the ABAP structures that get created during creating the proxy by SPROXY transaction ? These structures get automatically created. We simply have to write the code using these structures.
    Or do you mean the 'package' which is mandatory to create a transportable ABAP object ? i.e. transport from Development to Staging and then Production.
    Regards,

  • Loading images inside the package structure

    i am having trouble loading images that are imbedded into the package structure. I am assuming this is possible(99.9% sure)
    the classes are
    cardgameframework/CardGame.class
    cardgameframework/cardsupport/Card.class
    cardgameframework/cardsupport/images/2D.GIF
    cardgameframework/cardsupport/images/2C.GIF
    how do i load 2D.gif and 2C.gif from CardGame
    i tried
    Image i = Toolkit.getDefaultToolkit.getImage(
    "/cardgameframe/cardsupport/images/2C.GIF");
    and
    Image i = Toolkit.getDefaultToolkit.getImage(getClass().getResource(
    "/cardgameframe/cardsupport/images/2C.GIF"));
    but neither of these seem 2 work
    any help would be appreciated

    My initial thought is that you've got the package wrong in your two examples - you've got cardgameframe and not cardgameframework.
    Anyway, I tend to use the latter of your approaches - getClass().getResource("/cardgameframework/cardsupport/images/2D.GIF").
    Be careful of case in your URLs.
    Note that if getResource can't find your file it will return null - ensure that you're getting back a non-null URL:
    URL url = getClass().getResource("/cardgameframework/cardsupport/images/2D.GIF");
    System.out.println("URL: " + url);
    ...If your URL is non-null then the problem will be with the format of your image file (if it is null then you'll get a NullPointerException eventually).
    Hope this helps.

Maybe you are looking for

  • Oracle ILM assistant for Oracle EBS R12.1 application with 11.1.0.7 DB

    Oracle ILM through its ILM Agent, which is a database component provides option for data archiving. Need to know how ILM agent can be used against Oracle EBS R12 and the options available: a. Does ILM assistant map to industry Compliance requirements

  • How to use "discontinuation data" in BOM item ?

    Hi everyone! I would like to use "discontinuation data" in BOM item , not in MRP4 view, how to set? thanks! Dandan

  • 10.5.7 update/sharing

    after updating to 10.5.7 sometimes my shared computers and devices randomly show up or missing icons for example; im using a 15" unibody that i recently updated to 10.5.7 and the 17" uMBP is only on 10.5.6 Image: is anyone else experiencing random di

  • ADF - Errors

    Hi, I wonder if anyone runs across this kind of error? Thanks, Sep 2, 2005 8:03:08 AM oracle.adfinternal.view.faces.style.util.GraphicsUtils$GraphicsLoader run WARNING: The following exception was thrown while initialiazing the graphics environment:

  • Traditional Chinese and Simplified Chinese conversation

    OSX Mountain Lion Traditional Chinese and Simplified Chinese conversation not function. Anybody can solve the problem?