You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jarl <ja...@ironcity.us> on 2015/11/09 19:59:47 UTC

Maven stops building class files after Enum file added to project.

The build succeeds but the target/classes directory is empty of any 
class files.

-Jarl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Wayne Fay <wa...@gmail.com>.
Can you make it work with plain "javac -cp ..."? Have you tried? There
may be some "hidden" javac error that Maven is not showing you, for
some reason.

Wayne

On Mon, Nov 9, 2015 at 2:00 PM, Jarl <ja...@ironcity.us> wrote:
> Once a 'clean' is performed all subsequent builds leave classes directory
> empty.   I can copy a working project to a new directory but i can only get
> the first build to work.   Is there way to actually clean maven build
> artifacts other than mvn clean?
>
>
> On 11/9/2015 8:30 PM, Karl Heinz Marbaise wrote:
>>
>> Hi,
>>
>> those lines:
>>
>> [INFO] Assembling webapp [myProject] in
>> [C:\myProject\target\myProject-2.1.0]
>> [INFO] Processing war project
>> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
>> [INFO] Webapp assembled in [661 msecs]
>> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
>> [INFO]
>>
>> look strange cause building the war is a different folder than building
>> the rest of the project...
>>
>> Have you tested to do a mvn clean ...
>>
>> before doing mvn package ?
>>
>> Kind regards
>> Karl Heinz Marbaise
>>
>> On 11/9/15 8:13 PM, Jarl wrote:
>>>
>>> No error messages.
>>>
>>> [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @
>>> myProject---
>>> [INFO] Changes detected - recompiling the module!
>>> [INFO] Compiling 295 source files to C:\myProject\target\classes
>>> [INFO]
>>> [INFO] --- maven-war-plugin:2.3:war (default-war) @ myProject---
>>> [INFO] Packaging webapp
>>> [INFO] Assembling webapp [myProject] in
>>> [C:\myProject\target\myProject-2.1.0]
>>> [INFO] Processing war project
>>> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
>>> [INFO] Webapp assembled in [661 msecs]
>>> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
>>> [INFO]
>>> [INFO] --- maven-install-plugin:2.4:install (default-install) @
>>> myProject---
>>> [INFO] Installing C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to
>>>
>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.war
>>>
>>> [INFO] Installing C:\myProject\pom.xml to
>>>
>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.pom
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESS
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 8.935 s
>>> [INFO] Finished at: 2015-11-09T19:47:32+01:00
>>> [INFO] Final Memory: 23M/224M
>>>
>>>
>>>
>>> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>>>
>>>>
>>>> Error messages ?
>>>> Log output ?
>>>>
>>>>
>>>> Kind regards
>>>> Karl Heinz Marbaise
>>>> On 11/9/15 7:59 PM, Jarl wrote:
>>>>>
>>>>> The build succeeds but the target/classes directory is empty of any
>>>>> class files.
>>>>>
>>>>> -Jarl
>>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> -Jarl
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarl,

A lot of things to comment about here.

1. Tomcat 7 does not support j2ee7 - servlet specification 3.1

If you are coding against that, you'll need to run on Tomcat 8. See
below for what each version of Tomcat supports.

http://tomcat.apache.org/whichversion.html

2. I'm not a big fan of the archetype that you used.

I've used the following for J2EE 6:

https://github.com/maciejwalkowiak/servlet3-maven-archetype

If you're just writing for the servlet container, the above should be
all you need.

Follow the instructions here to get started:

http://maciejwalkowiak.com/servlet3-maven-archetype/

3. In the above archetype I'm not a fan of finalName

Your approach may be different, but in general it can get confusing to
create a finalName that doesn't reflect what will get installed or
deployed into a repository.

4. Tomcat plugin

The Tomcat plugin serves two general purposes:

a) Embedded Tomcat

This is really useful for continuous updates and development. It's
much like the Jetty plugin in this respect. I don't have much use for
it, since NetBeans takes care of updating the server based on the
contents of the target directory.

