I had this working yesterday, and now today it is suddenly not finding my source files and property files. So when I run "package" to build my war file and then I open the war to inspect it I find that the classes folder is completely empty - it does not have any of my application class files. Nor do any of the property files appear.
I believe the problem stems from MyEclipse itself, in that it is not copying or building my source files into the target\classes folder that maven operates from.
Yet yesterday it was doing this just fine.
My project is setup pretty much as default, I have a \src directory where my java files are under their package folders (i.e. \src\com\test\MyClass.java) and then I have a \web directory which is my root web app directory for WEB-INF and the web files.
Finally there is the \target folder which is maven's staging directory
All I used to do is right click my pom.xml, choose Run As and maven package.
Yesterday it was getting all my class files and building my war just fine, and I even did some manual tests via web browser that would not have been possible had the web app not had any class files in it.
So what could be wrong now?
I did check my project's build path- under "Source folders for build path" I have MyApp/src listed as a source folder.
Under "Default output folder" it shows MyApp/target/classes
everything looks correct here
My pom.xml looks like this:
| Code: |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>MyApp</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<name>My App</name>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault/>
</activation>
<properties>
<env>dev</env>
<weblogic.host.name>localhost</weblogic.host.name>
<weblogic.port>7001</weblogic.port>
<weblogic.protocol>t3</weblogic.protocol>
<weblogic.user>weblogic</weblogic.user>
<weblogic.password>weblogic</weblogic.password>
<weblogic.target>AdminServer</weblogic.target>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warSourceDirectory>web</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<adminServerHostName>${weblogic.host.name}</adminServerHostName>
<adminServerPort>${weblogic.port}</adminServerPort>
<adminServerProtocol>${weblogic.protocol}</adminServerProtocol>
<userId>${weblogic.user}</userId>
<password>${weblogic.password}</password>
<verbose>false</verbose>
<debug>true</debug>
<targetNames>${weblogic.target}</targetNames>
</configuration>
<dependencies>
<dependency>
<groupId>weblogic</groupId>
<artifactId>fullclient</artifactId>
<version>10.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
|
|