Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed on compass in Win7 #34

Merged
merged 4 commits into from Jun 12, 2012

Conversation

Projects
None yet
2 participants
@mattbrictson
Copy link
Contributor

commented Jun 12, 2012

When I ran mvn jetty:run, I would get a compile error with compass. It said that it couldn't run compass in a certain directory. I went to that directory and could run compass just fine. Compass was on my path. I noticed that there was a compass and compass.bat in the ruby/bin folder. So in the pom.xml I changed compass to compass.bat and fixed the problem.

So either the pom.xml needs to know whether to run compass or compass.bat, or I needed to do something differently with my compass install.

@mattbrictson

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2012

@augustinku we an all-Mac/Linux shop here, so I'm afraid I don't have any experience executing Compass on Windows. It sounds like you are onto a solution, though. Is there any way you could generalize your workaround and contribute it to the fiftyfive-wicket project as a pull request? I would really appreciate the help.

@augustinku

This comment has been minimized.

Copy link
Author

commented Jun 12, 2012

I'd be happy to test a solution for win7, but I don't think that I can come up with a fix, since I'm totally unfamiliar with Maven. This is the first maven project that I've used. I just changed the two instances of "compass" in the pom.xml to "compass.bat".

@mattbrictson

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2012

@augustinku I've attached a potential solution to this issue. Please try editing your POM with the changes shown in commit e319ac8 and see if that works for you. Essentially I am detecting if the environment is Windows and running compass.bat instead of compass.

@mattbrictson

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2012

You may also need to upgrade the ant plugin to version 1.7, as shown here: e07f32e.

@augustinku

This comment has been minimized.

Copy link
Author

commented Jun 12, 2012

I made a few changes to the code in order to get it to work. It turns out "property" and "condition property" don't mix well. If we just use condition property everything works.

            <condition property="compass.executable" value="compass">
               <os family="mac"/>
            </condition>
            <condition property="compass.executable" value="compass">
               <os family="unix"/>
            </condition>
            <condition property="compass.executable" value="compass.bat">
               <os family="windows"/>
            </condition>
@mattbrictson

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2012

Since Windows is the only exception, I would rather not have conditions for all the other operating systems if possible. My understanding of Ant is that properties cannot be changed once set, so perhaps the solution is to just flip the statements around.

Can you try this?

<condition property="compass.executable" value="compass.bat">
  <os family="windows"/>
</condition>
<property name="compass.executable" value="compass"/>
@augustinku

This comment has been minimized.

Copy link
Author

commented Jun 12, 2012

Yes that works.

Reorder <property> - the first one executed wins
In other words on Windows, the `compass.executable` will be set to `compass.bat` first, and the second `<property>` statement will be ignored. On non-Windows platforms, the second `<property>` will be used, setting `compass.executable` to `compass`.
@mattbrictson

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2012

Thanks for testing. I will merge this into master. I'll plan on issuing a 4.0.1 release of fiftyfive-wicket sometime in the next week or so that includes this fix.

mattbrictson added a commit that referenced this pull request Jun 12, 2012

Merge pull request #34 from 55minutes/compass-windows
fix failing build on compass in Win7

@mattbrictson mattbrictson merged commit 3d034ec into master Jun 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.