b) Deploying to a running Tomcat via the manager application

This is what you would probably use. Just have the Tomcat server
running, and then the Tomcat Maven plugin will use the manager
application to deploy your WAR file.

It uses a user with the role of manager-script to deploy to the Tomcat
server. The user name and password are stored in settings.xml

Examples are here:

http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin/usage.h
tml

We use the Tomcat Maven plugin in a Jenkins job with appropriate
parameters to control deployment to test, QA, UA, and production servers
.

. . . just my two cents
/mde/
On 11/9/2015 3:46 PM, Jarl wrote:
> I am still working on getting it to compile with javac.
> 
> My local tomcat is where I need the war file.  I could use a copy 
> plugin but it isn't obvious(at least not yet) how to do that with 
> maven. Other than copying the file, what would the tomcat plugin
> do? Continuous deployment isn't worth the performance hit.
> 
> 
> Pom file:   I removed most of dependencies
> 
> <?xml version="1.0" encoding="UTF-8"?> <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/xsd/maven-4.0.0.xsd"> 
> <modelVersion>4.0.0</modelVersion>
> 
> <groupId>com.test3</groupId> <artifactId>test3</artifactId> 
> <version>2.2.3</version> <packaging>war</packaging> 
> <name>test3</name>
> 
> <properties> 
> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> 
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>  </properties>
> 
> <dependencies> <dependency> <groupId>javax</groupId> 
> <artifactId>javaee-web-api</artifactId> <version>7.0</version> 
> <scope>provided</scope> </dependency>
> 
> <dependency> <groupId>org.apache.maven.plugins</groupId> 
> <artifactId>maven-compiler-plugin</artifactId> 
> <version>3.3</version> </dependency> </dependencies>
> 
> <build> <plugins> <plugin> 
> <groupId>org.apache.maven.plugins</groupId> 
> <artifactId>maven-compiler-plugin</artifactId> 
> <version>3.3</version> <configuration> <source>1.7</source> 
> <target>1.7</target> <compilerArguments> 
> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerArguments> 
> </configuration> </plugin>
> 
> <plugin> <groupId>org.apache.maven.plugins</groupId> 
> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> 
> <configuration> <failOnMissingWebXml>true</failOnMissingWebXml> 
> <warName>myProject</warName> 
> <outputDirectory>C:\apache-tomcat-7.0.64\webapps</outputDirectory>
>  </configuration> </plugin>
> 
> <plugin> <groupId>org.apache.maven.plugins</groupId> 
> <artifactId>maven-dependency-plugin</artifactId> 
> <version>2.6</version> <executions> <execution> 
> <phase>validate</phase> <goals> <goal>copy</goal> </goals> 
> <configuration> <outputDirectory>${endorsed.dir}</outputDirectory>
>  <silent>true</silent> <artifactItems> <artifactItem> 
> <groupId>javax</groupId> 
> <artifactId>javaee-endorsed-api</artifactId> <version>7.0</version>
>  <type>jar</type> </artifactItem> </artifactItems> </configuration>
>  </execution> </executions> </plugin> </plugins> </build>
> </project>
> 
> On 11/9/2015 9:57 PM, Mark Eggers wrote: Jarl,
> 
> Why is the war file being built in Tomcat's webapps directory?
> 
> Could you please post your pom.xml file? Also, you might want to
> run with the -X script to see what's going on.
> 
> I think in general if you want to deploy from Maven to Tomcat, it
> is better to use the Tomcat Maven plugin.
> 
> Just leave the standard destination folder (target) as is, and then
>  use the Tomcat Maven plugin to deploy to a running Tomcat.
> 
> If you want, you can actually run an embedded Tomcat and set up a 
> continuous deployment. Then, when you save a file, a build and 
> deploy gets triggered automatically.
> 
> I use NetBeans, so a lot of this happens already with the Maven / 
> NetBeans integration.
> 
> . . . just my two cents /mde/ On 11/9/2015 12:00 PM, Jarl wrote:
>>>> Once a 'clean' is performed all subsequent builds leave 
>>>> classes directory empty.   I can copy a working project to a 
>>>> new directory but i can only get the first build to work.
>>>> Is there way to actually clean maven build artifacts other
>>>> than mvn clean?
>>>> 
>>>> On 11/9/2015 8:30 PM, Karl Heinz Marbaise wrote:
>>>>> Hi,
>>>>> 
>>>>> those lines:
>>>>> 
>>>>> [INFO] Assembling webapp [myProject] in 
>>>>> [C:\myProject\target\myProject-2.1.0] [INFO] Processing war
>>>>>  project [INFO] Copying webapp resources 
>>>>> [C:\myProject\src\main\webapp] [INFO] Webapp assembled in 
>>>>> [661 msecs] [INFO] Building war: 
>>>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war [INFO]
>>>>> 
>>>>> look strange cause building the war is a different folder 
>>>>> than building the rest of the project...
>>>>> 
>>>>> Have you tested to do a mvn clean ...
>>>>> 
>>>>> before doing mvn package ?
>>>>> 
>>>>> Kind regards Karl Heinz Marbaise
>>>>> 
>>>>> On 11/9/15 8:13 PM, Jarl wrote:
>>>>>> No error messages.
>>>>>> 
>>>>>> [INFO] --- maven-compiler-plugin:3.3:compile 
>>>>>> (default-compile) @ myProject--- [INFO] Changes detected
>>>>>> - recompiling the module! [INFO] Compiling 295 source
>>>>>> files to C:\myProject\target\classes [INFO] [INFO] --- 
>>>>>> maven-war-plugin:2.3:war (default-war) @ myProject--- 
>>>>>> [INFO] Packaging webapp [INFO] Assembling webapp 
>>>>>> [myProject] in [C:\myProject\target\myProject-2.1.0]
>>>>>> [INFO] Processing war project [INFO] Copying webapp
>>>>>> resources [C:\myProject\src\main\webapp] [INFO] Webapp
>>>>>> assembled in [661 msecs] [INFO] Building war: 
>>>>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
>>>>>> [INFO] [INFO] --- maven-install-plugin:2.4:install 
>>>>>> (default-install) @ myProject--- [INFO] Installing 
>>>>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to 
>>>>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\m
yPr
>
>>>>>>
>>>>>> 
oject-2.1.0.war
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
> [INFO] Installing C:\myProject\pom.xml to
>>>>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\m
yPr
>
>>>>>>
>>>>>> 
oject-2.1.0.pom
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
> [INFO]
>>>>>> -----------------------------------------------------------------
- ---
>
>>>>>>
>>>>>> 
- ----
>>>>>> 
>>>>>> 
> [INFO] BUILD SUCCESS
>>>>>> [INFO] 
>>>>>> -----------------------------------------------------------------
- ---
>
>>>>>>
>>>>>> 
- ----
>>>>>> 
>>>>>> 
> [INFO] Total time: 8.935 s
>>>>>> [INFO] Finished at: 2015-11-09T19:47:32+01:00 [INFO]
>>>>>> Final Memory: 23M/224M
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>>>>>> Error messages ? Log output ?
>>>>>>> 
>>>>>>> 
>>>>>>> Kind regards Karl Heinz Marbaise On 11/9/15 7:59 PM, 
>>>>>>> Jarl wrote:
>>>>>>>> The build succeeds but the target/classes directory
>>>>>>>> is empty of any class files.
>>>>>>>> 
>>>>>>>> -Jarl
>>>>>>>> 
>>>>> ------------------------------------------------------------------
- ---
>>>>>
>>>>>
>>>>>
>
>>>>>
>>>>> 
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail:
>>>>> users-help@maven.apache.org
>> 
>> ---------------------------------------------------------------------
>>
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJWQUD7AAoJEEFGbsYNeTwtoGYH/17tPNz78L1Wa8lQIl69bhQ/
jwB4gY/h9S8SuP4wG6a/vvJCab7vB4M8edxBgdayhpyXjZEbyww3B9X+wVEbaNeg
7xTdohlAWuzY5k/eWejqsXXKyKQYj4tyxDZWCplbDqEPWjkowmI50y3bpk7qPDdN
vaqR8U1SNRM+SxXgInB3IiMiHXfs0JJOBxPB8TKo8JYv/wNo8SjiE4qyaU4xsJP7
iiNW6vVRsgejnPxIkKY83G9P9S2EEQ+Zy5yf2lcnzP3/Sdaz16lZgX8fcdAk4YEv
Y4nfaZ0k+oeYS7qkQGYHd22BkfG/FXqhrFWPlky3gDtPxXd8n0LFxOoxq40i0uk=
=GK+7
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Jarl <ja...@ironcity.us>.
I am still working on getting it to compile with javac.

