Re: Maven: how to get files to show up in Projects view
Jean-Marc Borer <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CADAUzb=p=hXbzmkRO6ZpKhurA911ZxN1QFy+wzdfx5jucjg-Xg@mail.gmail.com> |
Hello,
I don't know if I can help. I put myself finally my assembly descriptors in
src/main and added
<descriptors>
<descriptor>src/main/assembly/modules.xml</descriptor>
</descriptors>
NB is able to understand and extract a lot of infos in POMs.
It understands for example specific "generated-sources" dirs. For example,
I have project where I use an external tool to generate sources with an ant
plugin. To make Maven locate the descriptors and resulting sources which
will also appear in NB:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-abnf</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- includes aParse into classpath -->
<property name="execution.classpath"
refid="maven.plugin.classpath"/>
<echo message="Plugin classpath:
${execution.classpath}" />
<property name="aparse.generated-sources"
value="${generated-sources}"/>
<property name="project.build.directory"
value="${project.build.directory}"/>
<property name="project.build.finalName"
value="${project.build.finalName}"/>
<property name="abnf.dir"
value="${basedir}/src/main/abnf" />
<ant antfile="${basedir}/abnf-build.xml"
inheritRefs="true">
<target name="generate"/>
</ant>
</target>
*
<sourceRoot>${project.build.directory}/generated-sources/aParse</sourceRoot>*
</configuration>
</execution>
</executions>
</plugin>
This is just an example.
Maybe NB there is solution to force NB to take src/assembly into account,
but I didn't find a solution yet, not even with the
build-helper-maven-plugin.
File an impovement/bug?
Cheers,
JM
On Wed, Oct 12, 2016 at 1:02 PM, Peter Hansson <[email protected]>
wrote:
>
> I'm a great believer in Maven and I try to follow the Maven conventions to
> the letter. This includes the so called Standard Locations. (
> http://maven.apache.org/guides/introduction/introduction-to-the-standard-
> directory-layout.html)
>
> When I do this there are certain files I can only get to by going to the
> Files view.
>
> For example: Assemblies. According to the convention they should live
> in src/assembly but that will effectively hide them from the Projects view.
> I would have expected them to show up under "Other Sources" in Projects
> view. Had I put my assemblies instead under src/main/assembly then it
> would have worked, but alas that's not the convention.
>
> Is this intentional design in the IDE ? Or just me having misunderstood.
>
>