This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 205279 - Schema file generation defaults wrong location
Summary: Schema file generation defaults wrong location
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: PC All
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2011-11-18 10:01 UTC by tim_sa
Modified: 2015-05-23 08:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch v1 (2.70 KB, patch)
2014-10-04 21:34 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tim_sa 2011-11-18 10:01:21 UTC
[ BUILD # : 201111160600 ]
[ JDK VERSION : 1.7 ]

When creating a Schema file from the database in a maven project the default
location is "src\main\java" when it should be "src\main\resources"
Comment 1 Jiri Rechtacek 2011-11-18 16:52:41 UTC
I'm sorry I don't understand the problem. Why should be the default location in "src\main\resources"? Why explain a background? Thanks
Comment 2 Jiri Rechtacek 2011-11-18 16:53:23 UTC
I'm sorry I don't understand the problem. Why should be the default location in "src\main\resources"? Could you explain a background? Thanks
Comment 3 Jesse Glick 2011-11-18 17:12:13 UTC
In a Maven project src/main/java/ (JavaProjectConstants.SOURCES_TYPE_JAVA) may contain only *.java files. All static resources must be placed in src/main/resources/ (SOURCES_TYPE_RESOURCES) instead.
Comment 4 matthias42 2014-10-04 21:34:45 UTC
Created attachment 149709 [details]
proposed patch v1

The attached patch fixes the bug - the idea: Take the existence of directory "<project>/main/src" as indicator of a maven style directory layout.

In this case the change creates/uses the "<project>/main/resources/META-INF" directory as target.

JavaProjectConstants.SOURCES_TYPE_RESOURCES can only be used if the directory already exists - for maven projects this is not necessarily the case.
Comment 5 matthias42 2015-05-21 18:53:03 UTC
Patch was committed as:

http://hg.netbeans.org/core-main/rev/99778347aa18

In the next few days a nightly build will be made available (a message is added here then). Please check that version and mark this bug as VERFIED if you find your problem fixed.

Thank you!
Comment 6 Quality Engineering 2015-05-23 08:01:28 UTC
Integrated into 'main-silver', will be available in build *201505230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/99778347aa18
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #205279: change default path for DBSchema generation wizard in maven project to src/main/resources/META-INF