Maven 2.0 - compile - "No sources to compile"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven 2.0 - compile - "No sources to compile"

nsowatsk
Hi

I am trying out Maven 2.0 for the first time. At this stage it doesn't see
any code to compile.

This is the trace:

G:\nm_poc\ejb\jar>m2 -e compile
+ Error stacktraces are turned on.
[INFO] inventory-service-pom: using locally installed snapshot
[INFO]
-------------------------------------------------------------------------
---
[INFO] Building Inventory Service
[INFO]
-------------------------------------------------------------------------
---
[INFO] maven-jar-plugin: resolved to version 2.0-alpha-2 from local
repository
[INFO] maven-resources-plugin: resolved to version 2.0-alpha-2 from local
reposi
tory
[INFO] maven-compiler-plugin: resolved to version 2.0-alpha-2 from local
reposit
ory
[INFO] [resources:resources]
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO]
-------------------------------------------------------------------------
---
[INFO] BUILD SUCCESSFUL
[INFO]
-------------------------------------------------------------------------
---
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Jun 07 21:26:32 CEST 2005
[INFO] Final Memory: 1M/2M
[INFO]
-------------------------------------------------------------------------
---

G:\nm_poc\ejb\jar>

This is what I have in my pom.xml for the compiler plugin.

From pom.xml:

  <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <compileSourceRoots>javax</compileSourceRoots>
          </configuration>
    </plugin>


I have tried various paths in the place where javax appears, but the results
seem to be the same.

And there is code in the directrory.

G:\nm_poc\ejb\jar>ls src/main/javax/oss
ApplicationContext.java             QueryValue.java
AttributeAccess.java                Serializer.java
IllegalArgumentException.java       SerializerFactory.java
ManagedEntityKey.java               UnsupportedAttributeException.java
ManagedEntityValue.java             XmlSerializer.java
ManagedEntityValueIterator.java     XmlSerializerEncodingStyles.java

G:\nm_poc\ejb\jar>

G:\nm_poc\ejb\jar>ls
pom.xml  src

Does anyone have a clue here please? I know that it must be obvious, but ...

Many thanks

Nathan

--
Nathan Sowatskey - Technical Leader, NMTG CTO Engineering - Desk
+44-208-824-4259 - Mobile +44-7740-449794 - AIM id
NathanCisco - [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Maven 2.0 - compile - "No sources to compile"

Nicolas Chalumeau
Hi Nathan

The default directory for the source is src/main/java and not src/main/javax

You can overwrite in the pom with the <build><sourceDirectory/>
element if you really want src/main/javax

Nicolas,

2005/6/7, Nathan Sowatskey (nsowatsk) <[hidden email]>:

> Hi
>
> I am trying out Maven 2.0 for the first time. At this stage it doesn't see
> any code to compile.
>
> This is the trace:
>
> G:\nm_poc\ejb\jar>m2 -e compile
> + Error stacktraces are turned on.
> [INFO] inventory-service-pom: using locally installed snapshot
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] Building Inventory Service
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] maven-jar-plugin: resolved to version 2.0-alpha-2 from local
> repository
> [INFO] maven-resources-plugin: resolved to version 2.0-alpha-2 from local
> reposi
> tory
> [INFO] maven-compiler-plugin: resolved to version 2.0-alpha-2 from local
> reposit
> ory
> [INFO] [resources:resources]
> [INFO] [compiler:compile]
> [INFO] No sources to compile
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] BUILD SUCCESSFUL
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] Total time: < 1 second
> [INFO] Finished at: Tue Jun 07 21:26:32 CEST 2005
> [INFO] Final Memory: 1M/2M
> [INFO]
> -------------------------------------------------------------------------
> ---
>
> G:\nm_poc\ejb\jar>
>
> This is what I have in my pom.xml for the compiler plugin.
>
> From pom.xml:
>
>   <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-compiler-plugin</artifactId>
>           <configuration>
>             <compileSourceRoots>javax</compileSourceRoots>
>           </configuration>
>     </plugin>
>
> I have tried various paths in the place where javax appears, but the results
> seem to be the same.
>
> And there is code in the directrory.
>
> G:\nm_poc\ejb\jar>ls src/main/javax/oss
> ApplicationContext.java             QueryValue.java
> AttributeAccess.java                Serializer.java
> IllegalArgumentException.java       SerializerFactory.java
> ManagedEntityKey.java               UnsupportedAttributeException.java
> ManagedEntityValue.java             XmlSerializer.java
> ManagedEntityValueIterator.java     XmlSerializerEncodingStyles.java
>
> G:\nm_poc\ejb\jar>
>
> G:\nm_poc\ejb\jar>ls
> pom.xml  src
>
> Does anyone have a clue here please? I know that it must be obvious, but ...
>
> Many thanks
>
> Nathan
>
> --
> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering - Desk
> +44-208-824-4259 - Mobile +44-7740-449794 - AIM id
> NathanCisco - [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]