You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rohit aman <ro...@gmail.com> on 2008/02/15 18:10:03 UTC

maven sources plugin

Hi,
    I recently started using gwt in my struts project. We use maven as a
project management tool. Since GWT needs java sources to be in the class
path for it to compile the java files and my gwt module uses other module
java classes, I thought of trying "maven sources plugin" to generate the
source files jars for all the modules of my project. the maven plugin
creates one jar file for .class file and one for .java file...

so for ex ... if there is a project called "java-proj" , the plugin will
create
com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT.jar
com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT-sources.jar
now if my gwt project uses some classes from the above project so I need to
define the dependency...
for classes I can say
    <dependency>
      <groupId>com.my.company</groupId>
      <artifactId>java-proj</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
and it looks for java-proj-1.0-SNAPSHOT.jar in
com/my/company/java-proj/1.0-SNAPSHOT/   directory
but I am not able to figure out how to define the dependency on source file
because if I say
    <dependency>
      <groupId>com.my.company</groupId>
      <artifactId>java-proj</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
it looks for java-proj-1.0-SNAPSHOT-sources.jar in
com/my/company/java-proj/1.0-SNAPSHOT-sources but the jar is in
com/my/company/java-proj/1.0-SNAPSHOT.
Any idea on how to define dependency on "java-proj-1.0-SNAPSHOT-sources.jar"
which not in "com/my/company/java-proj/1.0-SNAPSHOT-sources" but in
"com/my/company/java-proj/1.0-SNAPSHOT-sources "

Any input is appreciated

Thanks

Re: maven sources plugin

Posted by rohit aman <ro...@gmail.com>.
Thanks Nick... that helps

On Fri, Feb 15, 2008 at 10:35 AM, <ni...@planet.nl> wrote:

> You are looking for the classifier of the dependency:
>
>    <dependency>
>      <groupId>com.my.company</groupId>
>      <artifactId>java-proj</artifactId>
>      <version>1.0-SNAPSHOT</version>
>      <classifier>sources</classifier>
>    </dependency>
>
> See
> http://maven.apache.org/ref/2.0.7/maven-model/maven.html#class_dependency
>
> Hth,
>
> Nick S.
>
> -----Original Message-----
> From: rohit aman [mailto:rohitaman0@gmail.com]
> Sent: Fri 2/15/2008 18:10
> To: users@maven.apache.org
> Subject: maven sources plugin
>
> Hi,
>    I recently started using gwt in my struts project. We use maven as a
> project management tool. Since GWT needs java sources to be in the class
> path for it to compile the java files and my gwt module uses other module
> java classes, I thought of trying "maven sources plugin" to generate the
> source files jars for all the modules of my project. the maven plugin
> creates one jar file for .class file and one for .java file...
>
> so for ex ... if there is a project called "java-proj" , the plugin will
> create
> com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT.jar
> com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT-sources.jar
> now if my gwt project uses some classes from the above project so I need
> to
> define the dependency...
> for classes I can say
>    <dependency>
>      <groupId>com.my.company</groupId>
>      <artifactId>java-proj</artifactId>
>      <version>1.0-SNAPSHOT</version>
>    </dependency>
> and it looks for java-proj-1.0-SNAPSHOT.jar in
> com/my/company/java-proj/1.0-SNAPSHOT/   directory
> but I am not able to figure out how to define the dependency on source
> file
> because if I say
>    <dependency>
>      <groupId>com.my.company</groupId>
>      <artifactId>java-proj</artifactId>
>      <version>1.0-SNAPSHOT</version>
>    </dependency>
> it looks for java-proj-1.0-SNAPSHOT-sources.jar in
> com/my/company/java-proj/1.0-SNAPSHOT-sources but the jar is in
> com/my/company/java-proj/1.0-SNAPSHOT.
> Any idea on how to define dependency on "
> java-proj-1.0-SNAPSHOT-sources.jar"
> which not in "com/my/company/java-proj/1.0-SNAPSHOT-sources" but in
> "com/my/company/java-proj/1.0-SNAPSHOT-sources "
>
> Any input is appreciated
>
> Thanks
>
>