My local tomcat is where I need the war file.  I could use a copy plugin 
but it isn't obvious(at least not yet) how to do that with maven.
Other than copying the file, what would the tomcat plugin do? Continuous 
deployment isn't worth the performance hit.


Pom file:   I removed most of dependencies

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>

   <groupId>com.test3</groupId>
   <artifactId>test3</artifactId>
   <version>2.2.3</version>
   <packaging>war</packaging>
   <name>test3</name>

   <properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>

   <dependencies>
     <dependency>
       <groupId>javax</groupId>
       <artifactId>javaee-web-api</artifactId>
       <version>7.0</version>
       <scope>provided</scope>
     </dependency>

     <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
       <version>3.3</version>
     </dependency>
   </dependencies>

   <build>
     <plugins>
       <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
         <version>3.3</version>
         <configuration>
           <source>1.7</source>
           <target>1.7</target>
           <compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
           </compilerArguments>
         </configuration>
       </plugin>

       <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
         <version>2.3</version>
         <configuration>
<failOnMissingWebXml>true</failOnMissingWebXml>
           <warName>myProject</warName>
<outputDirectory>C:\apache-tomcat-7.0.64\webapps</outputDirectory>
          </configuration>
       </plugin>

       <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
         <version>2.6</version>
         <executions>
           <execution>
             <phase>validate</phase>
             <goals>
                <goal>copy</goal>
             </goals>
             <configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
               <silent>true</silent>
               <artifactItems>
                 <artifactItem>
                   <groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
                   <version>7.0</version>
                   <type>jar</type>
                 </artifactItem>
               </artifactItems>
             </configuration>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>
</project>

On 11/9/2015 9:57 PM, Mark Eggers wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jarl,
>
> Why is the war file being built in Tomcat's webapps directory?
>
> Could you please post your pom.xml file? Also, you might want to run
> with the -X script to see what's going on.
>
> I think in general if you want to deploy from Maven to Tomcat, it is
> better to use the Tomcat Maven plugin.
>
> Just leave the standard destination folder (target) as is, and then
> use the Tomcat Maven plugin to deploy to a running Tomcat.
>
> If you want, you can actually run an embedded Tomcat and set up a
> continuous deployment. Then, when you save a file, a build and deploy
> gets triggered automatically.
>
> I use NetBeans, so a lot of this happens already with the Maven /
> NetBeans integration.
>
> . . . just my two cents
> /mde/
> On 11/9/2015 12:00 PM, Jarl wrote:
>> Once a 'clean' is performed all subsequent builds leave classes
>> directory empty.   I can copy a working project to a new directory
>> but i can only get the first build to work.   Is there way to
>> actually clean maven build artifacts other than mvn clean?
>>
>> On 11/9/2015 8:30 PM, Karl Heinz Marbaise wrote:
>>> Hi,
>>>
>>> those lines:
>>>
>>> [INFO] Assembling webapp [myProject] in
>>> [C:\myProject\target\myProject-2.1.0] [INFO] Processing war
>>> project [INFO] Copying webapp resources
>>> [C:\myProject\src\main\webapp] [INFO] Webapp assembled in [661
>>> msecs] [INFO] Building war:
>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war [INFO]
>>>
>>> look strange cause building the war is a different folder than
>>> building the rest of the project...
>>>
>>> Have you tested to do a mvn clean ...
>>>
>>> before doing mvn package ?
>>>
>>> Kind regards Karl Heinz Marbaise
>>>
>>> On 11/9/15 8:13 PM, Jarl wrote:
>>>> No error messages.
>>>>
>>>> [INFO] --- maven-compiler-plugin:3.3:compile (default-compile)
>>>> @ myProject--- [INFO] Changes detected - recompiling the
>>>> module! [INFO] Compiling 295 source files to
>>>> C:\myProject\target\classes [INFO] [INFO] ---
>>>> maven-war-plugin:2.3:war (default-war) @ myProject--- [INFO]
>>>> Packaging webapp [INFO] Assembling webapp [myProject] in
>>>> [C:\myProject\target\myProject-2.1.0] [INFO] Processing war
>>>> project [INFO] Copying webapp resources
>>>> [C:\myProject\src\main\webapp] [INFO] Webapp assembled in [661
>>>> msecs] [INFO] Building war:
>>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war [INFO]
>>>> [INFO] --- maven-install-plugin:2.4:install (default-install) @
>>>>   myProject--- [INFO] Installing
>>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to
>>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myPr
> oject-2.1.0.war
>>>>
>>>>
>>>>
>>>>
> [INFO] Installing C:\myProject\pom.xml to
>>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myPr
> oject-2.1.0.pom
>>>>
>>>>
>>>>
>>>>
> [INFO]
>>>> --------------------------------------------------------------------
> - ----
>>>>
>>>>
> [INFO] BUILD SUCCESS
>>>> [INFO]
>>>> --------------------------------------------------------------------
> - ----
>>>>
>>>>
> [INFO] Total time: 8.935 s
>>>> [INFO] Finished at: 2015-11-09T19:47:32+01:00 [INFO] Final
>>>> Memory: 23M/224M
>>>>
>>>>
>>>>
>>>> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>>>> Error messages ? Log output ?
>>>>>
>>>>>
>>>>> Kind regards Karl Heinz Marbaise On 11/9/15 7:59 PM, Jarl
>>>>> wrote:
>>>>>> The build succeeds but the target/classes directory is
>>>>>> empty of any class files.
>>>>>>
>>>>>> -Jarl
>>>>>>
>>> ---------------------------------------------------------------------
>>>
>>>
>>>
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBAgAGBQJWQQivAAoJEEFGbsYNeTwtb2cIAKNE3aw2aK5Gscq5LSfsoYO5
> muMCbfXv6pEiipYCilA2E8Ga2Hgfi74WPLhRBb5XMpkD5U6rco0RWgQiW7GdqcOp
> i7pwz3OTc29Ito2STIiLjM2JKb/4RXoB34KvV09dRqYXSgMVRYI/s5XbTGd9Nnzb
> 9sBa7Sk9oI1ctGZyTKTGE+N8C4G9ff4Sma6laJrNIN00L/xYvqBMQ4/oXzWsz14C
> WBDcuBxpsKp44FEvLAxVzfQ96MHclTg/AL7cG8WeqU2Up6nk/N9rSR3CjaNMgvl9
> IFuFHpmtgGTyjqNlvFkRFyYF9GApBJKZOLWxSclRDccjwrxZUVXuGuRfOIt+aew=
> =EcYK
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
-Jarl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarl,

Why is the war file being built in Tomcat's webapps directory?

Could you please post your pom.xml file? Also, you might want to run
with the -X script to see what's going on.

I think in general if you want to deploy from Maven to Tomcat, it is
better to use the Tomcat Maven plugin.

Just leave the standard destination folder (target) as is, and then
use the Tomcat Maven plugin to deploy to a running Tomcat.

If you want, you can actually run an embedded Tomcat and set up a
continuous deployment. Then, when you save a file, a build and deploy
gets triggered automatically.

I use NetBeans, so a lot of this happens already with the Maven /
NetBeans integration.

. . . just my two cents
/mde/
On 11/9/2015 12:00 PM, Jarl wrote:
> Once a 'clean' is performed all subsequent builds leave classes 
> directory empty.   I can copy a working project to a new directory 
> but i can only get the first build to work.   Is there way to 
> actually clean maven build artifacts other than mvn clean?
> 
> On 11/9/2015 8:30 PM, Karl Heinz Marbaise wrote:
>> Hi,
>> 
>> those lines:
>> 
>> [INFO] Assembling webapp [myProject] in 
>> [C:\myProject\target\myProject-2.1.0] [INFO] Processing war 
>> project [INFO] Copying webapp resources 
>> [C:\myProject\src\main\webapp] [INFO] Webapp assembled in [661 
>> msecs] [INFO] Building war: 
>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war [INFO]
>> 
>> look strange cause building the war is a different folder than 
>> building the rest of the project...
>> 
>> Have you tested to do a mvn clean ...
>> 
>> before doing mvn package ?
>> 
>> Kind regards Karl Heinz Marbaise
>> 
>> On 11/9/15 8:13 PM, Jarl wrote:
>>> No error messages.
>>> 
>>> [INFO] --- maven-compiler-plugin:3.3:compile (default-compile)
>>> @ myProject--- [INFO] Changes detected - recompiling the
>>> module! [INFO] Compiling 295 source files to
>>> C:\myProject\target\classes [INFO] [INFO] ---
>>> maven-war-plugin:2.3:war (default-war) @ myProject--- [INFO]
>>> Packaging webapp [INFO] Assembling webapp [myProject] in
>>> [C:\myProject\target\myProject-2.1.0] [INFO] Processing war
>>> project [INFO] Copying webapp resources 
>>> [C:\myProject\src\main\webapp] [INFO] Webapp assembled in [661 
>>> msecs] [INFO] Building war: 
>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war [INFO]
>>> [INFO] --- maven-install-plugin:2.4:install (default-install) @
>>>  myProject--- [INFO] Installing 
>>> C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to 
>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myPr
oject-2.1.0.war
>>>
>>>
>>>
>>>
>>> 
[INFO] Installing C:\myProject\pom.xml to
>>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myPr
oject-2.1.0.pom
>>>
>>>
>>>
>>>
>>> 
[INFO]
>>> --------------------------------------------------------------------
- ----
>>>
>>>
>>> 
[INFO] BUILD SUCCESS
>>> [INFO] 
>>> --------------------------------------------------------------------
- ----
>>>
>>>
>>> 
[INFO] Total time: 8.935 s
>>> [INFO] Finished at: 2015-11-09T19:47:32+01:00 [INFO] Final 
>>> Memory: 23M/224M
>>> 
>>> 
>>> 
>>> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>>> 
>>>> Error messages ? Log output ?
>>>> 
>>>> 
>>>> Kind regards Karl Heinz Marbaise On 11/9/15 7:59 PM, Jarl 
>>>> wrote:
>>>>> The build succeeds but the target/classes directory is
>>>>> empty of any class files.
>>>>> 
>>>>> -Jarl
>>>>> 
>> 
>> ---------------------------------------------------------------------
>>
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJWQQivAAoJEEFGbsYNeTwtb2cIAKNE3aw2aK5Gscq5LSfsoYO5
muMCbfXv6pEiipYCilA2E8Ga2Hgfi74WPLhRBb5XMpkD5U6rco0RWgQiW7GdqcOp
i7pwz3OTc29Ito2STIiLjM2JKb/4RXoB34KvV09dRqYXSgMVRYI/s5XbTGd9Nnzb
9sBa7Sk9oI1ctGZyTKTGE+N8C4G9ff4Sma6laJrNIN00L/xYvqBMQ4/oXzWsz14C
WBDcuBxpsKp44FEvLAxVzfQ96MHclTg/AL7cG8WeqU2Up6nk/N9rSR3CjaNMgvl9
IFuFHpmtgGTyjqNlvFkRFyYF9GApBJKZOLWxSclRDccjwrxZUVXuGuRfOIt+aew=
=EcYK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Jarl <ja...@ironcity.us>.
Once a 'clean' is performed all subsequent builds leave classes 
directory empty.   I can copy a working project to a new directory but i 
can only get the first build to work.   Is there way to actually clean 
maven build artifacts other than mvn clean?

On 11/9/2015 8:30 PM, Karl Heinz Marbaise wrote:
> Hi,
>
> those lines:
>
> [INFO] Assembling webapp [myProject] in 
> [C:\myProject\target\myProject-2.1.0]
> [INFO] Processing war project
> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
> [INFO] Webapp assembled in [661 msecs]
> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
> [INFO]
>
> look strange cause building the war is a different folder than 
> building the rest of the project...
>
> Have you tested to do a mvn clean ...
>
> before doing mvn package ?
>
> Kind regards
> Karl Heinz Marbaise
>
> On 11/9/15 8:13 PM, Jarl wrote:
>> No error messages.
>>
>> [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @
>> myProject---
>> [INFO] Changes detected - recompiling the module!
>> [INFO] Compiling 295 source files to C:\myProject\target\classes
>> [INFO]
>> [INFO] --- maven-war-plugin:2.3:war (default-war) @ myProject---
>> [INFO] Packaging webapp
>> [INFO] Assembling webapp [myProject] in
>> [C:\myProject\target\myProject-2.1.0]
>> [INFO] Processing war project
>> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
>> [INFO] Webapp assembled in [661 msecs]
>> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
>> [INFO]
>> [INFO] --- maven-install-plugin:2.4:install (default-install) @
>> myProject---
>> [INFO] Installing C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to
>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.war 
>>
>>
>> [INFO] Installing C:\myProject\pom.xml to
>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.pom 
>>
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 8.935 s
>> [INFO] Finished at: 2015-11-09T19:47:32+01:00
>> [INFO] Final Memory: 23M/224M
>>
>>
>>
>> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>>
>>> Error messages ?
>>> Log output ?
>>>
>>>
>>> Kind regards
>>> Karl Heinz Marbaise
>>> On 11/9/15 7:59 PM, Jarl wrote:
>>>> The build succeeds but the target/classes directory is empty of any
>>>> class files.
>>>>
>>>> -Jarl
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
-Jarl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Jarl <ja...@ironcity.us>.
The war file is first built and then copied to tomcat.    This is done 
after the class building steps so it shouldn't affect the preceding steps.

Yes a mvn clean removes the target directory which it does but a 
subsequent mvn install leaves the classes directory empty of any class 
files.

On 11/9/2015 8:30 PM, Karl Heinz Marbaise wrote:
> Hi,
>
> those lines:
>
> [INFO] Assembling webapp [myProject] in 
> [C:\myProject\target\myProject-2.1.0]
> [INFO] Processing war project
> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
> [INFO] Webapp assembled in [661 msecs]
> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
> [INFO]
>
> look strange cause building the war is a different folder than 
> building the rest of the project...
>
> Have you tested to do a mvn clean ...
>
> before doing mvn package ?
>
> Kind regards
> Karl Heinz Marbaise
>
> On 11/9/15 8:13 PM, Jarl wrote:
>> No error messages.
>>
>> [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @
>> myProject---
>> [INFO] Changes detected - recompiling the module!
>> [INFO] Compiling 295 source files to C:\myProject\target\classes
>> [INFO]
>> [INFO] --- maven-war-plugin:2.3:war (default-war) @ myProject---
>> [INFO] Packaging webapp
>> [INFO] Assembling webapp [myProject] in
>> [C:\myProject\target\myProject-2.1.0]
>> [INFO] Processing war project
>> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
>> [INFO] Webapp assembled in [661 msecs]
>> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
>> [INFO]
>> [INFO] --- maven-install-plugin:2.4:install (default-install) @
>> myProject---
>> [INFO] Installing C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to
>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.war 
>>
>>
>> [INFO] Installing C:\myProject\pom.xml to
>> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.pom 
>>
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 8.935 s
>> [INFO] Finished at: 2015-11-09T19:47:32+01:00
>> [INFO] Final Memory: 23M/224M
>>
>>
>>
>> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>>
>>> Error messages ?
>>> Log output ?
>>>
>>>
>>> Kind regards
>>> Karl Heinz Marbaise
>>> On 11/9/15 7:59 PM, Jarl wrote:
>>>> The build succeeds but the target/classes directory is empty of any
>>>> class files.
>>>>
>>>> -Jarl
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
-Jarl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

those lines:

[INFO] Assembling webapp [myProject] in 
[C:\myProject\target\myProject-2.1.0]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\myProject\src\main\webapp]
[INFO] Webapp assembled in [661 msecs]
[INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
[INFO]

look strange cause building the war is a different folder than building 
the rest of the project...

Have you tested to do a mvn clean ...

before doing mvn package ?

Kind regards
Karl Heinz Marbaise

On 11/9/15 8:13 PM, Jarl wrote:
> No error messages.
>
> [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @
> myProject---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 295 source files to C:\myProject\target\classes
> [INFO]
> [INFO] --- maven-war-plugin:2.3:war (default-war) @ myProject---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [myProject] in
> [C:\myProject\target\myProject-2.1.0]
> [INFO] Processing war project
> [INFO] Copying webapp resources [C:\myProject\src\main\webapp]
> [INFO] Webapp assembled in [661 msecs]
> [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
> [INFO]
> [INFO] --- maven-install-plugin:2.4:install (default-install) @
> myProject---
> [INFO] Installing C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to
> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.war
>
> [INFO] Installing C:\myProject\pom.xml to
> C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.pom
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 8.935 s
> [INFO] Finished at: 2015-11-09T19:47:32+01:00
> [INFO] Final Memory: 23M/224M
>
>
>
> On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>>
>> Error messages ?
>> Log output ?
>>
>>
>> Kind regards
>> Karl Heinz Marbaise
>> On 11/9/15 7:59 PM, Jarl wrote:
>>> The build succeeds but the target/classes directory is empty of any
>>> class files.
>>>
>>> -Jarl
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Jarl <ja...@ironcity.us>.
No error messages.

[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ 
myProject---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 295 source files to C:\myProject\target\classes
[INFO]
[INFO] --- maven-war-plugin:2.3:war (default-war) @ myProject---
[INFO] Packaging webapp
[INFO] Assembling webapp [myProject] in 
[C:\myProject\target\myProject-2.1.0]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\myProject\src\main\webapp]
[INFO] Webapp assembled in [661 msecs]
[INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ myProject---
[INFO] Installing C:\apache-tomcat-7.0.64\webapps\myProject-2.1.0.war to 
C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.war
[INFO] Installing C:\myProject\pom.xml to 
C:\Users\admin\.m2\repository\com\nsb\myProject\myProject\2.1.0\myProject-2.1.0.pom
[INFO] 
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 8.935 s
[INFO] Finished at: 2015-11-09T19:47:32+01:00
[INFO] Final Memory: 23M/224M



On 11/9/2015 8:04 PM, Karl Heinz Marbaise wrote:
>
> Error messages ?
> Log output ?
>
>
> Kind regards
> Karl Heinz Marbaise
> On 11/9/15 7:59 PM, Jarl wrote:
>> The build succeeds but the target/classes directory is empty of any
>> class files.
>>
>> -Jarl
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
-Jarl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven stops building class files after Enum file added to project.

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Error messages ?
Log output ?


Kind regards
Karl Heinz Marbaise
On 11/9/15 7:59 PM, Jarl wrote:
> The build succeeds but the target/classes directory is empty of any
> class files.
>
> -Jarl
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org