java - How to use Maven WAR overlay to extend a WAR with another project? -


i'm trying include war in project, extend it, similar question how extend/customize war project. far can tell, answer (use maven war overlays) seems right 1 project. however, can't figure out how can work.

i included maven war plugin in pom.xml:

<plugin>     <groupid>org.apache.maven.plugins</groupid>     <artifactid>maven-war-plugin</artifactid>     <version>2.3</version> </plugin> 

and added war dependency (local repository):

<dependency>     <groupid>nl.surfnet.apis</groupid>     <artifactid>apis-authorization-server-war</artifactid>     <version>1.3.6-snapshot</version>     <type>war</type> </dependency> 

when compile , deploy application, works fine, parent project deployed is. had include .properties file, isn't included in war, in can plug in own classes override default behaviour of project.

now want extend class, add custom behaviour, can't figure out how this. problem is, can't include class want extend. far understand, wars not thought included in project, intended published container server. isn't war overlay plugin thought give funcitonality?

then found warpath plugin sounds want: "develop classes included in war artifact /web-inf/classes directory including them in project classpath."

adding plugin:

<plugin>     <groupid>org.appfuse</groupid>     <artifactid>maven-warpath-plugin</artifactid>     <version>2.0.2</version>     <extensions>true</extensions>     <executions>         <execution>             <goals>                 <goal>add-classes</goal>             </goals>         </execution>     </executions> </plugin> 

and second dependency (type warpath), described in plugin documentation:

<dependency>     <groupid>nl.surfnet.apis</groupid>     <artifactid>apis-authorization-server-war</artifactid>     <version>1.3.6-snapshot</version>     <type>warpath</type> </dependency> 

however again, including class doesn't seem work. netbeans tells me package try import not exist.

strangely though, can deploy project, works fine, long don't try use new class, if introduce syntax errors in class. class doesn't seem compiled anymore.

to sure problem isn't due project i'm trying extend, wrote 2 new minimal test projects, 1 extends other. again got same behavior. didn't include projects here, code same 1 provided above, groupid , artifactid.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -