Directory structure conventions

View: New views
5 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: Directory structure conventions

by bong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

The problem when having a target in side the web application is that it is
compiled by aspnet_compiler, a simple solution for this is, aspmojo should
delete the target folder before calling aspnet_compiler,
then aspnet_compiler's targetdirectory should be pointed to a temporary
path, then after the execution
the temporary path is then copied in the target folder,

in this way we can support what is Visual Studio's Default way and still
have the maven-style.
and not forcing users who may have already a very large project to do some
major refactor on there part.
which might cause bad side effects.

remember Visual studio web projects doesn't have a project file like
(*.csproj/*.vbproj), its dll dependencies are stored in Bin/ directory
and each *.dll has a *.dll.refresh which stores the relative path of the
dependency dll, this means that changing a folder
for the web project could make the relative paths of the *.dll.refresh file
unreachable.

thanks
bong

On Wed, Oct 1, 2008 at 4:08 PM, Leopoldo Agdeppa <lagdeppa@...> wrote:

> +1 with VS defaults
>
>
> On Wed, Oct 1, 2008 at 11:10 AM, Shane Isbell <shane.isbell@...>wrote:
>
>> On Tue, Sep 30, 2008 at 7:59 PM, Wendy Smoak <wsmoak@...> wrote:
>> >
>> >
>> > What is the convention on trunk exactly?  Does it want a directory for
>> > the source code, or is it fine if source is in the same directory as
>> > the pom and .csproj file (the VS default)?
>>
>> I think we should go with VS defaults. After the VS addin, I changed my
>> mind
>> about trying to support two different directory structures for VS, the
>> Maven
>> structure being an unnatural fit. So there may be some archetypes and ITs
>> of
>> each structure as this transition was going on.
>>
>> Shane
>>
>
>
>
> --
> Leopoldo L. Agdeppa III
> Software Engineer | Exist Global | +6332 4121155 xtn 103. +639195686024 |
> YM: exst_lagdeppa | www.exist.com | Innovation Delivered
>



--
Leopoldo L. Agdeppa III
Software Engineer | Exist Global | +6332 4121155 xtn 103. +639195686024 |
YM: exst_lagdeppa | www.exist.com | Innovation Delivered

Re: Directory structure conventions

by Shane Isbell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

NMaven still supports whatever sourceDirectory you define for it. The issue
is what format we will use for the trunk and given that most people will
probably be using VS studio (and possibly the Maven addin), the VS defaults
make sense. This would not preclude you from using some other structure for
your project. Or am I missing something in your requirements?
An additional VS addin could also be created specifically for web projects,
if needed.
Shane

On Wed, Oct 1, 2008 at 9:52 PM, Leopoldo Agdeppa <lagdeppa@...> wrote:

> Hello
>
> The problem when having a target in side the web application is that it is
> compiled by aspnet_compiler, a simple solution for this is, aspmojo should
> delete the target folder before calling aspnet_compiler,
> then aspnet_compiler's targetdirectory should be pointed to a temporary
> path, then after the execution
> the temporary path is then copied in the target folder,
>
> in this way we can support what is Visual Studio's Default way and still
> have the maven-style.
> and not forcing users who may have already a very large project to do some
> major refactor on there part.
> which might cause bad side effects.
>
> remember Visual studio web projects doesn't have a project file like
> (*.csproj/*.vbproj), its dll dependencies are stored in Bin/ directory
> and each *.dll has a *.dll.refresh which stores the relative path of the
> dependency dll, this means that changing a folder
> for the web project could make the relative paths of the *.dll.refresh file
> unreachable.
>
> thanks
> bong
>
> On Wed, Oct 1, 2008 at 4:08 PM, Leopoldo Agdeppa <lagdeppa@...>
> wrote:
>
> > +1 with VS defaults
> >
> >
> > On Wed, Oct 1, 2008 at 11:10 AM, Shane Isbell <shane.isbell@...
> >wrote:
> >
> >> On Tue, Sep 30, 2008 at 7:59 PM, Wendy Smoak <wsmoak@...> wrote:
> >> >
> >> >
> >> > What is the convention on trunk exactly?  Does it want a directory for
> >> > the source code, or is it fine if source is in the same directory as
> >> > the pom and .csproj file (the VS default)?
> >>
> >> I think we should go with VS defaults. After the VS addin, I changed my
> >> mind
> >> about trying to support two different directory structures for VS, the
> >> Maven
> >> structure being an unnatural fit. So there may be some archetypes and
> ITs
> >> of
> >> each structure as this transition was going on.
> >>
> >> Shane
> >>
> >
> >
> >
> > --
> > Leopoldo L. Agdeppa III
> > Software Engineer | Exist Global | +6332 4121155 xtn 103. +639195686024 |
> > YM: exst_lagdeppa | www.exist.com | Innovation Delivered
> >
>
>
>
> --
> Leopoldo L. Agdeppa III
> Software Engineer | Exist Global | +6332 4121155 xtn 103. +639195686024 |
> YM: exst_lagdeppa | www.exist.com | Innovation Delivered
>

Re: Directory structure conventions

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

One more time... see the wiki for some directory trees that may be
easier to understand than my descriptions of them. :)
http://docs.codehaus.org/display/MAVENUSER/NMaven+Project+Directory+Structure

The following directory structures should be supported by NMaven

1. Multi-module Projects

Multi-module project with a parent pom containing one or more modules,
then a subdirectory for each module, which equates to a VS "project".
The .sln file sits beside the parent pom, and each subdirectory
contains a .csproj, pom.xml and source code. Source code is not
typically put in a subdirectory under the module, but it might be.
NUnit test code may be within each module in a directory named
"Tests", or it may be in a separate module.

TODO:  When generating poms, is a solution with a single project a
special case?  Should it have a parent pom with one module and a child
pom, or should it have only one pom?

2. Flat Single Module Project

Flat structure with pom.xml, .sln, .csproj and source code all in the
same directory. Source code is not typically put in a subdirectory
under the module, but it might be. If present, NUnit test code should
be in a directory named "Tests", which is not packaged in the main
artifact. See note below about "nested" projects. The "flat" structure
is only supported as a single project with no sub-modules, for
projects of type 'library' (dll) and 'exe'.

3. Visual Studio Web Site Project

Visual Studio "Web Site" (File -> New -> Web Site) project with .sln
file copied into the project directory and modified to normalize
paths. NMaven will build a zip file containing the aspx files and
compiled dlls (in a bin/ directory). Note: There is an issue with
building this type of project twice in a row: you must 'clean' before
building again.

4. Visual Studio ASP.NET Web Application

Visual Studio "ASP.NET Web Application" (File -> New -> Project,
"ASP.NET Web Application"). Structure is similar to (1) with a parent
pom and .sln file at the top, plus a subdirectory for each
project/module. NMaven should build a .zip file as in (3) containing
pages and dlls.

Note: Some versions of NMaven have limited support for a "nested"
project-within-project structure with source code in the parent
directory. This structure will have a .sln and .vbproj file at the
top, then directories for additional modules beneath, each containing
a .vbproj file. This structure is NOT RECOMMENDED and not likely to be
fully supported by Maven tools such as the Release plugin.

TODO: ASP.NET Web Service Application

TODO: ADO.NET project structure

NOTE: In the examples, .vbproj and .csproj are interchangeable, each
structure should work for any language, and a solution may be composed
of different modules using different languages. In addition, tests
within a module may be written in a different language than the main
artifact.

Comments and changes are welcome, here or on the wiki...

--
Wendy

Re: Directory structure conventions

by brettporter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 10/10/2008, at 10:52 AM, Wendy Smoak wrote:

>
> 3. Visual Studio Web Site Project
>
> Visual Studio "Web Site" (File -> New -> Web Site) project with .sln
> file copied into the project directory and modified to normalize
> paths. NMaven will build a zip file containing the aspx files and
> compiled dlls (in a bin/ directory).

What directory are the aspx files in?

> Note: There is an issue with
> building this type of project twice in a row: you must 'clean' before
> building again.

I don't understand that - is it a necessity of the format, or a bug of  
the current implementation?

- Brett

--
Brett Porter
brett@...
http://blogs.exist.com/bporter/


Re: Directory structure conventions

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 9, 2008 at 5:05 PM, Brett Porter <brett@...> wrote:
>
> On 10/10/2008, at 10:52 AM, Wendy Smoak wrote:

>> 3. Visual Studio Web Site Project
>
> What directory are the aspx files in?

By default, the same directory as the .sln file... this is what I get
from File -> New -> Website (after moving the .sln file from where VS
puts it, which is NOT with the project.)

C:\PROJECTS\WEBSITE2
│   Default.aspx
│   Default.aspx.cs
│   WebSite2.sln
│   pom.xml

└───App_Data


>> Note: There is an issue with
>> building this type of project twice in a row: you must 'clean' before
>> building again.
>
> I don't understand that - is it a necessity of the format, or a bug of the
> current implementation?

I'm not sure-- Bong wrote about this on Oct 1st.

--
Wendy
< Prev | 1 - 2 | Next >