Re: maven sources plugin

Posted by rohit aman <ro...@gmail.com>.
Hey Wayne... for some reason I did not get any reply to the first post. my
apologies to the group for redundant e-mails

On Fri, Feb 15, 2008 at 10:41 AM, Wayne Fay <wa...@gmail.com> wrote:

> Rohit, I replied to this email with the same response 15hrs ago. Why
> are you resending the email, and why didn't you just reply to your
> original thread? Did you not see the response?
>
> Wayne
>
> On 2/15/08, nicklist@planet.nl <ni...@planet.nl> wrote:
> > You are looking for the classifier of the dependency:
> >
> >    <dependency>
> >      <groupId>com.my.company</groupId>
> >      <artifactId>java-proj</artifactId>
> >      <version>1.0-SNAPSHOT</version>
> >      <classifier>sources</classifier>
> >    </dependency>
> >
> > See
> http://maven.apache.org/ref/2.0.7/maven-model/maven.html#class_dependency
> >
> > Hth,
> >
> > Nick S.
> >
> > -----Original Message-----
> > From: rohit aman [mailto:rohitaman0@gmail.com]
> > Sent: Fri 2/15/2008 18:10
> > To: users@maven.apache.org
> > Subject: maven sources plugin
> >
> > Hi,
> >    I recently started using gwt in my struts project. We use maven as a
> > project management tool. Since GWT needs java sources to be in the class
> > path for it to compile the java files and my gwt module uses other
> module
> > java classes, I thought of trying "maven sources plugin" to generate the
> > source files jars for all the modules of my project. the maven plugin
> > creates one jar file for .class file and one for .java file...
> >
> > so for ex ... if there is a project called "java-proj" , the plugin will
> > create
> > com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT.jar
> > com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT-sources.jar
> > now if my gwt project uses some classes from the above project so I need
> to
> > define the dependency...
> > for classes I can say
> >    <dependency>
> >      <groupId>com.my.company</groupId>
> >      <artifactId>java-proj</artifactId>
> >      <version>1.0-SNAPSHOT</version>
> >    </dependency>
> > and it looks for java-proj-1.0-SNAPSHOT.jar in
> > com/my/company/java-proj/1.0-SNAPSHOT/   directory
> > but I am not able to figure out how to define the dependency on source
> file
> > because if I say
> >    <dependency>
> >      <groupId>com.my.company</groupId>
> >      <artifactId>java-proj</artifactId>
> >      <version>1.0-SNAPSHOT</version>
> >    </dependency>
> > it looks for java-proj-1.0-SNAPSHOT-sources.jar in
> > com/my/company/java-proj/1.0-SNAPSHOT-sources but the jar is in
> > com/my/company/java-proj/1.0-SNAPSHOT.
> > Any idea on how to define dependency on "
> java-proj-1.0-SNAPSHOT-sources.jar"
> > which not in "com/my/company/java-proj/1.0-SNAPSHOT-sources" but in
> > "com/my/company/java-proj/1.0-SNAPSHOT-sources "
> >
> > Any input is appreciated
> >
> > Thanks
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven sources plugin

Posted by Wayne Fay <wa...@gmail.com>.
Rohit, I replied to this email with the same response 15hrs ago. Why
are you resending the email, and why didn't you just reply to your
original thread? Did you not see the response?

Wayne

On 2/15/08, nicklist@planet.nl <ni...@planet.nl> wrote:
> You are looking for the classifier of the dependency:
>
>    <dependency>
>      <groupId>com.my.company</groupId>
>      <artifactId>java-proj</artifactId>
>      <version>1.0-SNAPSHOT</version>
>      <classifier>sources</classifier>
>    </dependency>
>
> See http://maven.apache.org/ref/2.0.7/maven-model/maven.html#class_dependency
>
> Hth,
>
> Nick S.
>
> -----Original Message-----
> From: rohit aman [mailto:rohitaman0@gmail.com]
> Sent: Fri 2/15/2008 18:10
> To: users@maven.apache.org
> Subject: maven sources plugin
>
> Hi,
>    I recently started using gwt in my struts project. We use maven as a
> project management tool. Since GWT needs java sources to be in the class
> path for it to compile the java files and my gwt module uses other module
> java classes, I thought of trying "maven sources plugin" to generate the
> source files jars for all the modules of my project. the maven plugin
> creates one jar file for .class file and one for .java file...
>
> so for ex ... if there is a project called "java-proj" , the plugin will
> create
> com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT.jar
> com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT-sources.jar
> now if my gwt project uses some classes from the above project so I need to
> define the dependency...
> for classes I can say
>    <dependency>
>      <groupId>com.my.company</groupId>
>      <artifactId>java-proj</artifactId>
>      <version>1.0-SNAPSHOT</version>
>    </dependency>
> and it looks for java-proj-1.0-SNAPSHOT.jar in
> com/my/company/java-proj/1.0-SNAPSHOT/   directory
> but I am not able to figure out how to define the dependency on source file
> because if I say
>    <dependency>
>      <groupId>com.my.company</groupId>
>      <artifactId>java-proj</artifactId>
>      <version>1.0-SNAPSHOT</version>
>    </dependency>
> it looks for java-proj-1.0-SNAPSHOT-sources.jar in
> com/my/company/java-proj/1.0-SNAPSHOT-sources but the jar is in
> com/my/company/java-proj/1.0-SNAPSHOT.
> Any idea on how to define dependency on "java-proj-1.0-SNAPSHOT-sources.jar"
> which not in "com/my/company/java-proj/1.0-SNAPSHOT-sources" but in
> "com/my/company/java-proj/1.0-SNAPSHOT-sources "
>
> Any input is appreciated
>
> Thanks
>
>

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


RE: maven sources plugin

Posted by ni...@planet.nl.
You are looking for the classifier of the dependency:

    <dependency>
      <groupId>com.my.company</groupId>
      <artifactId>java-proj</artifactId>
      <version>1.0-SNAPSHOT</version>
      <classifier>sources</classifier>
    </dependency>

See http://maven.apache.org/ref/2.0.7/maven-model/maven.html#class_dependency

Hth,

Nick S.

-----Original Message-----
From: rohit aman [mailto:rohitaman0@gmail.com]
Sent: Fri 2/15/2008 18:10
To: users@maven.apache.org
Subject: maven sources plugin
 
Hi,
    I recently started using gwt in my struts project. We use maven as a
project management tool. Since GWT needs java sources to be in the class
path for it to compile the java files and my gwt module uses other module
java classes, I thought of trying "maven sources plugin" to generate the
source files jars for all the modules of my project. the maven plugin
creates one jar file for .class file and one for .java file...

so for ex ... if there is a project called "java-proj" , the plugin will
create
com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT.jar
com/my/company/java-proj/1.0-SNAPSHOT/java-proj-1.0-SNAPSHOT-sources.jar
now if my gwt project uses some classes from the above project so I need to
define the dependency...
for classes I can say
    <dependency>
      <groupId>com.my.company</groupId>
      <artifactId>java-proj</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
and it looks for java-proj-1.0-SNAPSHOT.jar in
com/my/company/java-proj/1.0-SNAPSHOT/   directory
but I am not able to figure out how to define the dependency on source file
because if I say
    <dependency>
      <groupId>com.my.company</groupId>
      <artifactId>java-proj</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
it looks for java-proj-1.0-SNAPSHOT-sources.jar in
com/my/company/java-proj/1.0-SNAPSHOT-sources but the jar is in
com/my/company/java-proj/1.0-SNAPSHOT.
Any idea on how to define dependency on "java-proj-1.0-SNAPSHOT-sources.jar"
which not in "com/my/company/java-proj/1.0-SNAPSHOT-sources" but in
"com/my/company/java-proj/1.0-SNAPSHOT-sources "

Any input is appreciated

Thanks